hedgewars/uRenderUtils.pas
changeset 15852 c4561095666a
parent 15753 72f735c03fec
equal deleted inserted replaced
15851:9bb85e43e492 15852:c4561095666a
   186 
   186 
   187     for iX:= srcX to lX do
   187     for iX:= srcX to lX do
   188     for iY:= srcY to lY do
   188     for iY:= srcY to lY do
   189         begin
   189         begin
   190         // src pixel index
   190         // src pixel index
   191         spi:= iY * src^.w  + iX;
   191         spi:= iY * src^.pitch div 4  + iX;
   192         // dest pixel index
   192         // dest pixel index
   193         dpi:= (iY + dY) * dest^.w + (iX + dX);
   193         dpi:= (iY + dY) * dest^.pitch div 4 + (iX + dX);
   194 
   194 
   195         // get src alpha (and set it as target alpha for now)
   195         // get src alpha (and set it as target alpha for now)
   196         aT:= (srcPixels^[spi] and AMask) shr AShift;
   196         aT:= (srcPixels^[spi] and AMask) shr AShift;
   197 
   197 
   198         // src pixel opaque?
   198         // src pixel opaque?