This repository has been archived on 2026-04-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Tortuga/server/base_room.cpp
T
2013-08-24 23:20:43 +10:00

31 lines
577 B
C++

#include "base_room.hpp"
#include "SDL/SDL_thread.h"
#include <iostream>
BaseRoom::BaseRoom(std::map<std::string, std::string> args):
arguments(args)
{
//
}
int roomThread(void* ptr) {
#ifdef DEBUG
std::cout << "Opening room" << std::endl;
#endif
try {
reinterpret_cast<BaseRoom*>(ptr)->Init();
reinterpret_cast<BaseRoom*>(ptr)->Loop();
reinterpret_cast<BaseRoom*>(ptr)->Quit();
}
catch(std::exception& e) {
std::cerr << "Fatal room error: " << e.what() << std::endl;
return 1;
}
#ifdef DEBUG
std::cout << "Closing room" << std::endl;
#endif
return 0;
}