diff options
Diffstat (limited to 'src/game-server/mapmanager.hpp')
-rw-r--r-- | src/game-server/mapmanager.hpp | 65 |
1 files changed, 28 insertions, 37 deletions
diff --git a/src/game-server/mapmanager.hpp b/src/game-server/mapmanager.hpp index 63ef32c..432b0b1 100644 --- a/src/game-server/mapmanager.hpp +++ b/src/game-server/mapmanager.hpp @@ -29,43 +29,34 @@ class MapComposite; -/** - * MapManager loads/unloads maps - */ -class MapManager +namespace MapManager { - public: - typedef std::map< int, MapComposite * > Maps; - - /** - * Constructor (loads map reference file). - */ - MapManager(std::string const &); - - /** - * Returns the requested map. - */ - MapComposite *getMap(int); - - /** - * Returns all the maps. - */ - Maps const &getMaps() const { return maps; } - - /** - * Sets the activity status of the map. - */ - void raiseActive(int); - - /** - * Destructor. - */ - ~MapManager(); - - private: - Maps maps; -}; - -extern MapManager *mapManager; + typedef std::map< int, MapComposite * > Maps; + + /** + * Loads map reference file and prepares maps. + */ + void initialize(std::string const &); + + /** + * Destroy loaded maps. + */ + void deinitialize(); + + /** + * Returns the requested map. + */ + MapComposite *getMap(int); + + /** + * Returns all the maps. + */ + Maps const &getMaps(); + + /** + * Sets the activity status of the map. + */ + void raiseActive(int); +} #endif |