24 #include <angelscript.h>
26 using namespace AngelScript;
33 result = engine->RegisterObjectType(
"CVarClass",
sizeof(Console), asOBJ_REF | asOBJ_NOCOUNT);
ROR_ASSERT(result>=0);
34 result = engine->RegisterObjectMethod(
"CVarClass",
"const string& getName()", asMETHOD(CVar,getName), asCALL_THISCALL);
ROR_ASSERT(result>=0);
35 result = engine->RegisterObjectMethod(
"CVarClass",
"const string& getStr()", asMETHOD(CVar,getStr), asCALL_THISCALL);
ROR_ASSERT(result>=0);
36 result = engine->RegisterObjectMethod(
"CVarClass",
"int getInt()", asMETHOD(CVar,getInt), asCALL_THISCALL);
ROR_ASSERT(result>=0);
37 result = engine->RegisterObjectMethod(
"CVarClass",
"float getFloat()", asMETHOD(CVar,getFloat), asCALL_THISCALL);
ROR_ASSERT(result>=0);
38 result = engine->RegisterObjectMethod(
"CVarClass",
"bool getBool()", asMETHOD(CVar,getBool), asCALL_THISCALL);
ROR_ASSERT(result>=0);
41 result = engine->RegisterEnum(
"CVarFlags");
ROR_ASSERT(result >= 0);
49 result = engine->RegisterObjectType(
"ConsoleClass",
sizeof(Console), asOBJ_REF | asOBJ_NOCOUNT);
ROR_ASSERT(result>=0);
50 result = engine->RegisterObjectMethod(
"ConsoleClass",
"CVarClass @cVarCreate(const string &in, const string &in, int, const string &in)", asMETHOD(Console,cVarCreate), asCALL_THISCALL);
ROR_ASSERT(result>=0);
51 result = engine->RegisterObjectMethod(
"ConsoleClass",
"CVarClass @cVarFind(const string &in)", asMETHOD(Console,cVarFind), asCALL_THISCALL);
ROR_ASSERT(result>=0);
52 result = engine->RegisterObjectMethod(
"ConsoleClass",
"CVarClass @cVarGet(const string &in, int)", asMETHOD(Console,cVarGet), asCALL_THISCALL);
ROR_ASSERT(result>=0);
53 result = engine->RegisterObjectMethod(
"ConsoleClass",
"CVarClass @cVarSet(const string &in, const string &in)", asMETHOD(Console,cVarSet), asCALL_THISCALL);
ROR_ASSERT(result>=0);
54 result = engine->RegisterObjectMethod(
"ConsoleClass",
"void cVarAssign(CVarClass@, const string &in)", asMETHOD(Console,cVarAssign), asCALL_THISCALL);
ROR_ASSERT(result>=0);