hedgewars/uConsts.pas
changeset 2602 3deb9ff104da
parent 2599 c7153d2348f3
child 2603 abed6070a669
--- a/hedgewars/uConsts.pas	Thu Nov 05 20:40:31 2009 +0000
+++ b/hedgewars/uConsts.pas	Thu Nov 05 20:47:42 2009 +0000
@@ -84,7 +84,8 @@
 
 	TGearsType = set of TGearType;
 
-	TSound = (sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
+	TSound = (sndNone,
+			sndGrenadeImpact, sndExplosion, sndThrowPowerUp, sndThrowRelease,
 			sndSplash, sndShotgunReload, sndShotgunFire, sndGraveImpact,
 			sndMineTick, sndPickhammer, sndGun, sndUFO, sndJump1, sndJump2,
 			sndJump3, sndYesSir, sndLaugh, sndIllGetYou, sndIncoming,
@@ -96,7 +97,8 @@
 			sndMelon, sndHellish, sndYoohoo, sndRCPlane, sndWhipCrack,
 			sndRideOfTheValkyries, sndDenied, sndPlaced, sndBaseballBat,
 			sndVaporize, sndWarp, sndSuddenDeath, sndMortar, sndShutter,
-			sndHomerun, sndMolotov);
+			sndHomerun, sndMolotov, sndWalking, sndCover, sndUhOh,
+			sndOops, sndNooo, sndHello);
 
 	TAmmoType  = (amNothing, amGrenade, amClusterBomb, amBazooka, amUFO, amShotgun, amPickHammer,
 			amSkip, amRope, amMine, amDEagle, amDynamite, amFirePunch, amWhip,
@@ -131,6 +133,7 @@
 			Timer: LongWord;
 			Pos: LongWord;
 			AmmoType: TAmmoType;
+			AttackVoice: TSound;
 			end;
 
 	TVertex2f = record
@@ -207,6 +210,7 @@
 
     COLOR_LAND           = $FFFF;  // white
     COLOR_INDESTRUCTIBLE = $88FF;  // red
+	COLOR_OBJECT         = $44FF;
 
     //some opengl headers do not have these macros
     GL_BGR  = $80E0;
@@ -647,20 +651,23 @@
 			FramesCount: Longword;
 			Interval: Longword;
 			cmd: String[20];
+			Voice: TSound;
+			VoiceDelay: ShortInt;
 			end = (
-			(Sprite:   sprKowtow; FramesCount: 12; Interval: 125; cmd: '/rollup'),
-			(Sprite:      sprSad; FramesCount: 14; Interval: 125; cmd: '/sad'),
-			(Sprite:     sprWave; FramesCount: 16; Interval: 125; cmd: '/wave'),
-			(Sprite:   sprHurrah; FramesCount: 14; Interval: 125; cmd: '/hurrah'),
-			(Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'),
-			(Sprite:    sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'),
-			(Sprite:   sprJuggle; FramesCount: 49; Interval:  38; cmd: '/juggle')
+			(Sprite:   sprKowtow; FramesCount: 12; Interval: 125; cmd: '/rollup'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:      sprSad; FramesCount: 14; Interval: 125; cmd: '/sad'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:     sprWave; FramesCount: 16; Interval: 125; cmd: '/wave'; Voice: sndHello; VoiceDelay: 5),
+			(Sprite:   sprHurrah; FramesCount: 14; Interval: 125; cmd: '/hurrah'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite: sprLemonade; FramesCount: 24; Interval: 125; cmd: '/ilovelotsoflemonade'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:    sprShrug; FramesCount: 24; Interval: 125; cmd: '/shrug'; Voice: sndNone; VoiceDelay: 0),
+			(Sprite:   sprJuggle; FramesCount: 49; Interval:  38; cmd: '/juggle'; Voice: sndNone; VoiceDelay: 0)
 			);
 
 	Soundz: array[TSound] of record
 			FileName: String[25];
 			Path    : TPathType;
 			end = (
+			(FileName:                         ''; Path: ptSounds),// sndNone
 			(FileName:        'grenadeimpact.ogg'; Path: ptSounds),// sndGrenadeImpact
 			(FileName:            'explosion.ogg'; Path: ptSounds),// sndExplosion
 			(FileName:         'throwpowerup.ogg'; Path: ptSounds),// sndThrowPowerUp
@@ -719,7 +726,13 @@
 			(FileName:               'mortar.ogg'; Path: ptSounds),// sndMortar
 			(FileName:         'shutterclick.ogg'; Path: ptSounds),// sndShutter
 			(FileName:              'homerun.ogg'; Path: ptSounds),// sndHomerun
-			(FileName:              'molotov.ogg'; Path: ptSounds) // sndMolotov
+			(FileName:              'molotov.ogg'; Path: ptSounds),// sndMolotov
+			(FileName:              'walking.ogg'; Path: ptSounds),// sndWalking
+			(FileName:            'Takecover.ogg'; Path: ptVoices),// sndCover
+			(FileName:                'Uh-oh.ogg'; Path: ptVoices),// sndUhOh
+			(FileName:                 'Oops.ogg'; Path: ptVoices),// sndOops
+			(FileName:                 'Nooo.ogg'; Path: ptVoices),// sndNooo
+			(FileName:                'Hello.ogg'; Path: ptVoices) // sndHello
 			);
 
 	Ammoz: array [TAmmoType] of record
@@ -746,7 +759,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amNothing);
+					AmmoType: amNothing;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -766,7 +780,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amGrenade);
+					AmmoType: amGrenade;
+					AttackVoice: sndCover);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -786,7 +801,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amClusterBomb);
+					AmmoType: amClusterBomb;
+					AttackVoice: sndCover);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -805,7 +821,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amBazooka);
+					AmmoType: amBazooka;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -825,7 +842,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amUFO);
+					AmmoType: amUFO;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -843,7 +861,8 @@
 					NumPerTurn: 1;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amShotgun);
+					AmmoType: amShotgun;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -864,7 +883,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amPickHammer);
+					AmmoType: amPickHammer;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -883,7 +903,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSkip);
+					AmmoType: amSkip;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -903,7 +924,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amRope);
+					AmmoType: amRope;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -924,7 +946,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amMine);
+					AmmoType: amMine;
+					AttackVoice: sndLaugh);
 			Slot: 4;
 			TimeAfterTurn: 5000;
 			minAngle: 0;
@@ -942,7 +965,8 @@
 					NumPerTurn: 3;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amDEagle);
+					AmmoType: amDEagle;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -963,7 +987,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amDynamite);
+					AmmoType: amDynamite;
+					AttackVoice: sndLaugh);
 			Slot: 4;
 			TimeAfterTurn: 5000;
 			minAngle: 0;
@@ -983,7 +1008,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amFirePunch);
+					AmmoType: amFirePunch;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 3000;
 			MinAngle: 0;
@@ -1001,7 +1027,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amWhip);
+					AmmoType: amWhip;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 3000;
 			MinAngle: 0;
@@ -1019,7 +1046,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amBaseballBat);
+					AmmoType: amBaseballBat;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 5000;
 			minAngle: 0;
@@ -1041,7 +1069,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amParachute);
+					AmmoType: amParachute;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1063,7 +1092,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amAirAttack);
+					AmmoType: amAirAttack;
+					AttackVoice: sndIncoming);
 			Slot: 5;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1085,7 +1115,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amMineStrike);
+					AmmoType: amMineStrike;
+					AttackVoice: sndNone);
 			Slot: 5;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1103,7 +1134,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amBlowTorch);
+					AmmoType: amBlowTorch;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 3000;
 			minAngle: 768;
@@ -1123,7 +1155,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amGirder);
+					AmmoType: amGirder;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1145,7 +1178,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amTeleport);
+					AmmoType: amTeleport;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1165,7 +1199,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSwitch);
+					AmmoType: amSwitch;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1183,7 +1218,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amMortar);
+					AmmoType: amMortar;
+					AttackVoice: sndNone);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1203,7 +1239,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amKamikaze);
+					AmmoType: amKamikaze;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1223,7 +1260,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amCake);
+					AmmoType: amCake;
+					AttackVoice: sndLaugh);
 			Slot: 4;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1241,7 +1279,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSeduction);
+					AmmoType: amSeduction;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1261,7 +1300,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amWatermelon);
+					AmmoType: amWatermelon;
+					AttackVoice: sndMelon);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1280,7 +1320,8 @@
 					NumPerTurn: 0;
 					Timer: 5000;
 					Pos: 0;
-					AmmoType: amHellishBomb);
+					AmmoType: amHellishBomb;
+					AttackVoice: sndNone);
 			Slot: 4;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1302,7 +1343,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amNapalm);
+					AmmoType: amNapalm;
+					AttackVoice: sndNone);
 			Slot: 5;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1321,7 +1363,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amDrill);
+					AmmoType: amDrill;
+					AttackVoice: sndNone);
 			Slot: 0;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1340,7 +1383,8 @@
 					NumPerTurn: 0;
 					Timer: 5001;
 					Pos: 0;
-					AmmoType: amBallgun);
+					AmmoType: amBallgun;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1360,7 +1404,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amRCPlane);
+					AmmoType: amRCPlane;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1381,7 +1426,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amLowGravity);
+					AmmoType: amLowGravity;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1402,7 +1448,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amExtraDamage);
+					AmmoType: amExtraDamage;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1423,7 +1470,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amInvulnerable);
+					AmmoType: amInvulnerable;
+					AttackVoice: sndNone);
 			Slot: 8;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1444,7 +1492,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amExtraTime);
+					AmmoType: amExtraTime;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1465,7 +1514,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amLaserSight);
+					AmmoType: amLaserSight;
+					AttackVoice: sndNone);
 			Slot: 7;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1486,7 +1536,8 @@
 					NumPerTurn: 0;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amVampiric);
+					AmmoType: amVampiric;
+					AttackVoice: sndNone);
 			Slot: 6;
 			TimeAfterTurn: 0;
 			minAngle: 0;
@@ -1504,7 +1555,8 @@
 					NumPerTurn: 1;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amSniperRifle);
+					AmmoType: amSniperRifle;
+					AttackVoice: sndNone);
 			Slot: 2;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1526,7 +1578,8 @@
 					NumPerTurn: 1;
 					Timer: 0;
 					Pos: 0;
-					AmmoType: amJetpack);
+					AmmoType: amJetpack;
+					AttackVoice: sndNone);
 			Slot: 3;
 			TimeAfterTurn: 3000;
 			minAngle: 0;
@@ -1546,7 +1599,8 @@
 					NumPerTurn: 0;
 					Timer: 3000;
 					Pos: 0;
-					AmmoType: amMolotov);
+					AmmoType: amMolotov;
+					AttackVoice: sndNone);
 			Slot: 1;
 			TimeAfterTurn: 3000;
 			minAngle: 0;