2 * $Logfile: /Freespace2/code/Gamesnd/GameSnd.h $
7 * Routines to keep track of which sound files go where
10 * Revision 1.1 2002/05/03 03:28:12 root
14 * 15 9/12/99 8:09p Dave
15 * Fixed problem where skip-training button would cause mission messages
16 * not to get paged out for the current mission.
18 * 14 9/09/99 11:40p Dave
19 * Handle an Assert() in beam code. Added supernova sounds. Play the right
20 * 2 end movies properly, based upon what the player did in the mission.
22 * 13 8/27/99 11:59a Jefff
23 * changed some sound names to better reflect new uses
25 * 12 8/26/99 9:45a Dave
26 * First pass at easter eggs and cheats.
28 * 11 7/19/99 11:47a Jefff
29 * Added sound hook for countermeasure success
31 * 10 7/02/99 4:31p Dave
32 * Much more sophisticated lightning support.
34 * 9 7/01/99 11:44a Dave
35 * Updated object sound system to allow multiple obj sounds per ship.
36 * Added hit-by-beam sound. Added killed by beam sound.
38 * 8 6/25/99 3:08p Dave
39 * Multiple flyby sounds.
41 * 7 6/18/99 5:16p Dave
42 * Added real beam weapon lighting. Fixed beam weapon sounds. Added MOTD
43 * dialog to PXO screen.
45 * 6 4/19/99 11:01p Dave
46 * More sophisticated targeting laser support. Temporary checkin.
48 * 5 2/04/99 6:29p Dave
49 * First full working rev of FS2 PXO support. Fixed Glide lighting
52 * 4 1/29/99 12:47a Dave
53 * Put in sounds for beam weapon. A bunch of interface screens (tech
56 * 3 10/26/98 9:42a Dave
57 * Early flak gun support.
59 * 2 10/07/98 10:52a Dave
62 * 1 10/07/98 10:48a Dave
64 * 76 5/18/98 12:59a Lawrance
65 * Replace shockwave impact sound with a new "whoosh" sound that
66 * originates from the shockwave center
68 * 75 5/06/98 10:29a Dave
69 * Put in support for panning sounds. Put in new sound hooks for main hall
72 * 74 4/27/98 3:36p Dave
74 * 73 4/25/98 1:25p Lawrance
75 * Make function for playing generic error beep
77 * 72 4/19/98 9:33p Lawrance
78 * Added sound hooks for Shivan flyby sound, subspace ambient effect
80 * 71 3/23/98 4:13p Lawrance
81 * Add hooks for captial ship specific warp sounds
83 * 70 3/21/98 3:34p Lawrance
84 * Added highlight icon sound, added static sound for briefing cut
86 * 69 3/17/98 5:55p Lawrance
87 * Support object-linked sounds for asteroids.
89 * 68 3/17/98 3:53p Lawrance
90 * First pass at weapon flyby sounds
92 * 67 3/16/98 5:54p Lawrance
93 * Play cargo scanning sound
95 * 66 3/05/98 10:18p Lawrance
96 * Play voice cue sound when there is no voice file present
98 * 65 2/19/98 4:33p Lawrance
99 * add asteroid sound hooks
101 * 64 2/12/98 4:59p Lawrance
102 * Add new sound hooks for subsystem explosions, and subsystems getting
105 * 63 2/11/98 5:32p Dave
106 * Put in hooks for 3 random intercom sounds in the main hall.
108 * 62 2/06/98 11:33a Dave
109 * Made sounds customizable through sounds.tbl
111 * 61 2/04/98 6:08p Lawrance
112 * Add a light collision sound, overlay a shield collide sound if
115 * 60 1/30/98 11:48a John
116 * Made debris arcs cast light. Added sound effects for them.
118 * 59 1/11/98 11:14p Lawrance
119 * Preload sounds that we expect will get played.
121 * 58 1/07/98 11:10a Lawrance
122 * Add new several new sound hooks.
124 * 57 12/24/97 8:54p Lawrance
125 * Integrating new popup code
127 * 56 12/09/97 11:31a Lawrance
128 * add missile launch warnings, re-work proximity beep
130 * 55 12/05/97 2:39p Lawrance
131 * added some different sounds to main hall, add support for looping
134 * 54 12/03/97 4:58p Hoffoss
136 * 53 12/03/97 4:16p Hoffoss
137 * Changed sound stuff used in interface screens for interface purposes.
139 * 52 12/01/97 5:25p Hoffoss
140 * Routed interface sound playing through a special function that will
141 * only allow one instance of the sound to play at a time, avoiding
142 * over-mixing problems.
144 * 51 11/20/97 5:36p Dave
145 * Hooked in a bunch of main hall changes (including sound). Made it
146 * possible to reposition (rewind/ffwd)
147 * sound buffer pointers. Fixed animation direction change framerate
150 * 50 11/11/97 10:25p Lawrance
151 * add sound hook for when missile threat flashes
153 * 49 11/03/97 11:08p Lawrance
154 * Add sound for collisions with shields.
156 * 48 11/03/97 2:07p Lawrance
157 * add ship-to-ship collision sound
159 * 47 10/28/97 4:49p Lawrance
160 * add sound hook that gets played when player warps out
162 * 46 10/27/97 10:48p Lawrance
163 * add second explosion sound
165 * 45 10/11/97 6:39p Lawrance
166 * added sound hooks for static sound
168 * 44 10/10/97 7:45p Lawrance
169 * add warp fail sound
171 * 43 9/19/97 2:45p Lawrance
172 * add hook for weapon animation sound
174 * 42 9/12/97 4:02p John
175 * put in ship warp out effect.
176 * put in dynamic lighting for warp in/out
178 * 41 9/07/97 10:01p Lawrance
179 * add some interface hooks
181 * 40 9/05/97 4:59p Lawrance
182 * added warp sound hook
184 * 39 9/03/97 5:05p Lawrance
185 * add support for ship flyby sound
187 * 38 8/25/97 12:25a Lawrance
188 * added sound for when shield energy is transferred between quadrants
190 * 37 8/18/97 5:28p Lawrance
191 * added some new interface sounds
193 * 36 8/12/97 5:52p Lawrance
194 * added hook for lock warning from aspect missile
196 * 35 8/11/97 9:48p Lawrance
197 * add sound hook for swarm missile
199 * 34 8/06/97 10:27a Lawrance
200 * added hook for shockwave create sound
202 * 33 7/17/97 10:50a Lawrance
203 * create a Shivan light laser so sound can be assigned
205 * 32 6/24/97 11:47p Lawrance
206 * add briefing sound fx
208 * 31 6/24/97 3:14p Lawrance
209 * add briefing sounds
211 * 30 6/13/97 4:44p Lawrance
212 * added another sound hook in ship selection
214 * 29 6/12/97 5:15p Lawrance
215 * added hook for ambient sound in briefing/ship select
217 * 28 6/05/97 11:25a Lawrance
218 * use sound signatures to ensure correct sound is loaded
220 * 27 6/05/97 1:07a Lawrance
221 * changes to support sound interface
223 * 26 6/04/97 1:18p Lawrance
224 * added hooks for shield impacts
226 * 25 5/23/97 11:20a Lawrance
227 * counter measure sounds specified in weapons.tbl
229 * 24 5/22/97 12:04p Lawrance
230 * added soundhook for cmeasure cycle
232 * 23 5/16/97 11:33a Lawrance
233 * add countermeasures and rearm sounds
235 * 22 5/14/97 11:24a Lawrance
236 * break up docking sound effect into an approach/depart and attach/detach
238 * 21 5/14/97 11:09a Lawrance
239 * add hooks for sounds played when player is hit by lasers or missiles
241 * 20 5/14/97 9:54a Lawrance
242 * supporting mission-specific briefing music
244 * 19 5/13/97 3:09p Lawrance
245 * added repair/rearm sound
247 * 18 5/13/97 10:44a Lawrance
248 * add several new sound effects
250 * 17 5/12/97 11:58a Lawrance
251 * removed obsolete sound
253 * 16 5/06/97 2:12p Lawrance
254 * rearrange order of sounds
256 * 15 5/06/97 9:36a Lawrance
257 * added support for min and max distances for 3d sounds
259 * 14 4/23/97 5:19p Lawrance
260 * split up misc sounds into: gamewide, ingame, and interface
262 * 13 4/20/97 11:48a Lawrance
263 * added array of filenames for misc sounds. Will be useful if we want to
264 * unload then re-load sounds
266 * 12 4/18/97 2:54p Lawrance
267 * sounds now have a default volume, when playing, pass a scaling factor
268 * not the actual volume
270 * 11 4/15/97 2:49p Lawrance
273 * 10 3/26/97 11:27a Lawrance
274 * added hooks for sounds to be played when trying to fire missles when
275 * none left / trying to fire lasers with no energy
277 * 9 3/19/97 5:53p Lawrance
278 * integrating new Misc_sounds[] array (replaces old Game_sounds
281 * 8 3/17/97 3:47p Mike
282 * Homing missile lock sound.
283 * More on AI ships firing missiles.
285 * 7 3/10/97 8:54a Lawrance
286 * added gamesnd_init_looping_sounds()
288 * 6 2/28/97 8:41a Lawrance
289 * added afterburner engage and burn sounds
291 * 5 2/14/97 12:37a Lawrance
292 * added hooks to play docking/undocking sounds
294 * 4 2/13/97 12:03p Lawrance
295 * hooked in throttle sounds
297 * 3 2/05/97 10:35a Lawrance
298 * supporting spooled music at menus, briefings, credits etc.
300 * 2 1/20/97 7:58p John
301 * Fixed some link errors with testcode.
303 * 1 1/20/97 7:08p John
308 #ifndef __GAMESND_H__
309 #define __GAMESND_H__
312 #include "missionparse.h"
314 void gamesnd_parse_soundstbl(); // Loads in general game sounds from sounds.tbl
315 void gamesnd_init_sounds(); // initializes the Snds[] and Snds_iface[] array
316 void gamesnd_load_gameplay_sounds();
317 void gamesnd_unload_gameplay_sounds();
318 void gamesnd_load_interface_sounds();
319 void gamesnd_unload_interface_sounds();
320 void gamesnd_preload_common_sounds();
321 void gamesnd_play_iface(int n);
323 void gamesnd_play_error_beep();
325 void common_play_highlight_sound(); // called from interface code
327 // Misc_sounds[] holds handles for misc sounds in the game (list appears in sounds.tbl)
328 #define MAX_GAME_SOUNDS 200
329 #define MAX_INTERFACE_SOUNDS 70
330 #define MAX_SPECIES_FLYBY_SOUNDS 4 // 4 different possible flybys for species
332 extern game_snd Snds[MAX_GAME_SOUNDS];
333 extern game_snd Snds_iface[MAX_INTERFACE_SOUNDS];
335 // flyby sounds - 2 for each species (fighter and bomber flybys)
336 extern game_snd Snds_flyby[MAX_SPECIES_NAMES][2];
339 // symbolic names for misc. game sounds. The order here must match the order in
342 // INSTRUCTIONS FOR ADDING A NEW SOUND:
344 // Add interface (ie non-gameplay) sounds to the end of the interface list of sounds.
345 // Add gameplay sounds to the correct portion of the gameplay sounds section (ie Misc,
346 // Weapons, or Ship).
348 // Then add a symbolic name to the appropriate position in the #define list below
349 // and add an entry to sounds.tbl. If there is no .wav file for the sound yet,
350 // specify sound_hook.wav in sounds.tbl.
354 //---------------------------------------------------
356 //---------------------------------------------------
357 #define SND_MISSILE_TRACKING 0
358 #define SND_MISSILE_LOCK 1
359 #define SND_PRIMARY_CYCLE 2
360 #define SND_SECONDARY_CYCLE 3
362 #define SND_CARGO_REVEAL 5
363 #define SND_DEATH_ROLL 6
364 #define SND_SHIP_EXPLODE_1 7
365 #define SND_TARGET_ACQUIRE 8
366 #define SND_ENERGY_ADJUST 9
367 #define SND_ENERGY_ADJUST_FAIL 10
368 #define SND_ENERGY_TRANS 11
369 #define SND_ENERGY_TRANS_FAIL 12
370 #define SND_FULL_THROTTLE 13
371 #define SND_ZERO_THROTTLE 14
372 #define SND_THROTTLE_UP 15
373 #define SND_THROTTLE_DOWN 16
374 #define SND_DOCK_APPROACH 17
375 #define SND_DOCK_ATTACH 18
376 #define SND_DOCK_DETACH 19
377 #define SND_DOCK_DEPART 20
378 #define SND_ABURN_ENGAGE 21
379 #define SND_ABURN_LOOP 22
380 #define SND_VAPORIZED 23
381 #define SND_ABURN_FAIL 24
382 #define SND_HEATLOCK_WARN 25
383 #define SND_OUT_OF_MISSLES 26
384 #define SND_OUT_OF_WEAPON_ENERGY 27
385 #define SND_TARGET_FAIL 28
386 #define SND_SQUADMSGING_ON 29
387 #define SND_SQUADMSGING_OFF 30
388 #define SND_DEBRIS 31
389 #define SND_SUBSYS_DIE_1 32
390 #define SND_MISSILE_START_LOAD 33
391 #define SND_MISSILE_LOAD 34
392 #define SND_SHIP_REPAIR 35
393 #define SND_PLAYER_HIT_LASER 36
394 #define SND_PLAYER_HIT_MISSILE 37
395 #define SND_CMEASURE_CYCLE 38
396 #define SND_SHIELD_HIT 39
397 #define SND_SHIELD_HIT_YOU 40
398 #define SND_GAME_MOUSE_CLICK 41
399 #define SND_ASPECTLOCK_WARN 42
400 #define SND_SHIELD_XFER_OK 43
401 #define SND_ENGINE_WASH 44
402 #define SND_WARP_IN 45
403 #define SND_WARP_OUT 46 // Same as warp in for now
404 #define SND_PLAYER_WARP_FAIL 47
405 #define SND_STATIC 48
406 #define SND_SHIP_EXPLODE_2 49
407 #define SND_PLAYER_WARP_OUT 50
408 #define SND_SHIP_SHIP_HEAVY 51
409 #define SND_SHIP_SHIP_LIGHT 52
410 #define SND_SHIP_SHIP_SHIELD 53
411 #define SND_THREAT_FLASH 54
412 #define SND_PROXIMITY_WARNING 55
413 #define SND_PROXIMITY_ASPECT_WARNING 56
414 #define SND_DIRECTIVE_COMPLETE 57
415 #define SND_SUBSYS_EXPLODE 58
416 #define SND_CAPSHIP_EXPLODE 59
417 #define SND_CAPSHIP_SUBSYS_EXPLODE 60
418 #define SND_LARGESHIP_WARPOUT 61
419 #define SND_ASTEROID_EXPLODE_BIG 62
420 #define SND_ASTEROID_EXPLODE_SMALL 63
421 #define SND_CUE_VOICE 64
422 #define SND_END_VOICE 65
423 #define SND_CARGO_SCAN 66
424 #define SND_WEAPON_FLYBY 67
425 #define SND_ASTEROID 68
426 #define SND_CAPITAL_WARP_IN 69
427 #define SND_CAPITAL_WARP_OUT 70
428 #define SND_ENGINE_LOOP_LARGE 71
429 #define SND_SUBSPACE_LEFT_CHANNEL 72
430 #define SND_SUBSPACE_RIGHT_CHANNEL 73
431 #define SND_MISSILE_EVADED_POPUP 74
432 #define SND_ENGINE_LOOP_HUGE 75
435 #define SND_LIGHT_LASER_FIRE 76
436 #define SND_LIGHT_LASER_IMPACT 77
437 #define SND_HVY_LASER_FIRE 78
438 #define SND_HVY_LASER_IMPACT 79
439 #define SND_MASSDRV_FIRED 80
440 #define SND_MASSDRV_IMPACT 81
441 #define SND_FLAIL_FIRED 82
442 #define SND_FLAIL_IMPACT 83
443 #define SND_NEUTRON_FLUX_FIRED 84
444 #define SND_NEUTRON_FLUX_IMPACT 85
445 #define SND_DEBUG_LASER_FIRED 86
446 #define SND_ROCKEYE_FIRED 87
447 #define SND_MISSILE_IMPACT1 88
448 #define SND_MAG_MISSILE_LAUNCH 89
449 #define SND_FURY_MISSILE_LAUNCH 90
450 #define SND_SHRIKE_MISSILE_LAUNCH 91
451 #define SND_ANGEL_MISSILE_LAUNCH 92
452 #define SND_CLUSTER_MISSILE_LAUNCH 93
453 #define SND_CLUSTERB_MISSILE_LAUNCH 94
454 #define SND_STILETTO_MISSILE_LAUNCH 95
455 #define SND_TSUNAMI_MISSILE_LAUNCH 96
456 #define SND_HARBINGER_MISSILE_LAUNCH 97
457 #define SND_MEGAWOKKA_MISSILE_LAUNCH 98
458 #define SND_CMEASURE1_LAUNCH 99
459 #define SND_SHIVAN_LIGHT_LASER_FIRE 100
460 #define SND_SHOCKWAVE_EXPLODE 101
461 #define SND_SWARM_MISSILE_LAUNCH 102
462 #define SND_SHOCKWAVE_IMPACT 109
464 #define SND_TARG_LASER_LOOP 115
465 #define SND_FLAK_FIRE 116
466 #define SND_SHIELD_BREAKER 117
467 #define SND_EMP_MISSILE 118
468 #define SND_AUTOCANNON_LOOP 119
469 #define SND_AUTOCANNON_SHOT 120
470 #define SND_BEAM_LOOP 121
471 #define SND_BEAM_UP 122
472 #define SND_BEAM_DOWN 123
473 #define SND_BEAM_SHOT 124
474 #define SND_BEAM_VAPORIZE 125
476 // Ship engine sounds
477 #define SND_TERRAN_FIGHTER_ENG 126
478 #define SND_TERRAN_BOMBER_ENG 127
479 #define SND_TERRAN_CAPITAL_ENG 128
480 #define SND_SPECIESB_FIGHTER_ENG 129
481 #define SND_SPECIESB_BOMBER_ENG 130
482 #define SND_SPECIESB_CAPITAL_ENG 131
483 #define SND_SHIVAN_FIGHTER_ENG 132
484 #define SND_SHIVAN_BOMBER_ENG 133
485 #define SND_SHIVAN_CAPITAL_ENG 134
486 #define SND_REPAIR_SHIP_ENG 135
488 // Debris electric arcing sounds
489 #define SND_DEBRIS_ARC_01 139 // 0.10 second spark sound effect (3d sound)
490 #define SND_DEBRIS_ARC_02 140 // 0.25 second spark sound effect (3d sound)
491 #define SND_DEBRIS_ARC_03 141 // 0.50 second spark sound effect (3d sound)
492 #define SND_DEBRIS_ARC_04 142 // 0.75 second spark sound effect (3d sound)
493 #define SND_DEBRIS_ARC_05 143 // 1.00 second spark sound effect (3d sound)
496 #define SND_COPILOT 162
498 // supernova 1 and supernova 2
499 #define SND_SUPERNOVA_1 173
500 #define SND_SUPERNOVA_2 174
503 #define SND_LIGHTNING_1 180
504 #define SND_LIGHTNING_2 181
507 //---------------------------------------------------
509 //---------------------------------------------------
510 #define SND_IFACE_MOUSE_CLICK 0
511 #define SND_ICON_PICKUP 1
512 #define SND_ICON_DROP_ON_WING 2
513 #define SND_ICON_DROP 3
514 #define SND_SCREEN_MODE_PRESSED 4
515 #define SND_SWITCH_SCREENS 5
516 #define SND_HELP_PRESSED 6
517 #define SND_COMMIT_PRESSED 7
518 #define SND_PREV_NEXT_PRESSED 8
520 #define SND_GENERAL_FAIL 10
521 #define SND_SHIP_ICON_CHANGE 11
522 #define SND_MAIN_HALL_AMBIENT 12
523 #define SND_BTN_SLIDE 13
524 #define SND_BRIEF_STAGE_CHG 14
525 #define SND_BRIEF_STAGE_CHG_FAIL 15
526 #define SND_BRIEF_ICON_SELECT 16
527 #define SND_USER_OVER 17
528 #define SND_USER_SELECT 18
529 #define SND_RESET_PRESSED 19
530 #define SND_BRIEF_TEXT_WIPE 20
531 #define SND_VASUDAN_PA_1 21 // vasudan pa 1
532 #define SND_WEAPON_ANIM_START 22
533 #define SND_MAIN_HALL_DOOR_OPEN 23
534 #define SND_MAIN_HALL_DOOR_CLOSE 24
535 #define SND_GLOW_OPEN 25
536 #define SND_VASUDAN_PA_2 26 // vasudan pa 2
537 #define SND_AMBIENT_MENU 27
538 #define SND_POPUP_APPEAR 28
539 #define SND_POPUP_DISAPPEAR 29
540 #define SND_VOICE_SLIDER_CLIP 30
541 #define SND_VASUDAN_PA_3 31 // vasudan pa 3
542 #define SND_MAIN_HALL_GET_PEPSI 32
543 #define SND_MAIN_HALL_LIFT_UP 33
544 #define SND_MAIN_HALL_WELD1 34
545 #define SND_MAIN_HALL_WELD2 35
546 #define SND_MAIN_HALL_WELD3 36
547 #define SND_MAIN_HALL_WELD4 37
548 #define SND_MAIN_HALL_INT1 38 // random intercom message 1
549 #define SND_MAIN_HALL_INT2 39 // random intercom message 2
550 #define SND_MAIN_HALL_INT3 40 // random intercom message 3
551 #define SND_ICON_HIGHLIGHT 41
552 #define SND_BRIEFING_STATIC 42
553 #define SND_MAIN_HALL2_CRANE1_1 43
554 #define SND_MAIN_HALL2_CRANE1_2 44
555 #define SND_MAIN_HALL2_CRANE2_1 45
556 #define SND_MAIN_HALL2_CRANE2_2 46
557 #define SND_MAIN_HALL2_CAR1 47
558 #define SND_MAIN_HALL2_CAR2 48
559 #define SND_MAIN_HALL2_INT1 49
560 #define SND_MAIN_HALL2_INT2 50
561 #define SND_MAIN_HALL2_INT3 51
563 #define SND_VASUDAN_BUP 61
565 #endif /* __GAMESND_H__ */