diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-01-06 20:43:18 -0500 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-01-06 20:43:18 -0500 |
commit | 4f76de82c55e55cdaba1ddec85eb0d016b544633 (patch) | |
tree | 1f15f5b59487dd7bb345ba1437c6ed9d435313d9 /src/resources/mapreader.cpp | |
parent | fa87aa5ae0ca08fc0a2d404e4a12120ddb337931 (diff) | |
download | mana-4f76de82c55e55cdaba1ddec85eb0d016b544633.tar.gz mana-4f76de82c55e55cdaba1ddec85eb0d016b544633.tar.bz2 mana-4f76de82c55e55cdaba1ddec85eb0d016b544633.tar.xz mana-4f76de82c55e55cdaba1ddec85eb0d016b544633.zip |
Fixes so mapreader ignores the case of object types
This will decrease warnings in the log file by a good bit
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index 291dd732..60b5e9d2 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -241,8 +241,8 @@ Map *MapReader::readMap(xmlNodePtr node, const std::string &path) { if (xmlStrEqual(objectNode->name, BAD_CAST "object")) { - const std::string objType = - XML::getProperty(objectNode, "type", ""); + std::string objType = XML::getProperty(objectNode, "type", ""); + objType = toUpper(objType); if (objType == "WARP" || objType == "NPC" || objType == "SCRIPT" || objType == "SPAWN") @@ -251,8 +251,7 @@ Map *MapReader::readMap(xmlNodePtr node, const std::string &path) continue; } - const std::string objName = - XML::getProperty(objectNode, "name", ""); + const std::string objName = XML::getProperty(objectNode, "name", ""); const int objX = XML::getProperty(objectNode, "x", 0); const int objY = XML::getProperty(objectNode, "y", 0); |