--- a/hedgewars/GSHandlers.inc Thu Mar 11 04:31:50 2010 +0000
+++ b/hedgewars/GSHandlers.inc Thu Mar 11 17:56:26 2010 +0000
@@ -74,7 +74,8 @@
AddCaption(Format(GetEventString(eidDrowned), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage);
end
end;
- PlaySound(sndSplash)
+ PlaySound(sndSplash);
+ AddVisualGear(hwRound(Gear^.X), LAND_HEIGHT, vgtSplash);
end
else
CheckGearDrowning:= false
--- a/hedgewars/uConsts.pas Thu Mar 11 04:31:50 2010 +0000
+++ b/hedgewars/uConsts.pas Thu Mar 11 17:56:26 2010 +0000
@@ -72,7 +72,8 @@
sprThoughtCorner, sprThoughtEdge, sprThoughtTail,
sprShoutCorner, sprShoutEdge, sprShoutTail,
sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov,
- sprSmoke, sprSmokeWhite, sprShell, sprDust, sprExplosives, sprExplosivesRoll, sprAmTeleport);
+ sprSmoke, sprSmokeWhite, sprShell, sprDust, sprExplosives, sprExplosivesRoll,
+ sprAmTeleport, sprSplash);
TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, // 3
gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, // 8
@@ -87,7 +88,8 @@
TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
- vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell, vgtDust);
+ vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell,
+ vgtDust, vgtSplash);
TGearsType = set of TGearType;
@@ -675,7 +677,9 @@
(FileName: 'ExplosivesRoll'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
Width: 48; Height: 48; imageWidth: 0; imageHeight: 0; saveSurf: false),// sprExplosivesRoll
(FileName: 'amTeleport'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
- Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprAmTeleport
+ Width: 64; Height: 32; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprAmTeleport
+ (FileName: 'Splash'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 128; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprSplash
);
Wavez: array [TWave] of record
--- a/hedgewars/uVisualGears.pas Thu Mar 11 04:31:50 2010 +0000
+++ b/hedgewars/uVisualGears.pas Thu Mar 11 17:56:26 2010 +0000
@@ -264,6 +264,14 @@
else dec(Gear^.FrameTicks, Steps)
end;
+procedure doStepSplash(Gear: PVisualGear; Steps: Longword);
+begin
+ if Gear^.FrameTicks <= Steps then
+ DeleteVisualGear(Gear)
+ else
+ dec(Gear^.FrameTicks, Steps);
+end;
+
////////////////////////////////////////////////////////////////////////////////
const cSorterWorkTime = 640;
var thexchar: array[0..cMaxTeams] of
@@ -401,7 +409,8 @@
@doStepSmoke,
@doStepHealth,
@doStepShell,
- @doStepDust
+ @doStepDust,
+ @doStepSplash
);
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear;
@@ -520,6 +529,13 @@
Frame:= 7 - random(2);
FrameTicks:= random(20) + 15;
end;
+ vgtSplash: begin
+ dx:= _0;
+ dx.isNegative:= false;
+ dy:= _0;
+ FrameTicks:= 740;
+ Frame:= 19;
+ end;
end;
if VisualGearsList <> nil then
@@ -614,6 +630,7 @@
if Gear^.FrameTicks < 250 then
glColor4f(1, 1, 1, 1);
end;
+ vgtSplash: DrawSprite(sprSplash, hwRound(Gear^.X) + WorldDx - 64, hwRound(Gear^.Y) + WorldDy - 72, 19 - (Gear^.FrameTicks div 37));
end;
case Gear^.Kind of
vgtSmallDamageTag: DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex);