diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-13 22:18:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-30 02:57:13 +0300 |
commit | 135c19b4337e1ab45cff40a306eadc52a061ddef (patch) | |
tree | 0a163ca1edd542aec5570b7e451034aafb4089dd /src/resources/mapdb.cpp | |
parent | 3a2bab265768c219b0c077eef10b69dfe8158131 (diff) | |
download | manaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.gz manaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.bz2 manaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.tar.xz manaverse-135c19b4337e1ab45cff40a306eadc52a061ddef.zip |
add atlas textures support.
Diffstat (limited to 'src/resources/mapdb.cpp')
-rw-r--r-- | src/resources/mapdb.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/resources/mapdb.cpp b/src/resources/mapdb.cpp index 55c3d7306..2b2beed89 100644 --- a/src/resources/mapdb.cpp +++ b/src/resources/mapdb.cpp @@ -149,3 +149,16 @@ std::string MapDB::getMapName(const std::string &name) return it->second; return name; } + +MapDB::MapInfo *MapDB::getMapAtlas(const std::string &name) +{ + MapInfoIter it = mInfos.find(name); + if (it == mInfos.end()) + return nullptr; + MapInfo *const info = &(*it).second; + AtlasIter it2 = mAtlases.find(info->atlas); + if (it2 == mAtlases.end()) + return nullptr; + info->files = &((*it2).second); + return info; +} |