hedgewars/uLandGraphics.pas
changeset 2236 af8fc3311748
parent 2235 79c9542c1058
child 2331 e4941a7986d6
--- a/hedgewars/uLandGraphics.pas	Tue Jul 07 01:51:46 2009 +0000
+++ b/hedgewars/uLandGraphics.pas	Tue Jul 07 01:53:44 2009 +0000
@@ -361,8 +361,7 @@
 bpp:= Image^.format^.BytesPerPixel;
 TryDo(bpp = 4, 'It should be 32 bpp sprite', true);
 // Check that sprite fits free space
-//p:= @(PByteArray(Image^.pixels)^[Image^.pitch * ( col * h + row * w )]);
-p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 - 1 ]);
+p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]);
 case bpp of
      4: for y:= 0 to Pred(h) do
             begin
@@ -391,7 +390,7 @@
    end;
 
 // Checked, now place
-p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 - 1 ]);
+p:= @(PByteArray(Image^.pixels)^[ Image^.pitch * row * h + col * w * 4 ]);
 case bpp of
      4: for y:= 0 to Pred(h) do
             begin