Found the evil bug that was causing the tilemap to not differ interactive, foreground...
authorRicardo Cruz <rick2@aeiou.pt>
Thu, 1 Jul 2004 15:25:02 +0000 (15:25 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Thu, 1 Jul 2004 15:25:02 +0000 (15:25 +0000)
It was really simple: there were two variables with the same name! A local string in parse() and an integer in the Tilemap class, both called layer.
Dunno why g++ didn't report any warning...

I think spawn points are not being saved. Matze, could you do that? :)

SVN-Revision: 1526

src/tilemap.cpp

index 42abf7b..a877dc9 100644 (file)
@@ -43,16 +43,16 @@ TileMap::TileMap(LispReader& reader)
 {
   tilemanager = TileManager::instance();
 
-  std::string layer;
-  if(reader.read_string("layer", layer)) {
-    if(layer == "background")
+  std::string layer_str;
+  if(reader.read_string("layer", layer_str)) {
+    if(layer_str == "background")
       layer = LAYER_BACKGROUNDTILES;
-    else if(layer == "interactive")
+    else if(layer_str == "interactive")
       layer = LAYER_TILES;
-    else if(layer == "foreground")
+    else if(layer_str == "foreground")
       layer = LAYER_FOREGROUNDTILES;
     else
-      std::cerr << "Unknown layer '" << layer << "' in tilemap.\n";
+      std::cerr << "Unknown layer '" << layer_str << "' in tilemap.\n";
   }
 
   reader.read_bool("solid", solid);