- Small fixes
authorunc0rr
Thu, 16 Aug 2007 07:05:29 +0000
changeset 568 d0690b7aa808
parent 567 b6de36975a3c
child 569 4e41c9e9e4d1
- Small fixes - Parachute sprite
hedgewars/GSHandlers.inc
hedgewars/uAIMisc.pas
hedgewars/uConsts.pas
hedgewars/uGears.pas
share/hedgewars/Data/Graphics/Parachute.png
--- a/hedgewars/GSHandlers.inc	Sat Jul 21 16:35:12 2007 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Aug 16 07:05:29 2007 +0000
@@ -1042,7 +1042,7 @@
    with HHGear^ do
         begin
         Message:= 0;
-        SetLittle(dx);
+        SetLittle(dX);
         dY:= _0;
         State:= State and not (gstAttacking or gstAttacked);
         State:= State or gstMoving;
@@ -1065,6 +1065,8 @@
 else if (Gear^.Message and gm_Down) <> 0 then HHGear^.Y:= HHGear^.Y + cGravity * 40;
 
 HHGear^.Y:= HHGear^.Y + cGravity * 100;
+Gear^.X:= HHGear^.X;
+Gear^.Y:= HHGear^.Y
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/hedgewars/uAIMisc.pas	Sat Jul 21 16:35:12 2007 +0000
+++ b/hedgewars/uAIMisc.pas	Thu Aug 16 07:05:29 2007 +0000
@@ -338,7 +338,7 @@
    if Gear^.dY > _0_4 then
       begin
       Goinfo.FallPix:= 0;
-      HHJump(AltGear, jmpLJump, GoInfo); // try ljump enstead of fall with damage
+      HHJump(AltGear, jmpLJump, GoInfo); // try ljump instead of fall with damage
       exit(Result)
       end;
    Gear^.Y:= Gear^.Y + Gear^.dY;
--- a/hedgewars/uConsts.pas	Sat Jul 21 16:35:12 2007 +0000
+++ b/hedgewars/uConsts.pas	Thu Aug 16 07:05:29 2007 +0000
@@ -40,7 +40,7 @@
                    sprSky, sprAMBorders, sprAMSlot, sprAMSlotName, sprAMAmmos,
                    sprAMSlotKeys, sprAMSelection, sprFinger, sprAirBomb,
                    sprAirplane, sprAmAirplane, sprAmGirder, sprHHTelepMask,
-                   sprSwitch);
+                   sprSwitch, sprParachute);
 
      TGearType  = (gtCloud, gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
@@ -328,7 +328,9 @@
                      (FileName:    'hhMask'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
                      Width:  32; Height: 32; hasAlpha: false),// sprHHTelepMask
                      (FileName:    'Switch'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
-                     Width:  32; Height: 32; hasAlpha: false) // sprSwitch
+                     Width:  32; Height: 32; hasAlpha: false),// sprSwitch
+                     (FileName: 'Parachute'; Path: ptGraphics; AltPath: ptNone; Surface: nil;
+                     Width:  48; Height: 48; hasAlpha: true) // sprParachute
                      );
                      
       Soundz: array[TSound] of record
--- a/hedgewars/uGears.pas	Sat Jul 21 16:35:12 2007 +0000
+++ b/hedgewars/uGears.pas	Thu Aug 16 07:05:29 2007 +0000
@@ -566,7 +566,6 @@
      gtSmallDamage: if Gear^.Surf <> nil then DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Surf, Surface);
            gtGrave: DrawSpriteFromRect(PHedgehog(Gear^.Hedgehog)^.Team^.GraveRect, hwRound(Gear^.X) + WorldDx - 16, hwRound(Gear^.Y) + WorldDy - 16, 32, (GameTicks shr 7) and 7, Surface);
              gtUFO: DrawSprite(sprUFO, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, (GameTicks shr 7) mod 4, Surface);
-      gtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State, Surface);
             gtRope: begin
                     roplen:= 0;
                     if RopePoints.Count > 0 then
@@ -590,21 +589,23 @@
                        DrawSprite(sprRopeHook, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, DxDy2Angle32(Gear^.dY, Gear^.dX), Surface);
                        end;
                     end;
+      gtSmokeTrace: if Gear^.State < 8 then DrawSprite(sprSmokeTrace, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State, Surface);
        gtExplosion: DrawSprite(sprExplosion50, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.State, Surface);
             gtMine: if ((Gear^.State and gstAttacking) = 0)or((Gear^.Timer and $3FF) < 420)
                        then DrawSprite(sprMineOff , hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, hwRound(Gear^.DirAngle), Surface)
                        else DrawSprite(sprMineOn  , hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, hwRound(Gear^.DirAngle), Surface);
-        gtDynamite: DrawSprite2(sprDynamite, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, Gear^.Tag and 1, Gear^.Tag shr 1, Surface);
             gtCase: case Gear^.Pos of
                          posCaseAmmo  : DrawSprite(sprCase, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0, Surface);
                          posCaseHealth: DrawSprite(sprFAid, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 24 + WorldDy, (GameTicks shr 6) mod 13, Surface);
                          end;
+        gtDynamite: DrawSprite2(sprDynamite, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, Gear^.Tag and 1, Gear^.Tag shr 1, Surface);
      gtClusterBomb: DrawSprite(sprClusterBomb, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, hwRound(Gear^.DirAngle), Surface);
          gtCluster: DrawSprite(sprClusterParticle, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy, 0, Surface);
            gtFlame: DrawSprite(sprFlame, hwRound(Gear^.X) - 8 + WorldDx, hwRound(Gear^.Y) - 8 + WorldDy,(GameTicks div 128 + Gear^.Angle) mod 8, Surface);
-         gtAirBomb: DrawSprite(sprAirBomb , hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, DxDy2Angle32(Gear^.dY, Gear^.dX), Surface);
+       gtParachute: DrawSprite(sprParachute, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 48 + WorldDy, 0, Surface);
        gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 0, Surface)
                                      else DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 1, Surface);
+         gtAirBomb: DrawSprite(sprAirBomb , hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, DxDy2Angle32(Gear^.dY, Gear^.dX), Surface);
         gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, 0, Surface);
               end;
       Gear:= Gear^.NextGear
Binary file share/hedgewars/Data/Graphics/Parachute.png has changed