FS2_Open
Open source remastering of the Freespace 2 engine
|
Go to the source code of this file.
Functions | |
void | gamesnd_parse_soundstbl () |
void | gamesnd_close () |
void | gamesnd_load_gameplay_sounds () |
void | gamesnd_unload_gameplay_sounds () |
void | gamesnd_load_interface_sounds () |
void | gamesnd_unload_interface_sounds () |
void | gamesnd_preload_common_sounds () |
void | gamesnd_play_iface (int n) |
void | gamesnd_play_error_beep () |
int | gamesnd_get_by_name (const char *name) |
int | gamesnd_get_by_iface_name (const char *name) |
int | gamesnd_get_by_tbl_index (int index) |
int | gamesnd_get_by_iface_tbl_index (int index) |
void | parse_sound (const char *tag, int *idx_dest, const char *object_name, parse_sound_flags=PARSE_SOUND_GENERAL_SOUND) |
void | parse_sound_list (const char *tag, SCP_vector< int > &destination, const char *object_name, parse_sound_flags=PARSE_SOUND_GENERAL_SOUND) |
void | common_play_highlight_sound () |
Variables | |
SCP_vector< game_snd > | Snds |
SCP_vector< game_snd > | Snds_iface |
enum GameSoundsIndex |
symbolic names for misc. game sounds.
The order here must match the order in sounds.tbl
INSTRUCTIONS FOR ADDING A NEW SOUND: Add interface (ie non-gameplay) sounds to the end of the interface list of sounds. Add gameplay sounds to the correct portion of the gameplay sounds section (ie Misc, Weapons, or Ship).
Then add a symbolic name to the appropriate position in the enum below and add an entry to sounds.tbl. If there is no .wav file for the sound yet, specify sound_hook.wav in sounds.tbl.
enum InterfaceSoundsIndex |
Interface sounds
enum parse_sound_flags |
void common_play_highlight_sound | ( | ) |
Callback function for the UI code to call when the mouse first goes over a button.
Definition at line 1151 of file gamesnd.cpp.
void gamesnd_close | ( | ) |
Close out gamesnd, ONLY CALL FROM game_shutdown()!!!!
Definition at line 1141 of file gamesnd.cpp.
int gamesnd_get_by_iface_name | ( | const char * | name | ) |
Definition at line 334 of file gamesnd.cpp.
Definition at line 376 of file gamesnd.cpp.
int gamesnd_get_by_name | ( | const char * | name | ) |
Definition at line 301 of file gamesnd.cpp.
Definition at line 368 of file gamesnd.cpp.
void gamesnd_load_gameplay_sounds | ( | ) |
Load the ingame sounds into memory
Definition at line 529 of file gamesnd.cpp.
void gamesnd_load_interface_sounds | ( | ) |
Load the interface sounds into memory
Definition at line 562 of file gamesnd.cpp.
void gamesnd_parse_soundstbl | ( | ) |
Parse the sounds.tbl file, and load the specified sounds.
Definition at line 1116 of file gamesnd.cpp.
void gamesnd_play_error_beep | ( | ) |
Callback function for the UI code to call when an error beep needed.
Definition at line 1159 of file gamesnd.cpp.
Definition at line 260 of file gamesnd.cpp.
void gamesnd_preload_common_sounds | ( | ) |
Load in sounds that we expect will get played
The method currently used is to load all those sounds that have the hardware flag set. This works well since we don't want to try and load hardware sounds in on the fly (too slow).
Definition at line 510 of file gamesnd.cpp.
void gamesnd_unload_gameplay_sounds | ( | ) |
Unload the ingame sounds from memory
Definition at line 548 of file gamesnd.cpp.
void gamesnd_unload_interface_sounds | ( | ) |
Unload the interface sounds from memory
Definition at line 578 of file gamesnd.cpp.
void parse_sound | ( | const char * | tag, |
int * | idx_dest, | ||
const char * | object_name, | ||
parse_sound_flags | flags | ||
) |
Parse a sound. When using this function for a table entry, required_string and optional_string aren't needed, as this function deals with that as its tag parameter, just make sure that the destination sound index can handle -1 if things don't work out.
tag | Tag |
idx_dest | Sound index destination |
object_name | Object name being parsed |
flags | See the parse_sound_flags enum |
Definition at line 445 of file gamesnd.cpp.
void parse_sound_list | ( | const char * | tag, |
SCP_vector< int > & | destination, | ||
const char * | object_name, | ||
parse_sound_flags | flags | ||
) |
CommanderDJ - Parse a list of sounds. When using this function for a table entry, required_string and optional_string aren't needed, as this function deals with that as its tag parameter, just make sure that the destination sound index(es) can handle -1 if things don't work out.
destination | Vector where sound indexes are to be stored |
tag | Tag |
object_name | Name of object being parsed |
flags | See the parse_sound_flags enum |
Definition at line 468 of file gamesnd.cpp.
SCP_vector<game_snd> Snds |
Definition at line 19 of file gamesnd.cpp.
SCP_vector<game_snd> Snds_iface |
Definition at line 20 of file gamesnd.cpp.