# HG changeset patch # User unc0rr # Date 1212002282 0 # Node ID a9a349b2b3fa9d722dc8de37c4b60876fbeae485 # Parent e9200bdeaccc36c0a1b6ced1a30af2d96ac03c88 Use turnsleft sprites to indicate turns left to activate ammo diff -r e9200bdeaccc -r a9a349b2b3fa hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Wed May 28 18:58:37 2008 +0000 +++ b/hedgewars/uConsts.pas Wed May 28 19:18:02 2008 +0000 @@ -44,7 +44,7 @@ sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun, sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer, sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath, - sprShotgun, sprDEagle, sprHHIdle, sprMortar); + sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft); TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, @@ -387,7 +387,9 @@ (FileName: 'Idle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 32; Height: 32; saveSurf: false),// sprHHIdle (FileName: 'Mortar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 16; Height: 16; saveSurf: false) // sprMortar + Width: 16; Height: 16; saveSurf: false),// sprMortar + (FileName: 'TurnsLeft'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 16; Height: 16; saveSurf: false) // sprTurnsLeft ); Soundz: array[TSound] of record diff -r e9200bdeaccc -r a9a349b2b3fa hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Wed May 28 18:58:37 2008 +0000 +++ b/hedgewars/uWorld.pas Wed May 28 19:18:02 2008 +0000 @@ -71,7 +71,7 @@ procedure ShowAmmoMenu; const MENUSPEED = 15; -var x, y, i, t: LongInt; +var x, y, i, t, l: LongInt; Slot, Pos: LongInt; begin if (TurnTimeLeft = 0) or KbdKeyPressed then bShowAmmoMenu:= false; @@ -118,6 +118,11 @@ 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 + DrawSprite(sprTurnsLeft, x + t * 33 + 51, y + 17, l); + if (Slot = i) and (CursorPoint.X >= x + t * 33 + 35) and (CursorPoint.X < x + t * 33 + 68) then begin DrawSprite(sprAMSelection, x + t * 33 + 35, y + 1, 0); diff -r e9200bdeaccc -r a9a349b2b3fa share/hedgewars/Data/Graphics/AmmoMenu/TurnsLeft.png Binary file share/hedgewars/Data/Graphics/AmmoMenu/TurnsLeft.png has changed