# HG changeset patch # User unc0rr # Date 1658831837 -7200 # Node ID c4561095666adbc64ca83140690e6d5293a4170a # Parent 9bb85e43e492bc36b723ab25c8ab5b2e11aa7d3e Fix texture copying routine not taking pitch into account diff -r 9bb85e43e492 -r c4561095666a hedgewars/uRenderUtils.pas --- 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;