00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "asEntityManager.h"
00018
00019 #ifdef __COMPILE_WITH_ANGELSCRIPT__
00020
00021 #include "../../core/EntityManager.h"
00022
00023
00025 void bindEntityManager(asIScriptEngine *engine)
00026 {
00027
00028 int r;
00029
00030
00031 r = engine->RegisterObjectType("EntityManager", sizeof(EntityManager), asOBJ_REF); assert(r >= 0);
00032
00033
00034 r = engine->RegisterObjectBehaviour("EntityManager", asBEHAVE_ADDREF, "void f()",
00035 asMETHOD(EntityManager, grab), asCALL_THISCALL); assert(r >= 0);
00036 r = engine->RegisterObjectBehaviour("EntityManager", asBEHAVE_RELEASE, "void f()",
00037 asMETHOD(EntityManager, drop), asCALL_THISCALL); assert(r >= 0);
00038
00039
00040 r = engine->RegisterObjectMethod("EntityManager", "void init()",
00041 asMETHOD(EntityManager, init), asCALL_THISCALL); assert(r >= 0);
00042 r = engine->RegisterObjectMethod("EntityManager", "void clear()",
00043 asMETHOD(EntityManager, clear), asCALL_THISCALL); assert(r >= 0);
00044
00045 r = engine->RegisterObjectMethod("EntityManager", "bool addEntity(Entity @+)",
00046 asMETHOD(EntityManager, addEntity), asCALL_THISCALL); assert(r >= 0);
00047
00048 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &in)",
00049 asMETHOD(EntityManager, createEntity), asCALL_THISCALL); assert(r >= 0);
00050 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &in, Entity @+)",
00051 asMETHOD(EntityManager, createEntity), asCALL_THISCALL); assert(r >= 0);
00052 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &in, Entity @+, " \
00053 "AssetGroup @+)", asMETHOD(EntityManager, createEntity),
00054 asCALL_THISCALL); assert(r >= 0);
00055 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntity(const string &in, Entity @+, " \
00056 "AssetGroup @+, bool)", asMETHOD(EntityManager, createEntity),
00057 asCALL_THISCALL); assert(r >= 0);
00058
00059 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntityFromXML(const string &in)",
00060 asMETHODPR(EntityManager, createEntityFromXML, (const std::string&, Entity*,
00061 AssetGroup*, bool), Entity*), asCALL_THISCALL); assert(r >= 0);
00062 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntityFromXML(const string &in, Entity @+)",
00063 asMETHODPR(EntityManager, createEntityFromXML, (const std::string&, Entity*,
00064 AssetGroup*, bool), Entity*), asCALL_THISCALL); assert(r >= 0);
00065 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntityFromXML(const string &in, Entity @+, " \
00066 "AssetGroup @+)", asMETHODPR(EntityManager, createEntityFromXML,
00067 (const std::string&, Entity*, AssetGroup*, bool), Entity*), asCALL_THISCALL);
00068 assert(r >= 0);
00069 r = engine->RegisterObjectMethod("EntityManager", "Entity@ createEntityFromXML(const string &in, Entity @+, " \
00070 "AssetGroup @+, bool)", asMETHODPR(EntityManager, createEntityFromXML,
00071 (const std::string&, Entity*, AssetGroup*, bool), Entity*), asCALL_THISCALL);
00072 assert(r >= 0);
00073
00074 r = engine->RegisterObjectMethod("EntityManager", "Entity@ getEntity(const u32)",
00075 asMETHODPR(EntityManager, getEntity, (const u32), Entity*),
00076 asCALL_THISCALL); assert(r >= 0);
00077 r = engine->RegisterObjectMethod("EntityManager", "Entity@ getEntity(const string &in)",
00078 asMETHODPR(EntityManager, getEntity, (const std::string &), Entity*),
00079 asCALL_THISCALL); assert(r >= 0);
00080
00081 r = engine->RegisterObjectMethod("EntityManager", "void removeEntities()",
00082 asMETHOD(EntityManager, removeEntities), asCALL_THISCALL); assert(r >= 0);
00083 r = engine->RegisterObjectMethod("EntityManager", "bool removeEntity(Entity @+)",
00084 asMETHODPR(EntityManager, removeEntity, (Entity*), bool),
00085 asCALL_THISCALL); assert(r >= 0);
00086 r = engine->RegisterObjectMethod("EntityManager", "bool removeEntity(const u32)",
00087 asMETHODPR(EntityManager, removeEntity, (const u32), bool),
00088 asCALL_THISCALL); assert(r >= 0);
00089 r = engine->RegisterObjectMethod("EntityManager", "bool removeEntity(const string &in)",
00090 asMETHODPR(EntityManager, removeEntity, (const std::string &), bool),
00091 asCALL_THISCALL); assert(r >= 0);
00092 }
00093
00094 #endif // __COMPILE_WITH_ANGELSCRIPT__
00095
00096