FS2_Open
Open source remastering of the Freespace 2 engine
|
#include <sstream>
#include <limits.h>
#include "gamesnd/gamesnd.h"
#include "localization/localize.h"
#include "parse/parselo.h"
#include "sound/ds.h"
#include "species_defs/species_defs.h"
Go to the source code of this file.
Variables | |
SCP_vector< game_snd > | Snds |
SCP_vector< game_snd > | Snds_iface |
SCP_vector< int > | Snds_iface_handle |
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.
EnhancedSoundPriority convert_to_enhanced_priority | ( | const char * | priority_str | ) |
Definition at line 659 of file gamesnd.cpp.
void gamesnd_add_retail_default_enhanced_sound_data | ( | ) |
Definition at line 228 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.
int gamesnd_lookup_name | ( | const char * | name, |
const SCP_vector< game_snd > & | sounds | ||
) |
Function to search for a given game_snd with the specified name in the passed vector
name | Name to search for |
sounds | Vector to seach in |
Definition at line 276 of file gamesnd.cpp.
void gamesnd_parse_entry | ( | game_snd * | gs, |
bool | no_create, | ||
SCP_vector< game_snd > * | lookupVector | ||
) |
Definition at line 785 of file gamesnd.cpp.
bool gamesnd_parse_line | ( | game_snd * | gs, |
const char * | tag, | ||
SCP_vector< game_snd > * | lookupVector = NULL |
||
) |
Parse a sound effect entry by requiring the given tag at the beginning.
gs | The game_snd instance to fill in |
tag | The tag that's required before an entry |
lookupVector | If non-NULL used to look up +nocreate entries |
true
when a new entry has been parsed and should be added to the list of known entries. false
otherwise, for example in case of +nocreate
Definition at line 839 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.
Definition at line 705 of file gamesnd.cpp.
Definition at line 590 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_core | ( | const char * | tag, |
int * | idx_dest, | ||
const char * | object_name, | ||
const char * | buf, | ||
parse_sound_flags | flags | ||
) |
Helper function for parse_sound and parse_sound_list. Do not use directly.
tag | Tag |
idx_dest | Sound index destination |
object_name | Object name being parsed |
buf | Buffer holding string to be parsed |
flags | See the parse_sound_flags enum |
Definition at line 396 of file gamesnd.cpp.
void parse_sound_environments | ( | ) |
Definition at line 860 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.
void parse_sound_table | ( | const char * | filename | ) |
Definition at line 1030 of file gamesnd.cpp.
bool required_string_no_create | ( | const char * | token, |
bool | no_create | ||
) |
Definition at line 694 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.
SCP_vector<int> Snds_iface_handle |
Definition at line 21 of file gamesnd.cpp.