hedgewars/uLandGraphics.pas
changeset 188 a7c2a61524c2
parent 184 f97a7a3dc8f6
child 196 993cf173218b
--- a/hedgewars/uLandGraphics.pas	Thu Oct 05 18:44:14 2006 +0000
+++ b/hedgewars/uLandGraphics.pas	Thu Oct 05 19:40:11 2006 +0000
@@ -161,9 +161,9 @@
 
 for i:= 0 to Pred(Count) do
     begin
-    for ty:= max(-Radius, -y) to min(Radius, 1023 - y) do
+    for ty:= max(y - Radius, 0) to min(y + Radius, 1023) do
         for tx:= max(0, ar[i].Left - Radius) to min(2047, ar[i].Right + Radius) do
-            ClearLandPixel(y + ty, tx);
+            ClearLandPixel(ty, tx);
     inc(y, dY)
     end;
 
@@ -172,10 +172,10 @@
 
 for i:= 0 to Pred(Count) do
     begin
-    for ty:= max(-Radius, -y) to min(Radius, 1023 - y) do
+    for ty:= max(y - Radius, 0) to min(y + Radius, 1023) do
         for tx:= max(0, ar[i].Left - Radius) to min(2047, ar[i].Right + Radius) do
-            if Land[y + ty, tx] = $FFFFFF then
-                  SetLandPixel(y + ty, tx);
+            if Land[ty, tx] = $FFFFFF then
+                  SetLandPixel(ty, tx);
     inc(y, dY)
     end;