1 #ifndef __SOUNDMANAGERENUMS_H
2 #define __SOUNDMANAGERENUMS_H
3 
4 /*
5 
6 	Copyright (C) 1991-2001 and beyond by Bungie Studios, Inc.
7 	and the "Aleph One" developers.
8 
9 	This program is free software; you can redistribute it and/or modify
10 	it under the terms of the GNU General Public License as published by
11 	the Free Software Foundation; either version 3 of the License, or
12 	(at your option) any later version.
13 
14 	This program is distributed in the hope that it will be useful,
15 	but WITHOUT ANY WARRANTY; without even the implied warranty of
16 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 	GNU General Public License for more details.
18 
19 	This license is contained in the file "COPYING",
20 	which is included with this source code; it is available online at
21 	http://www.gnu.org/licenses/gpl.html
22 
23 */
24 
25 // ghs: moved these here because SoundManager's header file is enormous already
26 
27 #include "cstypes.h"
28 
29 /* ---------- sound codes */
30 
31 enum /* ambient sound codes */
32 {
33 	_ambient_snd_water,
34 	_ambient_snd_sewage,
35 	_ambient_snd_lava,
36 	_ambient_snd_goo,
37 	_ambient_snd_under_media,
38 	_ambient_snd_wind,
39 	_ambient_snd_waterfall,
40 	_ambient_snd_siren,
41 	_ambient_snd_fan,
42 	_ambient_snd_spht_door,
43 	_ambient_snd_spht_platform,
44 	_ambient_snd_heavy_spht_door,
45 	_ambient_snd_heavy_spht_platform,
46 	_ambient_snd_light_machinery,
47 	_ambient_snd_heavy_machinery,
48 	_ambient_snd_transformer,
49 	_ambient_snd_sparking_transformer,
50 	_ambient_snd_machine_binder,
51 	_ambient_snd_machine_bookpress,
52 	_ambient_snd_machine_puncher,
53 	_ambient_snd_electric,
54 	_ambient_snd_alarm,
55 	_ambient_snd_night_wind,
56 	_ambient_snd_pfhor_door,
57 	_ambient_snd_pfhor_platform,
58 	_ambient_snd_alien_noise1,
59 	_ambient_snd_alien_noise2,
60 	// LP addition:
61 	_ambient_snd_alien_harmonics,
62 
63 	NUMBER_OF_AMBIENT_SOUND_DEFINITIONS
64 };
65 
66 enum /* random sound codes */
67 {
68 	_random_snd_water_drip,
69 	_random_snd_surface_explosion,
70 	_random_snd_underground_explosion,
71 	_random_snd_owl,
72 	// LP addition:
73 	_random_snd_creak,
74 
75 	NUMBER_OF_RANDOM_SOUND_DEFINITIONS
76 };
77 
78 enum /* sound codes */
79 {
80 	_snd_startup,
81 	_snd_teleport_in,
82 	_snd_teleport_out,
83 	_snd_body_being_crunched,
84 	// LP change:
85 	_snd_creak,
86 	// _snd_nuclear_hard_death,
87 	_snd_absorbed,
88 
89 	_snd_breathing,
90 	_snd_oxygen_warning,
91 	_snd_suffocation,
92 
93 	_snd_energy_refuel,
94 	_snd_oxygen_refuel,
95 	_snd_cant_toggle_switch,
96 	_snd_switch_on,
97 	_snd_switch_off,
98 	_snd_puzzle_switch,
99 	_snd_chip_insertion,
100 	_snd_pattern_buffer,
101 	_snd_destroy_control_panel,
102 
103 	_snd_adjust_volume,
104 	_snd_got_powerup,
105 	_snd_got_item,
106 
107 	_snd_bullet_ricochet,
108 	_snd_metallic_ricochet,
109 	_snd_empty_gun,
110 
111 	_snd_spht_door_opening,
112 	_snd_spht_door_closing,
113 	_snd_spht_door_obstructed,
114 
115 	_snd_spht_platform_starting,
116 	_snd_spht_platform_stopping,
117 
118 	_snd_owl,
119 	// LP change:
120 	_snd_smg_firing,
121 	_snd_smg_reloading,
122 	// _snd_unused2,
123 	// _snd_unused3,
124 
125 	_snd_heavy_spht_platform_starting,
126 	_snd_heavy_spht_platform_stopping,
127 
128 	_snd_fist_hitting,
129 
130 	_snd_magnum_firing,
131 	_snd_magnum_reloading,
132 
133 	_snd_assault_rifle_firing,
134 	_snd_grenade_launcher_firing,
135 	_snd_grenade_exploding,
136 	_snd_grenade_flyby,
137 
138 	_snd_fusion_firing,
139 	_snd_fusion_exploding,
140 	_snd_fusion_flyby,
141 	_snd_fusion_charging,
142 
143 	_snd_rocket_exploding,
144 	_snd_rocket_flyby,
145 	_snd_rocket_firing,
146 
147 	_snd_flamethrower,
148 
149 	_snd_body_falling,
150 	_snd_body_exploding,
151 	_snd_bullet_hitting_flesh,
152 
153 	_snd_fighter_activate,
154 	_snd_fighter_wail,
155 	_snd_fighter_scream,
156 	_snd_fighter_chatter,
157 	_snd_fighter_attack,
158 	_snd_fighter_projectile_hit,
159 	_snd_fighter_projectile_flyby,
160 
161 	_snd_compiler_attack,
162 	_snd_compiler_death,
163 	_snd_compiler_hit,
164 	_snd_compiler_projectile_flyby,
165 	_snd_compiler_projectile_hit,
166 
167 	_snd_cyborg_moving,
168 	_snd_cyborg_attack,
169 	_snd_cyborg_hit,
170 	_snd_cyborg_death,
171 	_snd_cyborg_projectile_bounce,
172 	_snd_cyborg_projectile_hit,
173 	_snd_cyborg_projectile_flyby,
174 
175 	_snd_hummer_activate,
176 	_snd_hummer_start_attack,
177 	_snd_hummer_attack,
178 	_snd_hummer_dying,
179 	_snd_hummer_death,
180 	_snd_hummer_projectile_hit,
181 	_snd_hummer_projectile_flyby,
182 
183 	_snd_human_wail,
184 	_snd_human_scream,
185 	_snd_human_hit,
186 	_snd_human_chatter,
187 	_snd_assimilated_human_chatter,
188 	_snd_human_trash_talk,
189 	_snd_human_apology,
190 	_snd_human_activation,
191 	_snd_human_clear,
192 	_snd_human_stop_shooting_me_you_bastard,
193 	_snd_human_area_secure,
194 	_snd_kill_the_player,
195 
196 	_snd_water,
197 	_snd_sewage,
198 	_snd_lava,
199 	_snd_goo,
200 	_snd_under_media,
201 	_snd_wind,
202 	_snd_waterfall,
203 	_snd_siren,
204 	_snd_fan,
205 	_snd_spht_door,
206 	_snd_spht_platform,
207 	// LP change:
208 	_snd_alien_harmonics,
209 	// _snd_unused4,
210 	_snd_heavy_spht_platform,
211 	_snd_light_machinery,
212 	_snd_heavy_machinery,
213 	_snd_transformer,
214 	_snd_sparking_transformer,
215 
216 	_snd_water_drip,
217 
218 	_snd_walking_in_water,
219 	_snd_exit_water,
220 	_snd_enter_water,
221 	_snd_small_water_splash,
222 	_snd_medium_water_splash,
223 	_snd_large_water_splash,
224 
225 	_snd_walking_in_lava,
226 	_snd_enter_lava,
227 	_snd_exit_lava,
228 	_snd_small_lava_splash,
229 	_snd_medium_lava_splash,
230 	_snd_large_lava_splash,
231 
232 	_snd_walking_in_sewage,
233 	_snd_exit_sewage,
234 	_snd_enter_sewage,
235 	_snd_small_sewage_splash,
236 	_snd_medium_sewage_splash,
237 	_snd_large_sewage_splash,
238 
239 	_snd_walking_in_goo,
240 	_snd_exit_goo,
241 	_snd_enter_goo,
242 	_snd_small_goo_splash,
243 	_snd_medium_goo_splash,
244 	_snd_large_goo_splash,
245 
246 	_snd_major_fusion_firing,
247 	_snd_major_fusion_charged,
248 
249 	_snd_assault_rifle_reloading,
250 	_snd_assault_rifle_shell_casings,
251 
252 	_snd_shotgun_firing,
253 	_snd_shotgun_reloading,
254 
255 	_snd_ball_bounce,
256 	_snd_you_are_it,
257 	_snd_got_ball,
258 
259 	_snd_computer_interface_logon,
260 	_snd_computer_interface_logout,
261 	_snd_computer_interface_page,
262 
263 	_snd_heavy_spht_door,
264 	_snd_heavy_spht_door_opening,
265 	_snd_heavy_spht_door_closing,
266 	_snd_heavy_spht_door_open,
267 	_snd_heavy_spht_door_closed,
268 	_snd_heavy_spht_door_obstructed,
269 
270 	_snd_hunter_activate,
271 	_snd_hunter_attack,
272 	_snd_hunter_dying,
273 	_snd_hunter_landing,
274 	_snd_hunter_exploding,
275 	_snd_hunter_projectile_hit,
276 	_snd_hunter_projectile_flyby,
277 
278 	_snd_enforcer_activate,
279 	_snd_enforcer_attack,
280 	_snd_enforcer_projectile_hit,
281 	_snd_enforcer_projectile_flyby,
282 
283 	_snd_yeti_melee_attack,
284 	_snd_yeti_melee_attack_hit,
285 	_snd_yeti_projectile_attack,
286 	_snd_yeti_projectile_sewage_attack_hit,
287 	_snd_yeti_projectile_sewage_flyby,
288 	_snd_yeti_projectile_lava_attack_hit,
289 	_snd_yeti_projectile_lava_flyby,
290 	_snd_yeti_dying,
291 
292 	_snd_machine_binder,
293 	_snd_machine_bookpress,
294 	_snd_machine_puncher,
295 	_snd_electric,
296 	_snd_alarm,
297 	_snd_night_wind,
298 
299 	_snd_surface_explosion,
300 	_snd_underground_explosion,
301 
302 	_snd_defender_attack,
303 	_snd_defender_hit,
304 	_snd_defender_flyby,
305 	_snd_defender_being_hit,
306 	_snd_defender_exploding,
307 
308 	_snd_tick_chatter,
309 	_snd_tick_falling,
310 	_snd_tick_flapping,
311 	_snd_tick_exploding,
312 
313 	_snd_ceiling_lamp_exploding,
314 
315 	_snd_pfhor_platform_starting,
316 	_snd_pfhor_platform_stopping,
317 	_snd_pfhor_platform,
318 
319 	_snd_pfhor_door_opening,
320 	_snd_pfhor_door_closing,
321 	_snd_pfhor_door_obstructed,
322 	_snd_pfhor_door,
323 
324 	_snd_pfhor_switch_off,
325 	_snd_pfhor_switch_on,
326 
327 	_snd_juggernaut_firing,
328 	_snd_juggernaut_warning,
329 	_snd_juggernaut_exploding,
330 	_snd_juggernaut_preparing_to_fire,
331 
332 	_snd_enforcer_exploding,
333 
334 	_snd_alien_noise1,
335 	_snd_alien_noise2,
336 
337 	// LP addition: this means that there are more Moo sound types
338 	// than M2 ones.
339 	_snd_civilian_fusion_wail,
340 	_snd_civilian_fusion_scream,
341 	_snd_civilian_fusion_hit,
342 	_snd_civilian_fusion_chatter,
343 	_snd_assimilated_civilian_fusion_chatter,
344 	_snd_civilian_fusion_trash_talk,
345 	_snd_civilian_fusion_apology,
346 	_snd_civilian_fusion_activation,
347 	_snd_civilian_fusion_clear,
348 	_snd_civilian_fusion_stop_shooting_me_you_bastard,
349 	_snd_civilian_fusion_area_secure,
350 	_snd_civilian_fusion_kill_the_player,
351 
352 	NUMBER_OF_SOUND_DEFINITIONS
353 };
354 
355 enum
356 {
357 	NUMBER_OF_SOUND_VOLUME_LEVELS= 8,
358 
359 	MAXIMUM_SOUND_VOLUME_BITS= 8,
360 	MAXIMUM_SOUND_VOLUME= 1<<MAXIMUM_SOUND_VOLUME_BITS,
361 };
362 
363 enum // sound sources
364 {
365 	_8bit_22k_source,
366 	_16bit_22k_source,
367 
368 	NUMBER_OF_SOUND_SOURCES
369 };
370 
371 enum // initialization flags (some of these are used by the prefs, which fixes them)
372 {
373 	_stereo_flag= 0x0001, /* play sounds in stereo [prefs] */
374 	_dynamic_tracking_flag= 0x0002, /* tracks sound sources during idle_proc [prefs] */
375 	_doppler_shift_flag= 0x0004, /* adjusts sound pitch during idle_proc */
376 	_ambient_sound_flag= 0x0008, /* plays and tracks ambient sounds (valid iff _dynamic_tracking_flag) [prefs] */
377 	_16bit_sound_flag= 0x0010, /* loads 16bit audio instead of 8bit [prefs] */
378 	_more_sounds_flag= 0x0020, /* loads all permutations; only loads #0 if false [prefs] */
379 	_relative_volume_flag = 0x0040, /* LP: Ian Rickard's relative-volume flag [prefs] */
380 	_extra_memory_flag= 0x0100, /* double usual memory */
381 	_extra_extra_memory_flag= 0x0200, /* LP: quadruple usual memory, because RAM is more available */
382 	_zero_restart_delay = 0x0400 /* ghs: restart sounds immediately */
383 };
384 
385 enum // _sound_obstructed_proc() flags
386 {
387 	_sound_was_obstructed= 0x0001, // no clear path between source and listener
388 	_sound_was_media_obstructed= 0x0002, // source and listener are on different sides of the media
389 	_sound_was_media_muffled= 0x0004 // source and listener both under the same media
390 };
391 
392 enum // frequencies
393 {
394 	_lower_frequency= FIXED_ONE-FIXED_ONE/8,
395 	_normal_frequency= FIXED_ONE,
396 	_higher_frequency= FIXED_ONE+FIXED_ONE/8,
397 	_m1_high_frequency= FIXED_ONE+FIXED_ONE/4
398 };
399 
400 #endif
401 
402