hedgewars/uRenderUtils.pas
changeset 15874 c4561095666a
parent 15775 72f735c03fec
child 15929 128ace913837
child 15987 e8d94f84d294
--- a/hedgewars/uRenderUtils.pas	Fri May 20 17:24:14 2022 -0400
+++ b/hedgewars/uRenderUtils.pas	Tue Jul 26 12:37:17 2022 +0200
@@ -188,9 +188,9 @@
     for iY:= srcY to lY do
         begin
         // src pixel index
-        spi:= iY * src^.w  + iX;
+        spi:= iY * src^.pitch div 4  + iX;
         // dest pixel index
-        dpi:= (iY + dY) * dest^.w + (iX + dX);
+        dpi:= (iY + dY) * dest^.pitch div 4 + (iX + dX);
 
         // get src alpha (and set it as target alpha for now)
         aT:= (srcPixels^[spi] and AMask) shr AShift;