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