Display special icon when moving bee cursor over gray wrap area
authorWuzzy <Wuzzy2@mail.ru>
Sat, 29 Jun 2019 23:12:21 +0200
changeset 15205 8705ee93f8b3
parent 15204 f55c1c895797
child 15206 d48eba5ac715
Display special icon when moving bee cursor over gray wrap area This is done as a reminder to remind the player the bee will attempt to fly through the edge first when placing the target in one of the two gray areas.
hedgewars/uTypes.pas
hedgewars/uVariables.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Graphics/throughWrap.png
--- a/hedgewars/uTypes.pas	Sat Jun 29 22:52:14 2019 +0200
+++ b/hedgewars/uTypes.pas	Sat Jun 29 23:12:21 2019 +0200
@@ -94,7 +94,7 @@
             sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL, sprCreeper, sprHandCreeper, sprMinigun,
             sprSliderInverted, sprFingerBack, sprFingerBackInv, sprTargetPBack, sprTargetPBackInv,
             sprHealthHud, sprHealthPoisonHud, sprVampHud, sprKarmaHud, sprMedicHud, sprMedicPoisonHud,
-            sprHaloHud, sprInvulnHUD, sprAmPiano, sprHandLandGun, sprFirePunch
+            sprHaloHud, sprInvulnHUD, sprAmPiano, sprHandLandGun, sprFirePunch, sprThroughWrap
             );
 
     // Gears that interact with other Gears and/or Land
--- a/hedgewars/uVariables.pas	Sat Jun 29 22:52:14 2019 +0200
+++ b/hedgewars/uVariables.pas	Sat Jun 29 23:12:21 2019 +0200
@@ -846,7 +846,9 @@
             (FileName:  'amLandGun'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  64; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true), // sprHandLandGun
             (FileName: 'amShoryuken'; Path: ptHedgehog; 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) // sprFirePunch
+            Width:  32; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true),// sprFirePunch
+            (FileName: 'throughWrap'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+            Width:  16; Height: 13; imageWidth: 0; imageHeight: 0; saveSurf: false; critical: true; checkSum: false; priority: tpMedium; getDimensions: false; getImageDimensions: true) // sprTroughWrap
             );
 
 
--- a/hedgewars/uWorld.pas	Sat Jun 29 22:52:14 2019 +0200
+++ b/hedgewars/uWorld.pas	Sat Jun 29 23:12:21 2019 +0200
@@ -1862,6 +1862,13 @@
                     end;
                 DrawSprite(PosSprite, TargetCursorPoint.X - (SpritesData[PosSprite].Width shr 1), cScreenHeight - TargetCursorPoint.Y - (SpritesData[PosSprite].Height shr 1),i);
                 Untint();
+                if (WorldEdge = weWrap) and (CurAmmoType = amBee) then
+                    begin
+                    if (TargetCursorPoint.X - WorldDx > rightX) then
+                        DrawSprite(sprThroughWrap, TargetCursorPoint.X - (SpritesData[sprThroughWrap].Width shr 1), cScreenHeight - TargetCursorPoint.Y - (SpritesData[PosSprite].Height shr 1) - SpritesData[sprThroughWrap].Height - 2, 0)
+                    else if (TargetCursorPoint.X - WorldDx < leftX) then
+                        DrawSprite(sprThroughWrap, TargetCursorPoint.X - (SpritesData[sprThroughWrap].Width shr 1), cScreenHeight - TargetCursorPoint.Y - (SpritesData[PosSprite].Height shr 1) - SpritesData[sprThroughWrap].Height - 2, 1);
+                    end;
                 end;
             end;
     DrawTextureF(SpritesData[sprArrow].Texture, cDefaultZoomLevel / cScaleFactor, TargetCursorPoint.X + round(SpritesData[sprArrow].Width / cScaleFactor), cScreenHeight + round(SpritesData[sprArrow].Height / cScaleFactor) - TargetCursorPoint.Y, (RealTicks shr 6) mod 8, 1, SpritesData[sprArrow].Width, SpritesData[sprArrow].Height);
Binary file share/hedgewars/Data/Graphics/throughWrap.png has changed