summaryrefslogtreecommitdiff
path: root/src/resources
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-20 15:26:12 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-02-20 15:26:12 +0000
commitd332272741e8382409453b975c66235d45e66cc7 (patch)
treea7d13b4883feef6a11bb6bbcabf3f4b899f309ac /src/resources
parentb570d0413c23d1684bf26e08da45e7e939ec5f9f (diff)
downloadmana-d332272741e8382409453b975c66235d45e66cc7.tar.gz
mana-d332272741e8382409453b975c66235d45e66cc7.tar.bz2
mana-d332272741e8382409453b975c66235d45e66cc7.tar.xz
mana-d332272741e8382409453b975c66235d45e66cc7.zip
Separated Tiles in MetaTiles and Images.
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/mapreader.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/resources/mapreader.cpp b/src/resources/mapreader.cpp
index 031188c1..a3f42829 100644
--- a/src/resources/mapreader.cpp
+++ b/src/resources/mapreader.cpp
@@ -88,8 +88,9 @@ Map* MapReader::readMap(xmlNodePtr node, const std::string &path)
int w = getProperty(node, "width", 0);
int h = getProperty(node, "height", 0);
- int tilew = getProperty(node, "tilewidth", DEFAULT_TILE_WIDTH);
- int tileh = getProperty(node, "tileheight", DEFAULT_TILE_HEIGHT);
+ // We only support tile width of 32 at the moment
+ //int tilew = getProperty(node, "tilewidth", DEFAULT_TILE_WIDTH);
+ //int tileh = getProperty(node, "tileheight", DEFAULT_TILE_HEIGHT);
int layerNr = 0;
Map* map = new Map(w, h);
@@ -124,8 +125,9 @@ void MapReader::readLayer(xmlNodePtr node, Map *map, int layer)
{
if (xmlStrEqual(node->name, BAD_CAST "tile") && y < h)
{
- int gid = getProperty(node, "gid", -1);
- map->setTile(x, y, layer, (gid > -1) ? gid : 0);
+ //int gid = getProperty(node, "gid", -1);
+ // TODO: Convert gid to Image* and set the tile
+ //map->setTile(x, y, layer, (gid > -1) ? gid : 0);
x++;
if (x == w) {x = 0; y++;}