Padded some API internals

This commit is contained in:
Kayne Ruse
2015-01-11 22:31:27 +11:00
parent dfae33cbd1
commit cf1008f0d9
3 changed files with 51 additions and 17 deletions
+10 -2
View File
@@ -23,20 +23,28 @@
#include "waypoint_manager.hpp"
//TODO: figure out a way to iterate through elements of managers from lua
static int create(lua_State* L) {
WaypointManager* mgr = static_cast<WaypointManager*>(lua_touserdata(L, 1));
//TODO
}
static int unload(lua_State* L) {
WaypointManager* mgr = static_cast<WaypointManager*>(lua_touserdata(L, 1));
//TODO
}
static int getWaypoint(lua_State* L) {
//TODO
WaypointManager* mgr = static_cast<WaypointManager*>(lua_touserdata(L, 1));
lua_pushlightuserdata(L, mgr->Get(lua_tointeger(L, 2)));
return 1;
}
static int getLoadedCount(lua_State* L) {
//TODO
WaypointManager* mgr = static_cast<WaypointManager*>(lua_touserdata(L, 1));
lua_pushinteger(L, mgr->GetLoadedCount());
return 1;
}
static const luaL_Reg waypointManagerLib[] = {