Basic gtTarget support
authorunc0rr
Mon, 10 Sep 2007 20:00:58 +0000
changeset 590 e816adf4a27f
parent 589 f382c41f658a
child 591 11b40565b851
Basic gtTarget support
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
hedgewars/uGears.pas
share/hedgewars/Data/Graphics/Target.png
--- a/hedgewars/GSHandlers.inc	Sun Sep 09 14:53:28 2007 +0000
+++ b/hedgewars/GSHandlers.inc	Mon Sep 10 20:00:58 2007 +0000
@@ -830,9 +830,12 @@
    x:= hwRound(Gear^.X);
    y:= hwRound(Gear^.Y);
    DeleteGear(Gear);
-   doMakeExplosion(x, y, 25, EXPLAutoSound);
-   for i:= 0 to 63 do
-       AddGear(x, y, gtFlame, 0, _0, _0, 0);
+   if Gear^.Kind = gtCase then
+      begin
+      doMakeExplosion(x, y, 25, EXPLAutoSound);
+      for i:= 0 to 63 do
+          AddGear(x, y, gtFlame, 0, _0, _0, 0);
+      end;
    exit
    end;
 
--- a/hedgewars/uConsts.pas	Sun Sep 09 14:53:28 2007 +0000
+++ b/hedgewars/uConsts.pas	Mon Sep 10 20:00:58 2007 +0000
@@ -40,7 +40,7 @@
                    sprSky, sprAMBorders, sprAMSlot, sprAMSlotName, sprAMAmmos,
                    sprAMSlotKeys, sprAMSelection, sprFinger, sprAirBomb,
                    sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask,
-                   sprSwitch, sprParachute);
+                   sprSwitch, sprParachute, sprTarget);
 
      TGearType  = (gtCloud, gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
@@ -48,7 +48,7 @@
                    gtTeamHealthSorter, gtClusterBomb, gtCluster, gtShover, gtFlame,
                    gtFirePunch, gtATStartGame, gtATSmoothWindCh, gtATFinishGame,
                    gtParachute, gtAirAttack, gtAirBomb, gtBlowTorch, gtGirder,
-                   gtTeleport, gtSmallDamage, gtSwitcher);
+                   gtTeleport, gtSmallDamage, gtSwitcher, gtTarget);
 
      TGearsType = set of TGearType;
 
@@ -330,7 +330,9 @@
                      (FileName:    'Switch'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
                      Width:  32; Height: 32; hasAlpha: false),// sprSwitch
                      (FileName: 'Parachute'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                     Width:  48; Height: 48; hasAlpha: true) // sprParachute
+                     Width:  48; Height: 48; hasAlpha: true),// sprParachute
+                     (FileName:    'Target'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
+                     Width:  32; Height: 32; hasAlpha:false) // sprTarget
                      );
                      
       Soundz: array[TSound] of record
--- a/hedgewars/uGears.pas	Sun Sep 09 14:53:28 2007 +0000
+++ b/hedgewars/uGears.pas	Mon Sep 10 20:00:58 2007 +0000
@@ -130,7 +130,8 @@
                                                                @doStepGirder,
                                                                @doStepTeleport,
                                                                @doStepHealthTag,
-                                                               @doStepSwitcher
+                                                               @doStepSwitcher,
+                                                               @doStepCase
                                                                );
 
 procedure InsertGearToList(Gear: PGear);
Binary file share/hedgewars/Data/Graphics/Target.png has changed