00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asAssetManager.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../../core/AssetManager.h"
00022
00023
00025 void bindAssetManager(asIScriptEngine *engine)
00026 {
00027
00028 int r;
00029
00030
00031 r = engine->RegisterObjectType("AssetManager", sizeof(AssetManager), asOBJ_REF); assert(r >= 0);
00032
00033
00034 r = engine->RegisterObjectBehaviour("AssetManager", asBEHAVE_ADDREF, "void f()",
00035 asMETHOD(AssetManager, grab), asCALL_THISCALL); assert(r >= 0);
00036 r = engine->RegisterObjectBehaviour("AssetManager", asBEHAVE_RELEASE, "void f()",
00037 asMETHOD(AssetManager, drop), asCALL_THISCALL); assert(r >= 0);
00038
00039
00040 r = engine->RegisterObjectMethod("AssetManager", "void init()",
00041 asMETHOD(AssetManager, init), asCALL_THISCALL); assert(r >= 0);
00042 r = engine->RegisterObjectMethod("AssetManager", "void clear()",
00043 asMETHOD(AssetManager, clear), asCALL_THISCALL); assert(r >= 0);
00044
00045 r = engine->RegisterObjectMethod("AssetManager", "bool addAssetGroup(AssetGroup @+)",
00046 asMETHOD(AssetManager, addAssetGroup), asCALL_THISCALL); assert(r >= 0);
00047 r = engine->RegisterObjectMethod("AssetManager", "void createAssetGroup(const string &in, const string &in)",
00048 asMETHOD(AssetManager, createAssetGroup), asCALL_THISCALL); assert(r >= 0);
00049 r = engine->RegisterObjectMethod("AssetManager", "void createAssetGroup(const string &in, const string &in, bool)",
00050 asMETHOD(AssetManager, createAssetGroup), asCALL_THISCALL); assert(r >= 0);
00051
00052 r = engine->RegisterObjectMethod("AssetManager", "AssetGroup@ getAssetGroup(const u32)",
00053 asMETHODPR(AssetManager, getAssetGroup, (const u32), AssetGroup*),
00054 asCALL_THISCALL); assert(r >= 0);
00055 r = engine->RegisterObjectMethod("AssetManager", "AssetGroup@ getAssetGroup(const string &in)",
00056 asMETHODPR(AssetManager, getAssetGroup, (const std::string&), AssetGroup*),
00057 asCALL_THISCALL); assert(r >= 0);
00058
00059 r = engine->RegisterObjectMethod("AssetManager", "void removeAssetGroups()",
00060 asMETHOD(AssetManager, removeAssetGroups), asCALL_THISCALL); assert(r >= 0);
00061 r = engine->RegisterObjectMethod("AssetManager", "bool removeAssetGroup(AssetGroup @+)",
00062 asMETHODPR(AssetManager, removeAssetGroup, (AssetGroup*), bool),
00063 asCALL_THISCALL); assert(r >= 0);
00064 r = engine->RegisterObjectMethod("AssetManager", "bool removeAssetGroup(const u32)",
00065 asMETHODPR(AssetManager, removeAssetGroup, (const u32), bool),
00066 asCALL_THISCALL); assert(r >= 0);
00067 r = engine->RegisterObjectMethod("AssetManager", "bool removeAssetGroup(const string &in)",
00068 asMETHODPR(AssetManager, removeAssetGroup, (const std::string&), bool),
00069 asCALL_THISCALL); assert(r >= 0);
00070 }
00071
00072 #endif // __COMPILE_WITH_ANGELSCRIPT__
00073
00074