summaryrefslogtreecommitdiffstats
path: root/src/game-server/mapmanager.cpp
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-09-22 18:45:57 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2007-09-22 18:45:57 +0000
commitac5375e554e882e0b56eeed9b6e51c06c8d37656 (patch)
tree8c0095d23e880ab112dacc7e94505aac86d04dd7 /src/game-server/mapmanager.cpp
parent88e3d219588052a8ab222ab4f6f2b27c9c29c1b2 (diff)
downloadmanaserv-ac5375e554e882e0b56eeed9b6e51c06c8d37656.tar.gz
manaserv-ac5375e554e882e0b56eeed9b6e51c06c8d37656.tar.xz
manaserv-ac5375e554e882e0b56eeed9b6e51c06c8d37656.zip
Cleaned both configuration and resource managers.
Diffstat (limited to 'src/game-server/mapmanager.cpp')
-rw-r--r--src/game-server/mapmanager.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/game-server/mapmanager.cpp b/src/game-server/mapmanager.cpp
index 713bd2c..de752c0 100644
--- a/src/game-server/mapmanager.cpp
+++ b/src/game-server/mapmanager.cpp
@@ -23,11 +23,12 @@
#include <cassert>
-#include "resourcemanager.h"
+#include "game-server/mapmanager.hpp"
+
#include "game-server/map.hpp"
#include "game-server/mapcomposite.hpp"
-#include "game-server/mapmanager.hpp"
#include "game-server/mapreader.hpp"
+#include "game-server/resourcemanager.hpp"
#include "utils/logger.h"
#include "utils/xml.hpp"
@@ -43,9 +44,8 @@ MapManager::Maps const &MapManager::getMaps()
void MapManager::initialize(std::string const &mapReferenceFile)
{
- ResourceManager *resman = ResourceManager::getInstance();
int size;
- char *data = (char *)resman->loadFile(mapReferenceFile, size);
+ char *data = ResourceManager::loadFile(mapReferenceFile, size);
if (!data) {
LOG_ERROR("Map Manager: Could not find " << mapReferenceFile << "!");
@@ -117,8 +117,7 @@ void MapManager::raiseActive(int mapId)
}
std::string file = "maps/" + composite->getName() + ".tmx";
- ResourceManager *resman = ResourceManager::getInstance();
- if (!resman->exists(file))
+ if (!ResourceManager::exists(file))
{
file += ".gz";
}