Whip animation
authorunc0rr
Wed, 18 Jun 2008 18:46:11 +0000
changeset 1010 583667e81d21
parent 1009 b1f335aed35a
child 1011 4fe2c4c57d10
Whip animation
hedgewars/uConsts.pas
hedgewars/uGears.pas
share/hedgewars/Data/Graphics/Hedgehog/amWhip.png
--- a/hedgewars/uConsts.pas	Wed Jun 18 18:25:31 2008 +0000
+++ b/hedgewars/uConsts.pas	Wed Jun 18 18:46:11 2008 +0000
@@ -45,7 +45,7 @@
                    sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
                    sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
                    sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
-                   sprHat, sprKamikaze);
+                   sprHat, sprKamikaze, sprWhip);
 
      TGearType  = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
@@ -393,7 +393,9 @@
                      (FileName:    'Samurai'; Path: ptHats    ; AltPath: ptNone; Texture: nil; Surface: nil;
                       Width:  32; Height: 32; saveSurf: false),// sprHat
                      (FileName: 'amKamikaze'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
-                      Width: 256; Height: 32; saveSurf: false) // sprKamikaze
+                      Width: 256; Height: 32; saveSurf: false),// sprKamikaze
+                     (FileName:     'amWhip'; Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
+                      Width: 128; Height: 32; saveSurf: false) // sprWhip
                      );
 
       Soundz: array[TSound] of record
--- a/hedgewars/uGears.pas	Wed Jun 18 18:25:31 2008 +0000
+++ b/hedgewars/uGears.pas	Wed Jun 18 18:46:11 2008 +0000
@@ -574,6 +574,15 @@
 				end;
 			gtPickHammer,
 			gtTeleport: defaultPos:= false;
+			gtWhip: begin
+				DrawRotatedF(sprWhip,
+						hwRound(Gear^.X) + 1 + WorldDx,
+						hwRound(Gear^.Y) - 3 + WorldDy,
+						1,
+						hwSign(Gear^.dX),
+						0);
+				defaultPos:= false
+				end;
 			gtKamikaze: begin
 						if CurAmmoGear^.Pos = 0 then
 							DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
@@ -666,6 +675,15 @@
 						1,
 						5,
 						0);
+			amWhip: begin
+				DrawRotatedF(sprWhip,
+						hwRound(Gear^.X) + 1 + WorldDx,
+						hwRound(Gear^.Y) - 3 + WorldDy,
+						0,
+						hwSign(Gear^.dX),
+						0);
+				defaultPos:= false
+				end;
 		else
 			DrawHedgehog(hwRound(Gear^.X) + 1 + WorldDx, hwRound(Gear^.Y) - 3 + WorldDy,
 				hwSign(Gear^.dX),
Binary file share/hedgewars/Data/Graphics/Hedgehog/amWhip.png has changed