[Super-tux-commit] supertux/src tilemap.cpp,1.13,1.14
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-07-01 15:25:14
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13968/src Modified Files: tilemap.cpp Log Message: Found the evil bug that was causing the tilemap to not differ interactive, foreground or background tiles, in the new level format. 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? :) Index: tilemap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/tilemap.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- tilemap.cpp 29 Jun 2004 13:00:43 -0000 1.13 +++ tilemap.cpp 1 Jul 2004 15:25:02 -0000 1.14 @@ -43,16 +43,16 @@ { 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); |