IDK what the fuck is going on, too tired to think
OK, so I think I was working on the parameters for CreateRoom() in lua, but then shit just got ot of control. IDK, I'm probably going about this all wrong anyway. I just want to finish this stage, and reach the high water mark again.
This commit is contained in:
@@ -23,31 +23,27 @@
|
||||
|
||||
#include "room_api.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
//-------------------------
|
||||
//public access methods
|
||||
//-------------------------
|
||||
|
||||
int RoomManager::Create(std::string roomName, std::string tilesetName) {
|
||||
int RoomManager::Create(std::string roomName) {
|
||||
std::cout << "Create-1" << std::endl;
|
||||
//create the room
|
||||
RoomData* newRoom = &elementMap[counter]; //implicitly constructs the element
|
||||
std::cout << "Create-2" << std::endl;
|
||||
newRoom->SetRoomName(roomName);
|
||||
std::cout << "Create-3" << std::endl;
|
||||
newRoom->pager.SetLuaState(lua);
|
||||
std::cout << "Create-4" << std::endl;
|
||||
|
||||
//finish the routine
|
||||
return counter++;
|
||||
}
|
||||
|
||||
int RoomManager::Load(std::string roomName, std::string tilesetName) {
|
||||
//TODO: RoomManager::Load()
|
||||
return -1;
|
||||
}
|
||||
|
||||
int RoomManager::Save(int uid) {
|
||||
//TODO: RoomManager::Save(uid)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void RoomManager::Unload(int uid) {
|
||||
//find the room
|
||||
std::map<int, RoomData>::iterator it = elementMap.find(uid);
|
||||
@@ -59,12 +55,6 @@ void RoomManager::Unload(int uid) {
|
||||
elementMap.erase(uid);
|
||||
}
|
||||
|
||||
void RoomManager::Delete(int uid) {
|
||||
//TODO: RoomManager::Delete(int uid)
|
||||
//NOTE: aliased to RoomManager::Unload(int uid)
|
||||
Unload(uid);
|
||||
}
|
||||
|
||||
void RoomManager::UnloadAll() {
|
||||
elementMap.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user