add background to switch animation
authoralfadur
Mon, 12 Aug 2019 14:56:27 +0300
changeset 15313 01bd0a087163
parent 15312 6794b6ad3f86
child 15314 9583c3371371
add background to switch animation
hedgewars/uGearsRender.pas
hedgewars/uTypes.pas
hedgewars/uVariables.pas
share/hedgewars/Data/Graphics/Switch.png
share/hedgewars/Data/Graphics/SwitchBack.png
--- a/hedgewars/uGearsRender.pas	Fri Aug 09 23:41:46 2019 +0300
+++ b/hedgewars/uGearsRender.pas	Mon Aug 12 14:56:27 2019 +0300
@@ -1543,6 +1543,12 @@
                     end;
         gtSwitcher: begin
                     setTintAdd(true);
+                    if IsTooDarkToRead(Gear^.Hedgehog^.Team^.Clan^.Color) then
+                        Tint($FFFFFFFF)
+                    else
+                        Tint($000000FF);
+                    DrawSprite(sprSwitchBack, x - 16, y - 56, (RealTicks shr 6) mod 12);
+
                     Tint(Gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF);
                     DrawSprite(sprSwitch, x - 16, y - 56, (RealTicks shr 6) mod 12);
                     untint;
--- a/hedgewars/uTypes.pas	Fri Aug 09 23:41:46 2019 +0300
+++ b/hedgewars/uTypes.pas	Mon Aug 12 14:56:27 2019 +0300
@@ -56,7 +56,7 @@
             sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR,
             sprAMSlot, sprAMAmmos, sprAMAmmosBW, sprAMSlotKeys, sprAMCorners,
             sprFinger, sprAirBomb, sprAirplane, sprAmAirplane, sprAmGirder,
-            sprHHTelepMask, sprSwitch, sprParachute, sprTarget, sprRopeNode,
+            sprHHTelepMask, sprSwitch, sprSwitchBack, sprParachute, sprTarget, sprRopeNode,
             sprQuestion, sprPowerBar, sprWindBar, sprWindL, sprWindR,
 {$IFDEF USE_TOUCH_INTERFACE}
             sprFireButton, sprArrowUp, sprArrowDown, sprArrowLeft, sprArrowRight,
--- a/hedgewars/uVariables.pas	Fri Aug 09 23:41:46 2019 +0300
+++ b/hedgewars/uVariables.pas	Mon Aug 12 14:56:27 2019 +0300
@@ -468,6 +468,8 @@
             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: true; critical: true; checkSum: true; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprHHTelepMask
             (FileName:     'Switch'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSwitch
+            (FileName:     'SwitchBack'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+            Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprSwitchBack
             (FileName:  'Parachute'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprParachute
             (FileName:     'Target'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Binary file share/hedgewars/Data/Graphics/Switch.png has changed
Binary file share/hedgewars/Data/Graphics/SwitchBack.png has changed