# HG changeset patch # User unc0rr # Date 1212000885 0 # Node ID 18b05fc2d0a61e9ce859d794190eec7209c021f8 # Parent 92bb9fa046f9131f5fa55bb401797a769dea5a2b Mortar sprite diff -r 92bb9fa046f9 -r 18b05fc2d0a6 hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Wed May 28 18:40:42 2008 +0000 +++ b/hedgewars/uConsts.pas Wed May 28 18:54:45 2008 +0000 @@ -44,7 +44,7 @@ sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun, sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer, sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath, - sprShotgun, sprDEagle, sprHHIdle); + sprShotgun, sprDEagle, sprHHIdle, sprMortar); TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, @@ -385,7 +385,9 @@ (FileName: 'amDEagle_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 64; Height: 64; saveSurf: false),// sprDEagle (FileName: 'Idle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 32; Height: 32; saveSurf: false) // sprHHIdle + Width: 32; Height: 32; saveSurf: false),// sprHHIdle + (FileName: 'Mortar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 16; Height: 16; saveSurf: false) // sprMortar ); Soundz: array[TSound] of record diff -r 92bb9fa046f9 -r 18b05fc2d0a6 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed May 28 18:40:42 2008 +0000 +++ b/hedgewars/uGears.pas Wed May 28 18:54:45 2008 +0000 @@ -605,7 +605,8 @@ begin amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType; case amt of - amBazooka: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle); + amBazooka, + amMortar: DrawRotated(sprHandBazooka, hx, hy, hwSign(Gear^.dX), aangle); amRope: DrawRotated(sprHandRope, hx, hy, hwSign(Gear^.dX), aangle); amShotgun: DrawRotated(sprHandShotgun, hx, hy, hwSign(Gear^.dX), aangle); amDEagle: DrawRotated(sprHandDEagle, hx, hy, hwSign(Gear^.dX), aangle); @@ -821,6 +822,7 @@ end; gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, (GameTicks shr 6) mod 12); gtTarget: DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0); + gtMortar: DrawRotated(sprMortar, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, DxDy2Angle(Gear^.dY, Gear^.dX)); end; Gear:= Gear^.NextGear end; @@ -989,7 +991,7 @@ if (Gear <> nil) and (Gear^.X.QWordValue = 0) then begin FindPlace(Gear, false, t, t + 1024); - Gear^.Pos:= GetRandom(19); + Gear^.Pos:= GetRandom(19) end; inc(t, 1024) end @@ -1012,6 +1014,7 @@ begin i:= GetRandom(Count); FindPlace(ar[i], false, 0, 2048); + ar[i]^.Pos:= GetRandom(19); ar[i]:= ar[Count - 1]; dec(Count) end diff -r 92bb9fa046f9 -r 18b05fc2d0a6 share/hedgewars/Data/Graphics/Mortar.png Binary file share/hedgewars/Data/Graphics/Mortar.png has changed