Added egg sprite
authormbait
Sat, 27 Mar 2010 11:48:02 +0000
changeset 3102 3435cdc1e557
parent 3101 e128eff95fca
child 3103 7a12eef0245d
Added egg sprite
hedgewars/uConsts.pas
hedgewars/uGears.pas
--- a/hedgewars/uConsts.pas	Sat Mar 27 08:59:42 2010 +0000
+++ b/hedgewars/uConsts.pas	Sat Mar 27 11:48:02 2010 +0000
@@ -76,7 +76,7 @@
             sprAmTeleport, sprSplash, sprDroplet, sprBirdy, sprHandCake, sprHandConstruction,
             sprHandGrenade, sprHandMelon, sprHandMortar, sprHandSkip, sprHandCluster,
             sprHandDynamite, sprHandHellish, sprHandMine, sprHandSeduction, sprHandVamp,
-            sprBigExplosion, sprSmokeRing, sprBeeTrace);
+            sprBigExplosion, sprSmokeRing, sprBeeTrace, sprEgg);
 
     TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, // 3
             gtGrave, gtBee, gtShotgunShot, gtPickHammer, gtRope, // 8
@@ -721,7 +721,9 @@
             (FileName:  'SmokeRing'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
             Width:  200; Height: 200; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprSmokeRing
             (FileName:  'BeeTrace'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
-            Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprBeeTrace
+            Width:  16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprBeeTrace
+            (FileName:  'Egg'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+            Width:  8; Height: 8; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprEgg
             );
 
     Wavez: array [TWave] of record
--- a/hedgewars/uGears.pas	Sat Mar 27 08:59:42 2010 +0000
+++ b/hedgewars/uGears.pas	Sat Mar 27 11:48:02 2010 +0000
@@ -185,7 +185,7 @@
             @doStepCase,
             @doStepBirdy,
             @doStepBigExplosion,
-			@doStepEggWork
+            @doStepEggWork
             );
 
 procedure InsertGearToList(Gear: PGear);
@@ -449,7 +449,7 @@
        gtBirdy: begin
                 gear^.Radius:= 16; // todo: check
                 gear^.Timer:= 500;
-				gear^.Health := 2000;
+				        gear^.Health := 2000;
                 gear^.FlightTime := 2;
                 end;
 gtBigExplosion: begin
@@ -459,7 +459,6 @@
                 gear^.Radius:= 4;
                 gear^.Elasticity:= _0_6;
                 gear^.Friction:= _0_96;
-                gear^.RenderTimer:= true;
                 if gear^.Timer = 0 then gear^.Timer:= 3000
                 end;
      end;
@@ -1690,7 +1689,7 @@
                     DrawRotatedTextureF(SpritesData[sprBigExplosion].Texture, 0.85 * (-power(2, -4 * Int(Gear^.Timer)/250) + 1) + 0.4, 0, 0, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, 1, 385, 385, Gear^.Angle);
                     glColor4f(1, 1, 1, 1);
                     end;
-			   gtEgg: DrawRotated(sprBomb, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
+			   gtEgg: DrawRotated(sprEgg, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 0, Gear^.DirAngle);
          end;
       if Gear^.RenderTimer and (Gear^.Tex <> nil) then DrawCentered(hwRound(Gear^.X) + 8 + WorldDx, hwRound(Gear^.Y) + 8 + WorldDy, Gear^.Tex);
       Gear:= Gear^.NextGear