# HG changeset patch # User alfadur # Date 1565610987 -10800 # Node ID 01bd0a08716380ab1f6b800bf1bd04effcb7af9a # Parent 6794b6ad3f866ff87121b62dffca9334883a4b6d add background to switch animation diff -r 6794b6ad3f86 -r 01bd0a087163 hedgewars/uGearsRender.pas --- 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; diff -r 6794b6ad3f86 -r 01bd0a087163 hedgewars/uTypes.pas --- 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, diff -r 6794b6ad3f86 -r 01bd0a087163 hedgewars/uVariables.pas --- 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; diff -r 6794b6ad3f86 -r 01bd0a087163 share/hedgewars/Data/Graphics/Switch.png Binary file share/hedgewars/Data/Graphics/Switch.png has changed diff -r 6794b6ad3f86 -r 01bd0a087163 share/hedgewars/Data/Graphics/SwitchBack.png Binary file share/hedgewars/Data/Graphics/SwitchBack.png has changed