_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"#include <string>#include <map>#include "sound.h"#include "sound_server.h"#include "util.h"sound_id.cpp - The sound id. | |
| static std::map< std::string, CSound * > | SoundMap |
| static CSound * | FindSound (const std::string &name) |
| void | MapSound (const std::string &name, CSound *id) |
| Map sound to identifier. More... | |
| CSound * | SoundForName (const std::string &name) |
| Get the sound id bound to an identifier. More... | |
| CSound * | MakeSound (const std::string &name, const std::vector< std::string > &files) |
| Make a sound bound to identifier. More... | |
| CSound * | MakeSoundGroup (const std::string &name, CSound *first, CSound *second) |
| Make a sound group bound to identifier. More... | |
| void | FreeSounds () |
|
static |
| void FreeSounds | ( | ) |
| CSound* MakeSound | ( | const std::string & | name, |
| const std::vector< std::string > & | files | ||
| ) |
Make a sound bound to identifier.
Ask the sound server to register a sound and store the mapping between its name and its id. Register a sound group (or an unique sound if nb==1) and get the corresponding sound id.
| name | name of this sound group (Freed by caller). |
| file | list of sound file names |
| nb | number of sounds |
Make a sound group bound to identifier.
Ask the sound server to build a special sound group.
Register two sound groups together to make a special sound (for selection). Return the corresponding id after registering it under a given name.
| name | the name of the group (handled by caller). |
| first | id of the first group |
| second | id of the second group |
Map sound to identifier.
Add a new mapping (sound name to sound id) in the hash table Create a new mapping between a name and an already valid sound id.
| name | Name of the sound (now freed by caller!). |
| id | Sound identifier. |
| CSound* SoundForName | ( | const std::string & | name | ) |
Get the sound id bound to an identifier.
Maps a sound name to its id
| name | Sound name. |
|
static |
1.8.17
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.