From 0ca85613f16a732ca92cd1b665fe417479c25fe1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 8 Sep 2013 19:16:30 +0300 Subject: add atlas for common/shared images between maps. This atlas automatically will be used in all maps. Good place for storing particle effects. Atlas name is "all". --- src/resources/mapdb.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/resources/mapdb.cpp') diff --git a/src/resources/mapdb.cpp b/src/resources/mapdb.cpp index d27d2f8ba..9dbf17949 100644 --- a/src/resources/mapdb.cpp +++ b/src/resources/mapdb.cpp @@ -115,6 +115,15 @@ void MapDB::readAtlas(XmlNodePtr node) mAtlases[atlas].push_back(file); } } + if (atlas != "all") + { + const AtlasCIter &allAtlas = mAtlases.find("all"); + if (allAtlas != mAtlases.end()) + { + FOR_EACH (StringVectCIter, it, (*allAtlas).second) + mAtlases[atlas].push_back(*it); + } + } } void MapDB::loadInfo() -- cgit v1.2.3-60-g2f50