00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asSoundManager.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020 #ifdef __COMPILE_WITH_SFML_AUDIO__
00021
00022 #include "../ScriptHelper.h"
00023
00024 #include "../../sound/SoundManager.h"
00025
00026
00028 void bindSoundManager(asIScriptEngine *engine)
00029 {
00030
00031 int r;
00032
00033
00034 r = engine->RegisterObjectType("SoundManager", sizeof(SoundManager), asOBJ_REF); assert(r >= 0);
00035
00036
00037 r = engine->RegisterObjectBehaviour("SoundManager", asBEHAVE_ADDREF, "void f()",
00038 asMETHOD(SoundManager, grab), asCALL_THISCALL); assert(r >= 0);
00039 r = engine->RegisterObjectBehaviour("SoundManager", asBEHAVE_RELEASE, "void f()",
00040 asMETHOD(SoundManager, drop), asCALL_THISCALL); assert(r >= 0);
00041
00042
00043 r = engine->RegisterObjectMethod("SoundManager", "void init()",
00044 asMETHOD(SoundManager, init), asCALL_THISCALL); assert(r >= 0);
00045 r = engine->RegisterObjectMethod("SoundManager", "void clear()",
00046 asMETHOD(SoundManager, clear), asCALL_THISCALL); assert(r >= 0);
00047
00048 r = engine->RegisterObjectMethod("SoundManager", "f32 getGlobalVolume()",
00049 asMETHOD(SoundManager, getGlobalVolume), asCALL_THISCALL); assert(r >= 0);
00050
00051 r = engine->RegisterObjectMethod("SoundManager", "bool loadSoundBuffer(const string &in)",
00052 asMETHOD(SoundManager, loadSoundBuffer), asCALL_THISCALL); assert(r >= 0);
00053
00054 r = engine->RegisterObjectMethod("SoundManager", "void removeSoundBuffers()",
00055 asMETHOD(SoundManager, removeSoundBuffers), asCALL_THISCALL); assert(r >= 0);
00056 r = engine->RegisterObjectMethod("SoundManager", "bool removeSoundBuffer(const string &in)",
00057 asMETHOD(SoundManager, removeSoundBuffer), asCALL_THISCALL); assert(r >= 0);
00058
00059 r = engine->RegisterObjectMethod("SoundManager", "void setGlobalVolume(f32)",
00060 asMETHOD(SoundManager, setGlobalVolume), asCALL_THISCALL); assert(r >= 0);
00061 }
00062
00063 #endif // __COMPILE_WITH_SFML_AUDIO__
00064 #endif // __COMPILE_WITH_ANGELSCRIPT__
00065
00066