Visual tweaks for snow
authornemo
Wed, 22 Dec 2010 18:50:00 -0500
changeset 4634 784e2df9e79a
parent 4633 e69becb1ac14
child 4635 62d0873459e5
Visual tweaks for snow
hedgewars/GSHandlers.inc
hedgewars/uLandGraphics.pas
--- a/hedgewars/GSHandlers.inc	Wed Dec 22 18:29:43 2010 -0500
+++ b/hedgewars/GSHandlers.inc	Wed Dec 22 18:50:00 2010 -0500
@@ -625,13 +625,13 @@
                 end;
             inc(yy,2);
             inc(xx,i);
-            if ((xx and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx]:= Land[yy, xx] or lfBasic;
+            if ((xx and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx]:= Land[yy, xx] or lfObject;
             if yy > 0 then
                 begin 
-                Land[yy-1, xx]:= Land[yy-1, xx] or lfBasic;
-                if ((xx-i and LAND_WIDTH_MASK) = 0) then Land[yy-1, xx-i]:= Land[yy-1, xx-i] or lfBasic;
+                Land[yy-1, xx]:= Land[yy-1, xx] or lfObject;
+                if ((xx-i and LAND_WIDTH_MASK) = 0) then Land[yy-1, xx-i]:= Land[yy-1, xx-i] or lfObject;
                 end;
-            if ((xx-i and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx-i]:= Land[yy, xx-i] or lfBasic
+            if ((xx-i and LAND_WIDTH_MASK) = 0) and ((yy and LAND_HEIGHT_MASK) = 0) then Land[yy, xx-i]:= Land[yy, xx-i] or lfObject
 ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS ////////////////////////////////////
             end;
         if move then
--- a/hedgewars/uLandGraphics.pas	Wed Dec 22 18:29:43 2010 -0500
+++ b/hedgewars/uLandGraphics.pas	Wed Dec 22 18:50:00 2010 -0500
@@ -198,9 +198,7 @@
            else
                LandPixels[t div 2, i div 2]:= LandBackPixel(i, t)
            end
-       else
-           if ((Land[t, i] and lfObject) <> 0) then
-               if (cReducedQuality and rqBlurryLand) = 0 then
+       else if (cReducedQuality and rqBlurryLand) = 0 then
                    LandPixels[t, i]:= 0
                else
                    LandPixels[t div 2, i div 2]:= 0;
@@ -216,9 +214,7 @@
            else
                LandPixels[t div 2, i div 2]:= LandBackPixel(i, t)
            end
-       else
-           if ((Land[t, i] and lfObject) <> 0) then
-               if (cReducedQuality and rqBlurryLand) = 0 then
+       else if (cReducedQuality and rqBlurryLand) = 0 then
                    LandPixels[t, i]:= 0
                else
                    LandPixels[t div 2, i div 2]:= 0;
@@ -234,12 +230,10 @@
             else
            LandPixels[t div 2, i div 2]:= LandBackPixel(i, t)
            end
-       else
-            if ((Land[t, i] and lfObject) <> 0) then
-            if (cReducedQuality and rqBlurryLand) = 0 then
-          LandPixels[t, i]:= 0
+       else if (cReducedQuality and rqBlurryLand) = 0 then
+          	LandPixels[t, i]:= 0
             else
-           LandPixels[t div 2, i div 2]:= 0;
+           	LandPixels[t div 2, i div 2]:= 0;
 
 t:= y - dx;
 if (t and LAND_HEIGHT_MASK) = 0 then
@@ -252,9 +246,7 @@
            else
                LandPixels[t div 2, i div 2]:= LandBackPixel(i, t)
            end
-       else
-          if ((Land[t, i] and lfObject) <> 0) then
-              if (cReducedQuality and rqBlurryLand) = 0 then
+       else if (cReducedQuality and rqBlurryLand) = 0 then
                 LandPixels[t, i]:= 0
               else
                 LandPixels[t div 2, i div 2]:= 0;
@@ -267,7 +259,7 @@
 t:= y + dy;
 if (t and LAND_HEIGHT_MASK) = 0 then
    for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
-       if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
+       if (Land[t, i] and (lfBasic or lfObject)) <> 0 then
           begin
            if (cReducedQuality and rqBlurryLand) = 0 then
             LandPixels[t, i]:= cExplosionBorderColor
@@ -282,7 +274,7 @@
 t:= y - dy;
 if (t and LAND_HEIGHT_MASK) = 0 then
    for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do
-       if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
+       if (Land[t, i] and (lfBasic or lfObject)) <> 0 then
           begin
            if (cReducedQuality and rqBlurryLand) = 0 then
               LandPixels[t, i]:= cExplosionBorderColor
@@ -296,7 +288,7 @@
 t:= y + dx;
 if (t and LAND_HEIGHT_MASK) = 0 then
    for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
-       if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
+       if (Land[t, i] and (lfBasic or lfObject)) <> 0 then
            begin
            if (cReducedQuality and rqBlurryLand) = 0 then
            LandPixels[t, i]:= cExplosionBorderColor
@@ -311,7 +303,7 @@
 t:= y - dx;
 if (t and LAND_HEIGHT_MASK) = 0 then
    for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do
-       if ((Land[t, i] and lfBasic) <> 0) or ((Land[t, i] and lfObject) <> 0) then
+       if (Land[t, i] and (lfBasic or lfObject)) <> 0 then
           begin
            if (cReducedQuality and rqBlurryLand) = 0 then
           LandPixels[t, i]:= cExplosionBorderColor
@@ -430,7 +422,7 @@
     begin
     for ty:= Max(y - Radius, 0) to Min(y + Radius, LAND_HEIGHT) do
         for tx:= Max(0, ar^[i].Left - Radius) to Min(LAND_WIDTH, ar^[i].Right + Radius) do
-            if ((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0) then
+            if (Land[ty, tx] and (lfBasic or lfObject)) <> 0 then
                 begin
                     if (cReducedQuality and rqBlurryLand) = 0 then
                         LandPixels[ty, tx]:= cExplosionBorderColor