Use new sounds
authorunc0rr
Fri, 19 Sep 2008 20:41:53 +0000
changeset 1279 33cae6d1635c
parent 1278 b3ddf84912b7
child 1280 2ca5484725ba
Use new sounds
hedgewars/GSHandlers.inc
hedgewars/uConsts.pas
hedgewars/uGears.pas
--- a/hedgewars/GSHandlers.inc	Fri Sep 19 20:36:59 2008 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Sep 19 20:41:53 2008 +0000
@@ -160,9 +160,13 @@
 CalcRotationDirAngle(Gear);
 
 if Gear^.Kind = gtHellishBomb then
+	begin
+	if Gear^.Timer = 3000 then PlaySound(sndHellish, false);
+
 	if (GameTicks and $3F) = 0 then
 		if (Gear^.State and gstCollision) = 0 then
 			AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtEvilTrace, 0, _0, _0, 0);
+	end;
 
 if (Gear^.State and (gstCollision or gstMoving)) = (gstCollision or gstMoving) then
 	if (hwAbs(Gear^.dX) > _0_1) or
@@ -170,6 +174,13 @@
 		PlaySound(sndGrenadeImpact, false)
 end;
 
+procedure doStepWatermelon(Gear: PGear);
+begin
+AllInactive:= false;
+PlaySound(sndMelon, false);
+Gear^.doStep:= @doStepBomb
+end;
+
 procedure doStepCluster(Gear: PGear);
 begin
 AllInactive:= false;
@@ -1149,6 +1160,8 @@
 Gear^.dY:= - _0_9;
 Gear^.doStep:= @doStepFirePunchWork;
 DrawTunnel(HHGear^.X - int2hwFloat(cHHRadius), HHGear^.Y + _1, _0_5, _0, cHHRadius * 4, 5);
+
+PlaySound(TSound(ord(sndFirePunch1) + GetRandom(6)), false)
 end;
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/hedgewars/uConsts.pas	Fri Sep 19 20:36:59 2008 +0000
+++ b/hedgewars/uConsts.pas	Fri Sep 19 20:41:53 2008 +0000
@@ -71,7 +71,9 @@
 			sndMissed, sndStupid, sndFirstBlood, sndBoring, sndByeBye,
 			sndSameTeam, sndNutter, sndReinforce, sndTraitor, sndRegret,
 			sndEnemyDown, sndCoward, sndHurry, sndWatchIt, sndKamikaze,
-			sndCake, sndOw1, sndOw4);
+			sndCake, sndOw1, sndOw4, sndFirePunch1, sndFirePunch2,
+			sndFirePunch3, sndFirePunch4, sndFirePunch5, sndFirePunch6,
+			sndMelon, sndHellish);
 
 	TAmmoType  = (amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer,
 			amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip,
@@ -490,7 +492,15 @@
 			(FileName:      'Kamikaze.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndKamikaze
 			(FileName:         'cake2.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndCake
 			(FileName:           'Ow1.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndOw1
-			(FileName:           'Ow4.ogg'; Path: ptVoices; id: nil; lastChan: 0) // sndOw4
+			(FileName:           'Ow4.ogg'; Path: ptVoices; id: nil; lastChan: 0),// sndOw4
+			(FileName:    'Firepunch1.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndFirepunch1
+			(FileName:    'Firepunch2.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndFirepunch2
+			(FileName:    'Firepunch3.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndFirepunch3
+			(FileName:    'Firepunch4.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndFirepunch4
+			(FileName:    'Firepunch5.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndFirepunch5
+			(FileName:    'Firepunch6.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndFirepunch6
+			(FileName:         'Melon.ogg'; Path: ptSounds; id: nil; lastChan: 0),// sndMelon
+			(FileName:       'Hellish.ogg'; Path: ptSounds; id: nil; lastChan: 0) // sndHellish
 			);
 
 	Ammoz: array [TAmmoType] of record
--- a/hedgewars/uGears.pas	Fri Sep 19 20:36:59 2008 +0000
+++ b/hedgewars/uGears.pas	Fri Sep 19 20:41:53 2008 +0000
@@ -140,7 +140,7 @@
 			@doStepKamikaze,
 			@doStepCake,
 			@doStepSeduction,
-			@doStepBomb,
+			@doStepWatermelon,
 			@doStepCluster,
 			@doStepBomb,
 			@doStepSmokeTrace