hedgewars/uRenderUtils.pas
changeset 15852 c4561095666a
parent 15753 72f735c03fec
child 15900 128ace913837
child 15957 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;