summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-25 11:55:32 -0600
committerIra Rice <irarice@gmail.com>2009-03-25 11:55:32 -0600
commit79b6dfb373e3a7165ff2dfa5563d73560b15212d (patch)
tree3d3692cbdfaf6307edf60506704bf8a011dea055 /src/resources
parente0be7afc936c39e2b0e1db84a13653cfd78a6035 (diff)
downloadmana-client-79b6dfb373e3a7165ff2dfa5563d73560b15212d.tar.gz
mana-client-79b6dfb373e3a7165ff2dfa5563d73560b15212d.tar.bz2
mana-client-79b6dfb373e3a7165ff2dfa5563d73560b15212d.tar.xz
mana-client-79b6dfb373e3a7165ff2dfa5563d73560b15212d.zip
Relaxed collision and fringe naming slightly so that they just need to
start with collision or fringe, instead of being required to be the same case throughout the beginning of the layer name. Also made a default name for popup menus so that their skins can also be changed by users. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/mapreader.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 901a2561..e40acd77 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -322,10 +322,11 @@ void MapReader::readLayer(xmlNodePtr node, Map *map)
const int h = XML::getProperty(node, "height", map->getHeight());
const int offsetX = XML::getProperty(node, "x", 0);
const int offsetY = XML::getProperty(node, "y", 0);
- const std::string name = XML::getProperty(node, "name", "");
+ std::string name = XML::getProperty(node, "name", "");
+ name = toLower(name);
- const bool isFringeLayer = (name.substr(0,6) == "Fringe");
- const bool isCollisionLayer = (name.substr(0,9) == "Collision");
+ const bool isFringeLayer = (name.substr(0,6) == "fringe");
+ const bool isCollisionLayer = (name.substr(0,9) == "collision");
MapLayer *layer = 0;