Update explosion graphics
authorunc0rr
Fri, 04 Jul 2008 21:20:17 +0000
changeset 1047 ca7078116c0c
parent 1046 c22d833c3ae2
child 1048 4e04200f2cda
Update explosion graphics
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
hedgewars/uVisualGears.pas
share/hedgewars/Data/Graphics/ExplPart2.png
share/hedgewars/Data/Graphics/Flame.png
--- a/hedgewars/GSHandlers.inc	Fri Jul 04 19:25:00 2008 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Jul 04 21:20:17 2008 +0000
@@ -796,8 +796,9 @@
 procedure doStepExplosion(Gear: PGear);
 var i: LongWord;
 begin
-for i:= 0 to 15 do AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFire);
-for i:= 0 to 15 do AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtExplPart);
+for i:= 0 to 31 do AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtFire);
+for i:= 0 to 8 do AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtExplPart);
+for i:= 0 to 8 do AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtExplPart2);
 Gear^.doStep:= @doStepExplosionWork
 end;
 
--- a/hedgewars/uConsts.pas	Fri Jul 04 19:25:00 2008 +0000
+++ b/hedgewars/uConsts.pas	Fri Jul 04 21:20:17 2008 +0000
@@ -46,7 +46,7 @@
                    sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
                    sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
                    sprHat, sprKamikaze, sprWhip, sprKowtow, sprSad, sprWave,
-                   sprHurrah, sprLemonade, sprExplPart);
+                   sprHurrah, sprLemonade, sprExplPart, sprExplPart2);
 
      TGearType  = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
@@ -57,7 +57,7 @@
                    gtTeleport, gtSmallDamage, gtSwitcher, gtTarget, gtMortar,
                    gtWhip, gtKamikaze);
 
-     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtFire);
+     TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire);
 
      TGearsType = set of TGearType;
 
@@ -413,7 +413,9 @@
                      (FileName:'ILoveLemonade';Path: ptHedgehog; AltPath: ptNone; Texture: nil; Surface: nil;
                       Width: 128; Height: 32; saveSurf: false),// sprLemonade
                      (FileName:   'ExplPart'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
-                      Width:  32; Height: 32; saveSurf: false) // sprExplPart
+                      Width:  32; Height: 32; saveSurf: false),// sprExplPart
+                     (FileName:  'ExplPart2'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
+                      Width:  32; Height: 32; saveSurf: false) // sprExplPart2
                      );
 
 	Wavez: array [TWave] of record
--- a/hedgewars/uVisualGears.pas	Fri Jul 04 19:25:00 2008 +0000
+++ b/hedgewars/uVisualGears.pas	Fri Jul 04 21:20:17 2008 +0000
@@ -50,7 +50,7 @@
 
 implementation
 uses uWorld, uMisc, uStore;
-const cExplFrameTicks = 80;
+const cExplFrameTicks = 110;
 
 // ==================================================================
 procedure doStepFlake(Gear: PVisualGear; Steps: Longword);
@@ -123,6 +123,7 @@
                           @doStepFlake,
                           @doStepCloud,
                           @doStepExpl,
+                          @doStepExpl,
                           @doStepFire
                         );
 
@@ -159,10 +160,11 @@
                dy.QWordValue:= 21474836 + random(64424509);
                mdY:= dy.QWordValue
                end;
-  vgtExplPart: with Result^ do
+  vgtExplPart,
+ vgtExplPart2: with Result^ do
                begin
                t:= random(1024);
-               sp:= _0_001 * (random(80) + 85);
+               sp:= _0_001 * (random(95) + 70);
                dx:= AngleSin(t) * sp;
                dx.isNegative:= random(2) = 0;
                dy:= AngleCos(t) * sp;
@@ -178,7 +180,7 @@
                dx.isNegative:= random(2) = 0;
                dy:= AngleCos(t) * sp;
                dy.isNegative:= random(2) = 0;
-               FrameTicks:= 400 + random(200);
+               FrameTicks:= 650 + random(250);
                Frame:= random(8)
                end;
      end;
@@ -236,6 +238,7 @@
 		begin
 		case Gear^.Kind of
 			vgtExplPart: DrawSprite(sprExplPart, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 7 - Gear^.Frame);
+			vgtExplPart2: DrawSprite(sprExplPart2, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, 7 - Gear^.Frame);
 			vgtFire: DrawSprite(sprFlame, hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, (RealTicks div 64 + Gear^.Frame) mod 8);
 			end;
 		Gear:= Gear^.NextGear
Binary file share/hedgewars/Data/Graphics/ExplPart2.png has changed
Binary file share/hedgewars/Data/Graphics/Flame.png has changed