diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-19 23:04:11 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-19 23:04:11 +0000 |
commit | 30b8b4ecb92bb208c25a970d767e41ca102b16f1 (patch) | |
tree | d800bd7ab320d133a32b8ac7f63cb35d3b0274aa /src/resources/mapreader.cpp | |
parent | 041f934a4276f21bf13e21fbcb26f638ec73090a (diff) | |
download | mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.tar.gz mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.tar.bz2 mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.tar.xz mana-30b8b4ecb92bb208c25a970d767e41ca102b16f1.zip |
Committed new graphics for button, checkbox and radio button by romulo. Also
added a bit of padding to the windows.
Diffstat (limited to 'src/resources/mapreader.cpp')
-rw-r--r-- | src/resources/mapreader.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp index ccf38ac3..c86f7fe4 100644 --- a/src/resources/mapreader.cpp +++ b/src/resources/mapreader.cpp @@ -117,24 +117,18 @@ void MapReader::readLayer(xmlNodePtr node, Map *map, int layer) //xmlChar *name = xmlGetProp(node, BAD_CAST "name"); node = node->xmlChildrenNode; + int h = map->getHeight(); + int w = map->getWidth(); int x = 0; int y = 0; // Load the tile data - /* while (node != NULL) { if (xmlStrEqual(node->name, BAD_CAST "tile") && y < h) { - xmlChar *name = xmlGetProp(node, BAD_CAST "name"); int gid = getProperty(node, "gid", -1); - - if (gid > -1) { - layer->setTile(Point(x, y), map->getTile(gid)); - } - else { - layer->setTile(Point(x, y), NULL); - } + map->setTile(x, y, layer, (gid > -1) ? gid : 0); x++; if (x == w) {x = 0; y++;} @@ -146,7 +140,6 @@ void MapReader::readLayer(xmlNodePtr node, Map *map, int layer) node = node->next; } } - */ } /* |