hedgewars/uRenderUtils.pas
changeset 12102 51596d30a724
parent 12101 2e70ef81e281
child 12591 7bae1fab444b
equal deleted inserted replaced
12101:2e70ef81e281 12102:51596d30a724
   208         rT:= (rD * (255 - aT) + rT * aT) div 255;
   208         rT:= (rD * (255 - aT) + rT * aT) div 255;
   209         gT:= (gD * (255 - aT) + gT * aT) div 255;
   209         gT:= (gD * (255 - aT) + gT * aT) div 255;
   210         bT:= (bD * (255 - aT) + bT * aT) div 255;
   210         bT:= (bD * (255 - aT) + bT * aT) div 255;
   211         aT:= aD + ((255 - LongInt(aD)) * aT div 255);
   211         aT:= aD + ((255 - LongInt(aD)) * aT div 255);
   212 
   212 
   213         destPixels^[dpi]:= SDL_MapRGBA(dest^.format, rT, gT, bT, aT);
   213         destPixels^[dpi]:= SDL_MapRGBA(dest^.format, rT, gT, bT, Byte(aT));
       
   214 
   214         end;
   215         end;
   215 
   216 
   216     SDL_UnlockSurface(src);
   217     SDL_UnlockSurface(src);
   217     SDL_UnlockSurface(dest);
   218     SDL_UnlockSurface(dest);
   218 end;
   219 end;