# HG changeset patch
# User nemo
# Date 1268490641 0
# Node ID 4213c6a8aceb86681ba76f7ae6c5f1236ff057c0
# Parent d0471586a616b9042805a141eff5dfd098682aba
Palewolf adds droplets to his splashes
diff -r d0471586a616 -r 4213c6a8aceb hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc Sat Mar 13 14:19:34 2010 +0000
+++ b/hedgewars/GSHandlers.inc Sat Mar 13 14:30:41 2010 +0000
@@ -46,6 +46,8 @@
function CheckGearDrowning(Gear: PGear): boolean;
var skipSpeed, skipAngle, skipDecay: hwFloat;
+ i, maxDrops: LongInt;
+ particle: PVisualGear;
begin
// probably needs tweaking. might need to be in a case statement based upon gear type
//(not Gear^.dY.isNegative) and this should not be necessary
@@ -75,7 +77,22 @@
end
end;
PlaySound(sndSplash);
- AddVisualGear(hwRound(Gear^.X), LAND_HEIGHT, vgtSplash);
+
+ if not cReducedQuality then
+ begin
+ AddVisualGear(hwRound(Gear^.X), LAND_HEIGHT, vgtSplash);
+
+ maxDrops := (Gear^.Radius div 2) + hwRound(Gear^.dX * Gear^.Radius * 2) + hwRound(Gear^.dY * Gear^.Radius * 2);
+ for i:= max(maxDrops div 3, min(32, Random(maxDrops))) downto 0 do
+ begin
+ particle := AddVisualGear(hwRound(Gear^.X) - 3 + Random(6), LAND_HEIGHT, vgtDroplet);
+ if particle <> nil then
+ begin
+ particle^.dX := particle^.dX + (Gear^.dX / 5);
+ particle^.dY := particle^.dY - (Gear^.dY / 5)
+ end
+ end
+ end;
end
else
CheckGearDrowning:= false
diff -r d0471586a616 -r 4213c6a8aceb hedgewars/uConsts.pas
--- a/hedgewars/uConsts.pas Sat Mar 13 14:19:34 2010 +0000
+++ b/hedgewars/uConsts.pas Sat Mar 13 14:30:41 2010 +0000
@@ -73,7 +73,7 @@
sprShoutCorner, sprShoutEdge, sprShoutTail,
sprSniperRifle, sprBubbles, sprJetpack, sprHealth, sprHandMolotov, sprMolotov,
sprSmoke, sprSmokeWhite, sprShell, sprDust, sprExplosives, sprExplosivesRoll,
- sprAmTeleport, sprSplash);
+ sprAmTeleport, sprSplash, sprDroplet);
TGearType = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag, // 3
gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope, // 8
@@ -89,7 +89,7 @@
TVisualGearType = (vgtFlake, vgtCloud, vgtExplPart, vgtExplPart2, vgtFire,
vgtSmallDamageTag, vgtTeamHealthSorter, vgtSpeechBubble, vgtBubble,
vgtSteam, vgtAmmo, vgtSmoke, vgtSmokeWhite, vgtHealth, vgtShell,
- vgtDust, vgtSplash);
+ vgtDust, vgtSplash, vgtDroplet);
TGearsType = set of TGearType;
@@ -108,7 +108,8 @@
sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
sndHomerun, sndMolotov, sndCover, sndUhOh, sndOops,
sndNooo, sndHello, sndRopeShot, sndRopeAttach, sndRopeRelease,
- sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity);
+ sndSwitchHog, sndVictory, sndSniperReload, sndSteps, sndLowGravity,
+ sndDroplet1, sndDroplet2, sndDroplet3);
TAmmoType = (amNothing, amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer,
amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip,
@@ -679,7 +680,9 @@
(FileName: 'amTeleport'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
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
+ Width: 128; Height: 64; imageWidth: 0; imageHeight: 0; saveSurf: false), // sprSplash
+ (FileName: 'Droplet'; Path: ptCurrTheme; AltPath: ptGraphics; Texture: nil; Surface: nil;
+ Width: 16; Height: 16; imageWidth: 0; imageHeight: 0; saveSurf: false) // sprDroplet
);
Wavez: array [TWave] of record
@@ -775,7 +778,10 @@
(FileName: 'victory.ogg'; Path: ptVoices),// sndVictory
(FileName: 'sniperreload.ogg'; Path: ptSounds),// sndSniperReload
(FileName: 'steps.ogg'; Path: ptSounds),// sndSteps
- (FileName: 'lowgravity.ogg'; Path: ptSounds) // sndLowGravity
+ (FileName: 'lowgravity.ogg'; Path: ptSounds),// sndLowGravity
+ (FileName: 'Droplet1.ogg'; Path: ptSounds),// sndDroplet1
+ (FileName: 'Droplet2.ogg'; Path: ptSounds),// sndDroplet2
+ (FileName: 'Droplet3.ogg'; Path: ptSounds) // sndDroplet3
);
Ammoz: array [TAmmoType] of record
diff -r d0471586a616 -r 4213c6a8aceb hedgewars/uVisualGears.pas
--- a/hedgewars/uVisualGears.pas Sat Mar 13 14:19:34 2010 +0000
+++ b/hedgewars/uVisualGears.pas Sat Mar 13 14:30:41 2010 +0000
@@ -272,6 +272,19 @@
dec(Gear^.FrameTicks, Steps);
end;
+procedure doStepDroplet(Gear: PVisualGear; Steps: Longword);
+begin
+ Gear^.X:= Gear^.X + Gear^.dX * Steps;
+
+ Gear^.Y:= Gear^.Y + Gear^.dY * Steps;
+ Gear^.dY:= Gear^.dY + cGravity * Steps;
+
+ if hwRound(Gear^.Y) > cWaterLine then begin
+ DeleteVisualGear(Gear);
+ PlaySound(TSound(ord(sndDroplet1) + Random(3)));
+ end;
+end;
+
////////////////////////////////////////////////////////////////////////////////
const cSorterWorkTime = 640;
var thexchar: array[0..cMaxTeams] of
@@ -410,7 +423,8 @@
@doStepHealth,
@doStepShell,
@doStepDust,
- @doStepSplash
+ @doStepSplash,
+ @doStepDroplet
);
function AddVisualGear(X, Y: LongInt; Kind: TVisualGearType): PVisualGear;
@@ -536,6 +550,14 @@
FrameTicks:= 740;
Frame:= 19;
end;
+ vgtDroplet: begin
+ dx:= _0_001 * (random(75) + 15);
+ dx.isNegative:= random(2) = 0;
+ dy:= _0_001 * (random(80) + 120);
+ dy.isNegative:= true;
+ FrameTicks:= 250 + random(1751);
+ Frame:= random(3)
+ end;
end;
if VisualGearsList <> nil then
@@ -631,6 +653,7 @@
glColor4f(1, 1, 1, 1);
end;
vgtSplash: DrawSprite(sprSplash, hwRound(Gear^.X) + WorldDx - 64, hwRound(Gear^.Y) + WorldDy - 72, 19 - (Gear^.FrameTicks div 37));
+ vgtDroplet: DrawSprite(sprDroplet, hwRound(Gear^.X) + WorldDx - 8, hwRound(Gear^.Y) + WorldDy - 8, Gear^.Frame);
end;
case Gear^.Kind of
vgtSmallDamageTag: DrawCentered(hwRound(Gear^.X) + WorldDx, hwRound(Gear^.Y) + WorldDy, Gear^.Tex);
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Graphics/Droplet.png
Binary file share/hedgewars/Data/Graphics/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Graphics/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Graphics/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,254 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Sounds/Droplet1.ogg
Binary file share/hedgewars/Data/Sounds/Droplet1.ogg has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Sounds/Droplet2.ogg
Binary file share/hedgewars/Data/Sounds/Droplet2.ogg has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Sounds/Droplet3.ogg
Binary file share/hedgewars/Data/Sounds/Droplet3.ogg has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Cake/Droplet.png
Binary file share/hedgewars/Data/Themes/Cake/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Cake/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Cake/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,261 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Castle/Droplet.png
Binary file share/hedgewars/Data/Themes/Castle/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Castle/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Castle/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,268 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Compost/Droplet.png
Binary file share/hedgewars/Data/Themes/Compost/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Compost/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Compost/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,275 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/CrazyMission/Droplet.png
Binary file share/hedgewars/Data/Themes/CrazyMission/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/CrazyMission/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/CrazyMission/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,282 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Desert/Droplet.png
Binary file share/hedgewars/Data/Themes/Desert/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Desert/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Desert/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,296 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Eyes/Droplet.png
Binary file share/hedgewars/Data/Themes/Eyes/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Eyes/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Eyes/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,289 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Halloween/Droplet.png
Binary file share/hedgewars/Data/Themes/Halloween/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Halloween/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Halloween/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,303 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Underwater/Droplet.png
Binary file share/hedgewars/Data/Themes/Underwater/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/Underwater/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/Underwater/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,317 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/deepspace/Droplet.png
Binary file share/hedgewars/Data/Themes/deepspace/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/deepspace/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/deepspace/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,289 @@
+
+
+
+
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/hell/Droplet.png
Binary file share/hedgewars/Data/Themes/hell/Droplet.png has changed
diff -r d0471586a616 -r 4213c6a8aceb share/hedgewars/Data/Themes/hell/Droplet.svg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Themes/hell/Droplet.svg Sat Mar 13 14:30:41 2010 +0000
@@ -0,0 +1,310 @@
+
+
+
+