Draw yet not available ammo grayscaled
authorunc0rr
Sun, 27 Jul 2008 21:50:44 +0000
changeset 1125 87937426031b
parent 1124 1636a3c7c061
child 1126 2acfe205a519
Draw yet not available ammo grayscaled
hedgewars/uConsts.pas
hedgewars/uWorld.pas
share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png
--- a/hedgewars/uConsts.pas	Sun Jul 27 21:01:11 2008 +0000
+++ b/hedgewars/uConsts.pas	Sun Jul 27 21:50:44 2008 +0000
@@ -47,7 +47,7 @@
                    sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
                    sprHat, sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave,
                    sprHurrah, sprLemonade, sprExplPart, sprExplPart2,
-                   sprCakeWalk, sprCakeDown);
+                   sprCakeWalk, sprCakeDown, sprAMAmmosBW);
 
      TGearType  = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
@@ -422,7 +422,9 @@
                      (FileName:  'Cake_walk'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
                       Width:  64; Height: 64; saveSurf: false),// sprCakeWalk
                      (FileName:  'Cake_down'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
-                      Width:  64; Height: 64; saveSurf: false) // sprCakeDown
+                      Width:  64; Height: 64; saveSurf: false),// sprCakeDown
+                     (FileName:   'Ammos_bw'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
+                      Width:  32; Height: 32; saveSurf: false) // sprAMAmmosBW
                      );
 
 	Wavez: array [TWave] of record
--- a/hedgewars/uWorld.pas	Sun Jul 27 21:01:11 2008 +0000
+++ b/hedgewars/uWorld.pas	Sun Jul 27 21:50:44 2008 +0000
@@ -116,11 +116,14 @@
             t:= 0;
             while (t <= cMaxSlotAmmoIndex) and (Ammo^[i, t].Count > 0) do
                   begin
-                  DrawSprite(sprAMAmmos, x + t * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType));
                   l:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber;
 
                   if l >= 0 then
+                     begin
+                     DrawSprite(sprAMAmmosBW, x + t * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType));
                      DrawSprite(sprTurnsLeft, x + t * 33 + 51, y + 17, l);
+                     end else
+                     DrawSprite(sprAMAmmos, x + t * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType));
 
                   if (Slot = i) and (CursorPoint.X >= x + t * 33 + 35) and (CursorPoint.X < x + t * 33 + 68) then
                      begin
Binary file share/hedgewars/Data/Graphics/AmmoMenu/Ammos_bw.png has changed