diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-22 14:14:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-22 14:14:34 +0300 |
commit | da05d9dd98315378bdded216184294f376643191 (patch) | |
tree | ffc4b984c73c3bb68d26a1df6481634254075744 /src/resources/mapreader.cpp | |
parent | ec856b2026c7ceecab5f74942bb36661d7c6ae67 (diff) | |
download | mv-da05d9dd98315378bdded216184294f376643191.tar.gz mv-da05d9dd98315378bdded216184294f376643191.tar.bz2 mv-da05d9dd98315378bdded216184294f376643191.tar.xz mv-da05d9dd98315378bdded216184294f376643191.zip |
Use resource manager as global variable.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index f2ec5633d..8283a4268 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -330,7 +330,6 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) const std::string fileName = path.substr(path.rfind("/") + 1); map->setProperty("shortName", fileName); - ResourceManager *const resman = ResourceManager::getInstance(); #ifdef USE_OPENGL BLOCK_START("MapReader::readMap load atlas") @@ -339,7 +338,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) const MapInfo *const info = MapDB::getMapAtlas(fileName); if (info) { - map->setAtlas(resman->getAtlas( + map->setAtlas(resourceManager->getAtlas( info->atlas, *info->files)); } } @@ -460,7 +459,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) map->clearIndexedTilesets(); map->setActorsFix(0, atoi(map->getProperty("actorsfix").c_str())); map->reduce(); - map->setWalkLayer(resman->getWalkLayer(fileName, map)); + map->setWalkLayer(resourceManager->getWalkLayer(fileName, map)); unloadTempLayers(); map->updateDrawLayersList(); BLOCK_END("MapReader::readMap xml") @@ -946,8 +945,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node, if (!source.empty()) { - ResourceManager *const resman = ResourceManager::getInstance(); - Image *const tilebmp = resman->getImage( + Image *const tilebmp = resourceManager->getImage( resolveRelativePath(pathDir, source)); if (tilebmp) |