diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/db/itemdb.cpp | 3 | ||||
-rw-r--r-- | src/resources/mapreader.cpp | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/db/itemdb.cpp b/src/resources/db/itemdb.cpp index 45fda0e66..da8072980 100644 --- a/src/resources/db/itemdb.cpp +++ b/src/resources/db/itemdb.cpp @@ -39,6 +39,7 @@ #include "utils/delete2.h" #include "utils/dtor.h" +#include "utils/stringmap.h" #include "debug.h" @@ -50,7 +51,7 @@ namespace bool mLoaded = false; bool mConstructed = false; StringVect mTagNames; - std::map<std::string, int> mTags; + StringIntMap mTags; std::map<std::string, ItemSoundEvent::Type> mSoundNames; } // namespace diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 337b76df4..c2ccd9dc5 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -45,6 +45,7 @@ #include "utils/base64.h" #include "utils/delete2.h" +#include "utils/stringmap.h" #include <iostream> #include <zlib.h> @@ -969,7 +970,7 @@ Tileset *MapReader::readTileset(XmlNodePtr node, if (isProps) { // read tile properties to a map for simpler handling - std::map<std::string, int> tileProperties; + StringIntMap tileProperties; for_each_xml_child_node(propertyNode, tileNode) { if (!xmlNameEqual(propertyNode, "property")) @@ -998,9 +999,9 @@ Tileset *MapReader::readTileset(XmlNodePtr node, for (int i = 0; ; i++) { const std::string iStr(toString(i)); - const std::map<std::string, int>::const_iterator iFrame + StringIntMapCIter iFrame = tileProperties.find("animation-frame" + iStr); - const std::map<std::string, int>::const_iterator iDelay + StringIntMapCIter iDelay = tileProperties.find("animation-delay" + iStr); // possible need add random attribute? if (iFrame != tileProperties.end() |