Encapsulated RoomData, did some other refactoring
This commit is contained in:
@@ -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}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user