# HG changeset patch # User nemo # Date 1293061800 18000 # Node ID 784e2df9e79aa01f4d9022a48b6cc5293a97300f # Parent e69becb1ac14c7c514f82380f4ab5d7e4255b446 Visual tweaks for snow diff -r e69becb1ac14 -r 784e2df9e79a hedgewars/GSHandlers.inc --- 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 diff -r e69becb1ac14 -r 784e2df9e79a hedgewars/uLandGraphics.pas --- 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