____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include <string.h>
#include <stdio.h>
#include "stratagus.h"
#include <stdlib.h>
#include "script.h"
#include "sound.h"
#include "sound_server.h"
Go to the source code of this file.
Functions | |
| static int | CclSoundForName (lua_State *l) |
| static CSound * | CclGetSound (lua_State *l) |
| static int | CclMakeSound (lua_State *l) |
| static int | CclMakeSoundGroup (lua_State *l) |
| static int | CclMapSound (lua_State *l) |
| static int | CclPlaySound (lua_State *l) |
| static int | CclDefineGameSounds (lua_State *l) |
| static int | CclSetGlobalSoundRange (lua_State *l) |
| static int | CclSetSoundRange (lua_State *l) |
| void | SoundCclRegister (void) |
| < register ccl features | |
Definition in file script_sound.cpp.
| static int CclDefineGameSounds | ( | lua_State * | l | ) | [static] |
Glue between c and scheme. Allows to specify some global game sounds in a ccl file.
| l | Lua state. |
Definition at line 230 of file script_sound.cpp.
References _C_, GameSound::ChatMessage, GameSound::Click, _lua_user_data_::Data, data, GameSounds, LuaError, LuaSoundType, LuaToString(), GameSound::PlacementError, GameSound::PlacementSuccess, GameSound::Rescue, SoundConfig::Sound, and GameSound::WorkComplete.
Referenced by SoundCclRegister().
| static CSound* CclGetSound | ( | lua_State * | l | ) | [static] |
Get a Game Sound Id from either a lua sound id or a sound name
| l | Lua state. |
Definition at line 83 of file script_sound.cpp.
References CclSoundForName(), _lua_user_data_::Data, data, LuaError, LuaSoundType, and _lua_user_data_::Type.
Referenced by CclMakeSoundGroup(), CclMapSound(), CclPlaySound(), and CclSetSoundRange().
| static int CclMakeSound | ( | lua_State * | l | ) | [static] |
Create a sound.
Glue between c and scheme. This function asks the sound system to register a sound under a given name, wiht an associated list of files (the list can be replaced by only one file).
| l | Lua state. |
Definition at line 117 of file script_sound.cpp.
References _lua_user_data_::Data, data, LuaCheckArgs, LuaError, LuaSoundType, LuaToString(), MakeSound(), new_strdup(), and _lua_user_data_::Type.
Referenced by SoundCclRegister().
| static int CclMakeSoundGroup | ( | lua_State * | l | ) | [static] |
Glue between c and scheme. This function asks the sound system to build a special sound group.
| l | Lua state. |
Definition at line 166 of file script_sound.cpp.
References CclGetSound(), _lua_user_data_::Data, data, LuaCheckArgs, LuaSoundType, LuaToString(), MakeSoundGroup(), and _lua_user_data_::Type.
Referenced by SoundCclRegister().
| static int CclMapSound | ( | lua_State * | l | ) | [static] |
Glue between c and scheme. Ask to the sound system to remap a sound id to a given name.
| l | Lua state. |
Definition at line 197 of file script_sound.cpp.
References CclGetSound(), LuaCheckArgs, LuaToString(), and MapSound().
Referenced by SoundCclRegister().
| static int CclPlaySound | ( | lua_State * | l | ) | [static] |
Ask the sound system to play the specified sound.
| l | Lua state. |
Definition at line 213 of file script_sound.cpp.
References CclGetSound(), LuaCheckArgs, MaxSampleVolume, and PlayGameSound().
Referenced by SoundCclRegister().
| static int CclSetGlobalSoundRange | ( | lua_State * | l | ) | [static] |
Set the cut off distance.
| l | Lua state. |
Definition at line 292 of file script_sound.cpp.
References DistanceSilent, LuaCheckArgs, and LuaToNumber().
Referenced by SoundCclRegister().
| static int CclSetSoundRange | ( | lua_State * | l | ) | [static] |
Set the range of a given sound.
| l | Lua state. |
Definition at line 310 of file script_sound.cpp.
References CclGetSound(), LuaCheckArgs, LuaToNumber(), and SetSoundRange().
Referenced by SoundCclRegister().
| static int CclSoundForName | ( | lua_State * | l | ) | [static] |
Glue between c and scheme. Ask the sound system to associate a sound id to a sound name.
| l | Lua state. |
Definition at line 61 of file script_sound.cpp.
References _lua_user_data_::Data, data, LuaSoundType, LuaToString(), SoundForName(), and _lua_user_data_::Type.
Referenced by CclGetSound(), and SoundCclRegister().
| void SoundCclRegister | ( | void | ) |
< register ccl features
Register CCL features for sound.
Definition at line 334 of file script_sound.cpp.
References CclDefineGameSounds(), CclMakeSound(), CclMakeSoundGroup(), CclMapSound(), CclPlaySound(), CclSetGlobalSoundRange(), CclSetSoundRange(), CclSoundForName(), and Lua.
Referenced by InitCcl().
1.5.6