Encapsulated RoomData, did some other refactoring

This commit is contained in:
Kayne Ruse
2014-08-14 00:13:19 +10:00
parent 6d98bab000
commit 98ffcb8cd3
6 changed files with 44 additions and 33 deletions
+7 -7
View File
@@ -25,17 +25,17 @@
static int getPager(lua_State* L) {
RoomData* room = reinterpret_cast<RoomData*>(lua_touserdata(L, 1));
lua_pushlightuserdata(L, reinterpret_cast<void*>(&room->pager));
lua_pushlightuserdata(L, reinterpret_cast<void*>(room->GetPager()) );
return 1;
}
static int onCreate(lua_State* L) {
//TODO: onCreate()
static int create(lua_State* L) {
//TODO: create()
return 0;
}
static int onUnload(lua_State* L) {
//TODO: onUnload()
static int unload(lua_State* L) {
//TODO: unload()
return 0;
}
@@ -43,8 +43,8 @@ static int onUnload(lua_State* L) {
static const luaL_Reg roomLib[] = {
{"GetPager",getPager},
{"OnCreate", onCreate},
{"OnUnload", onUnload},
{"Create", create},
{"Unload", unload},
{nullptr, nullptr}
};