Updated room system and room API, more to come

There's a lot of verbosity in the scripts, so it might be beneficial to
redice that at some point.
This commit is contained in:
Kayne Ruse
2014-12-31 04:52:10 +11:00
parent f9c19a630d
commit 8e50be24d4
8 changed files with 93 additions and 46 deletions
+4 -5
View File
@@ -37,21 +37,20 @@
class RoomManager: public Singleton<RoomManager> {
public:
//common public methods
int Create(std::string);
void Unload(int uid);
int Create(std::string name, std::string tileset);
void UnloadAll();
void UnloadIf(std::function<bool(std::pair<const int,RoomData>)> fn);
//accessors and mutators
RoomData* Get(int uid);
RoomData* Get(std::string name);
int GetLoadedCount();
int GetTotalCount();
std::map<int, RoomData>* GetContainer();
//hooks
lua_State* SetLuaState(lua_State* L) { return lua = L; }
lua_State* GetLuaState() { return lua; }
lua_State* SetLuaState(lua_State* L);
lua_State* GetLuaState();
private:
friend Singleton<RoomManager>;