small pixel jizz tweak
authorsheepluva
Tue, 31 Mar 2015 03:41:36 +0200
changeset 10878 963bc20f511c
parent 10877 baad1cc9b749
child 10879 9bedbd36de49
small pixel jizz tweak
hedgewars/uLandGraphics.pas
hedgewars/uLandObjects.pas
hedgewars/uVariables.pas
--- a/hedgewars/uLandGraphics.pas	Tue Mar 31 02:30:29 2015 +0200
+++ b/hedgewars/uLandGraphics.pas	Tue Mar 31 03:41:36 2015 +0200
@@ -82,7 +82,7 @@
             inc(drawPixelBG);
         end
         else if ((Land[landY, landX] and lfObject) <> 0) or (((LandPixels[pixelY, pixelX] and AMask) shr AShift) < 255) then
-            LandPixels[pixelY, pixelX]:= LandPixels[pixelY, pixelX] and (not AMASK)
+            LandPixels[pixelY, pixelX]:= ExplosionBorderColorNoA
     end;
 end;
 
@@ -199,7 +199,7 @@
             begin
             calculatePixelsCoordinates(i, y, px, py);
             if ((Land[y, i] and lfIndestructible) = 0) and (not disableLandBack or (Land[y, i] > 255))  then
-                LandPixels[py, px]:= LandPixels[py, px] and (not AMASK);
+                LandPixels[py, px]:= ExplosionBorderColorNoA;
             end;
     icePixel:
         for i:= fromPix to toPix do
--- a/hedgewars/uLandObjects.pas	Tue Mar 31 02:30:29 2015 +0200
+++ b/hedgewars/uLandObjects.pas	Tue Mar 31 03:41:36 2015 +0200
@@ -556,7 +556,9 @@
         ExplosionBorderColorR:= c2.r;
         ExplosionBorderColorG:= c2.g;
         ExplosionBorderColorB:= c2.b;
-        ExplosionBorderColor:= (c2.r shl RShift) or (c2.g shl GShift) or (c2.b shl BShift) or AMask;
+        ExplosionBorderColorNoA:=
+            (c2.r shl RShift) or (c2.g shl GShift) or (c2.b shl BShift);
+        ExplosionBorderColor:= ExplosionBorderColorNoA or AMask;
         end
     else if key = 'water-top' then
         begin
--- a/hedgewars/uVariables.pas	Tue Mar 31 02:30:29 2015 +0200
+++ b/hedgewars/uVariables.pas	Tue Mar 31 03:41:36 2015 +0200
@@ -129,6 +129,7 @@
     ExplosionBorderColorR,
     ExplosionBorderColorG,
     ExplosionBorderColorB,
+    ExplosionBorderColorNoA,
     ExplosionBorderColor:  LongWord;
     IceColor            : LongWord;
     IceEdgeColor        : LongWord;
@@ -2549,6 +2550,7 @@
     ExplosionBorderColorG:= 80;
     ExplosionBorderColorB:= 80;
     ExplosionBorderColor:= $FF808080;
+    ExplosionBorderColorNoA:= ExplosionBorderColor and (not AMask);
     IceColor:= ($44 shl RShift) or ($97 shl GShift) or ($A9 shl BShift) or ($A0 shl AShift);
     IceEdgeColor:= ($8A shl RShift) or ($AF shl GShift) or ($B2 shl BShift) or ($FF shl AShift);