diff options
Diffstat (limited to 'src/resources/db')
-rw-r--r-- | src/resources/db/mapdb.cpp | 12 | ||||
-rw-r--r-- | src/resources/db/mapdb.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/resources/db/mapdb.cpp b/src/resources/db/mapdb.cpp index 5e9f31cfc..48d234bb4 100644 --- a/src/resources/db/mapdb.cpp +++ b/src/resources/db/mapdb.cpp @@ -210,3 +210,15 @@ const MapInfo *MapDB::getMapAtlas(const std::string &name) info->files = &((*it2).second); return info; } + +const MapInfo *MapDB::getAtlas(const std::string &name) +{ + MapInfo *const info = new MapInfo; + + const AtlasCIter it = mAtlases.find(name); + if (it == mAtlases.end()) + return nullptr; + info->atlas = name; + info->files = &(*it).second; + return info; +} diff --git a/src/resources/db/mapdb.h b/src/resources/db/mapdb.h index dfc0f1ca1..2a71de1ce 100644 --- a/src/resources/db/mapdb.h +++ b/src/resources/db/mapdb.h @@ -55,6 +55,8 @@ namespace MapDB const MapInfo *getMapAtlas(const std::string &name) A_WARN_UNUSED; + const MapInfo *getAtlas(const std::string &name) A_WARN_UNUSED; + // Maps DB typedef std::map<std::string, std::string> Maps; typedef Maps::iterator MapIterator; |