hedgewars/uLand.pas
changeset 5274 941da059472b
parent 5241 e1fb0fc971c6
child 5286 22c1f4833a86
child 5441 39962b855540
--- a/hedgewars/uLand.pas	Mon Jun 20 19:00:19 2011 -0400
+++ b/hedgewars/uLand.pas	Mon Jun 20 20:46:27 2011 -0400
@@ -1062,35 +1062,40 @@
 
     LandSurface2LandPixels(tmpsurf);
     SDL_FreeSurface(tmpsurf);
-    if (cReducedQuality and rqBlurryLand) = 0 then
-        for x:= leftX+2 to rightX-2 do
-            for y:= topY+2 to LAND_HEIGHT-3 do
-                if (Land[y, x] = 0) and 
-                   (((Land[y, x-1] = lfBasic) and ((Land[y+1,x] = lfBasic)) or (Land[y-1,x] = lfBasic)) or
-                   ((Land[y, x+1] = lfBasic) and ((Land[y-1,x] = lfBasic) or (Land[y+1,x] = lfBasic)))) then
-                begin
+    for x:= leftX+2 to rightX-2 do
+        for y:= topY+2 to LAND_HEIGHT-3 do
+            if (Land[y, x] = 0) and 
+               (((Land[y, x-1] = lfBasic) and ((Land[y+1,x] = lfBasic)) or (Land[y-1,x] = lfBasic)) or
+               ((Land[y, x+1] = lfBasic) and ((Land[y-1,x] = lfBasic) or (Land[y+1,x] = lfBasic)))) then
+            begin
+                if (cReducedQuality and rqBlurryLand) = 0 then
+                    begin
                     if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1]
                     else if Land[y, x+1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x+1];
-                    LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift);
-                    Land[y,x]:= lfObject
-                end
-                else if (Land[y, x] = 0) and
-                        (((Land[y, x-1] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y+2,x] = lfBasic)) or
-                        ((Land[y, x-1] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y-2,x] = lfBasic)) or
-                        ((Land[y, x+1] = lfBasic) and (Land[y+1,x+1] = lfBasic) and (Land[y+2,x] = lfBasic)) or
-                        ((Land[y, x+1] = lfBasic) and (Land[y-1,x+1] = lfBasic) and (Land[y-2,x] = lfBasic)) or
-                        ((Land[y+1, x] = lfBasic) and (Land[y+1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or
-                        ((Land[y-1, x] = lfBasic) and (Land[y-1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or
-                        ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or
-                        ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then
-                begin
+                    LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (128 shl AShift)
+                    end;
+                Land[y,x]:= lfObject
+            end
+            else if (Land[y, x] = 0) and
+                    (((Land[y, x-1] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y+2,x] = lfBasic)) or
+                    ((Land[y, x-1] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y-2,x] = lfBasic)) or
+                    ((Land[y, x+1] = lfBasic) and (Land[y+1,x+1] = lfBasic) and (Land[y+2,x] = lfBasic)) or
+                    ((Land[y, x+1] = lfBasic) and (Land[y-1,x+1] = lfBasic) and (Land[y-2,x] = lfBasic)) or
+                    ((Land[y+1, x] = lfBasic) and (Land[y+1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or
+                    ((Land[y-1, x] = lfBasic) and (Land[y-1,x+1] = lfBasic) and (Land[y,x+2] = lfBasic)) or
+                    ((Land[y+1, x] = lfBasic) and (Land[y+1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic)) or
+                    ((Land[y-1, x] = lfBasic) and (Land[y-1,x-1] = lfBasic) and (Land[y,x-2] = lfBasic))) then
+            begin
+                if (cReducedQuality and rqBlurryLand) = 0 then
+                    begin
                     if Land[y, x-1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x-1]
                     else if Land[y, x+1] = lfBasic then LandPixels[y, x]:= LandPixels[y, x+1]
                     else if Land[y+1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y+1, x]
                     else if Land[y-1, x] = lfBasic then LandPixels[y, x]:= LandPixels[y-1, x];
-                    LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift);
-                    Land[y,x]:= lfObject
-                end;
+                    LandPixels[y,x]:= (LandPixels[y,x] and not AMask) or (64 shl AShift)
+                    end;
+                Land[y,x]:= lfObject
+            end;
     AddProgress();
 end;