diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/db/mapdb.cpp | 2 | ||||
-rw-r--r-- | src/resources/db/mapdb.h | 14 | ||||
-rw-r--r-- | src/resources/mapinfo.h | 41 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 2 |
4 files changed, 45 insertions, 14 deletions
diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp index 20d108f13..ea734a150 100644 --- a/src/resources/db/mapdb.cpp +++ b/src/resources/db/mapdb.cpp @@ -177,7 +177,7 @@ const std::string MapDB::getMapName(const std::string &name) return name; } -const MapDB::MapInfo *MapDB::getMapAtlas(const std::string &name) +const MapInfo *MapDB::getMapAtlas(const std::string &name) { const MapInfoIter it = mInfos.find(name); if (it == mInfos.end()) diff --git a/src/resources/db/mapdb.h b/src/resources/db/mapdb.h index c2fbb3137..ae001ccad 100644 --- a/src/resources/db/mapdb.h +++ b/src/resources/db/mapdb.h @@ -24,6 +24,8 @@ #include "utils/stringvector.h" +#include "resources/mapinfo.h" + #include <map> #include "localconsts.h" @@ -33,18 +35,6 @@ */ namespace MapDB { - struct MapInfo - { - MapInfo() : - atlas(), - files(nullptr) - { - } - - std::string atlas; - const StringVect *files; - }; - /** * Loads the map remap data from <code>maps\remap.xml</code>. */ diff --git a/src/resources/mapinfo.h b/src/resources/mapinfo.h new file mode 100644 index 000000000..ebe7ec66c --- /dev/null +++ b/src/resources/mapinfo.h @@ -0,0 +1,41 @@ +/* + * Color database + * Copyright (C) 2008 Aethyra Development Team + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef RESOURCES_MAPINFO_H +#define RESOURCES_MAPINFO_H + +#include "utils/stringvector.h" + +#include "localconsts.h" + +struct MapInfo final +{ + MapInfo() : + atlas(), + files(nullptr) + { + } + + std::string atlas; + const StringVect *files; +}; + +#endif // RESOURCES_MAPINFO_H diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index c1fbf038a..6a15555d9 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -326,7 +326,7 @@ Map *MapReader::readMap(XmlNodePtrConst node, const std::string &path) #ifdef USE_OPENGL if (graphicsManager.getUseAtlases()) { - const MapDB::MapInfo *const info = MapDB::getMapAtlas(fileName); + const MapInfo *const info = MapDB::getMapAtlas(fileName); if (info) { map->setAtlas(resman->getAtlas( |