From 79b6dfb373e3a7165ff2dfa5563d73560b15212d Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Wed, 25 Mar 2009 11:55:32 -0600 Subject: 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 --- src/resources/mapreader.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/resources') 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; -- cgit v1.2.3-70-g09d2