# HG changeset patch # User unc0rr # Date 1211842068 0 # Node ID 0cc31e998f4ea0fee38ee839c816dcd6c35ac400 # Parent 237fc147950c9a745a4f5a30fc11ec75e235bced Idle hedgehog animation diff -r 237fc147950c -r 0cc31e998f4e hedgewars/uConsts.pas --- a/hedgewars/uConsts.pas Mon May 26 20:41:12 2008 +0000 +++ b/hedgewars/uConsts.pas Mon May 26 22:47:48 2008 +0000 @@ -44,7 +44,7 @@ sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun, sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer, sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath, - sprShotgun, sprDEagle); + sprShotgun, sprDEagle, sprHHIdle); TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, @@ -383,7 +383,9 @@ (FileName:'amShotgun_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; Width: 64; Height: 64; saveSurf: false),// sprShotgun (FileName: 'amDEagle_w'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; - Width: 64; Height: 64; saveSurf: false) // sprDEagle + Width: 64; Height: 64; saveSurf: false),// sprDEagle + (FileName: 'Idle'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil; + Width: 32; Height: 32; saveSurf: false) // sprHHIdle ); Soundz: array[TSound] of record diff -r 237fc147950c -r 0cc31e998f4e hedgewars/uGears.pas --- a/hedgewars/uGears.pas Mon May 26 20:41:12 2008 +0000 +++ b/hedgewars/uGears.pas Mon May 26 22:47:48 2008 +0000 @@ -209,6 +209,7 @@ Result^.Elasticity:= _0_35; Result^.Friction:= _0_999; Result^.Angle:= cMaxAngle div 2; + Result^.Pos:= GetRandom(19); Result^.Z:= cHHZ; end; gtAmmo_Grenade: begin @@ -590,8 +591,7 @@ defaultPos:= false end else - if (Gear^.Message and (gm_Left or gm_Right) <> 0) - or ((Gear^.State and gstAttacked) <> 0) then + if (Gear^.Message and (gm_Left or gm_Right) <> 0) then begin DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy, hwSign(Gear^.dX), @@ -602,6 +602,7 @@ end else + if ((Gear^.State and gstAttacked) = 0) then begin amt:= CurrentHedgehog^.Ammo^[CurrentHedgehog^.CurSlot, CurrentHedgehog^.CurAmmo].AmmoType; case amt of @@ -645,10 +646,11 @@ end; if defaultPos then - DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy, + DrawRotatedF(sprHHIdle, + hwRound(Gear^.X) + 1 + WorldDx, + hwRound(Gear^.Y) - 3 + WorldDy, + (RealTicks div 256 + Gear^.Pos) mod 19, hwSign(Gear^.dX), - 0, - 3, 0); with PHedgehog(Gear^.Hedgehog)^ do diff -r 237fc147950c -r 0cc31e998f4e share/hedgewars/Data/Graphics/Hedgehog/Idle.png Binary file share/hedgewars/Data/Graphics/Hedgehog/Idle.png has changed