Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11510
Modified Files:
worldmap.cpp
Log Message:
- fixed back direction saving
Index: worldmap.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- worldmap.cpp 19 Apr 2004 13:23:33 -0000 1.33
+++ worldmap.cpp 19 Apr 2004 13:34:43 -0000 1.34
@@ -769,10 +769,14 @@
if (reader.read_lisp("tux", &tux_cur))
{
Point p;
+ std::string back_str = "none";
+
LispReader tux_reader(tux_cur);
tux_reader.read_int("x", &p.x);
tux_reader.read_int("y", &p.y);
-
+ tux_reader.read_string("back", &back_str);
+
+ tux->back_direction = string_to_direction(back_str);
tux->set_tile_pos(p);
}
@@ -788,16 +792,10 @@
{
std::string name;
bool solved = false;
- std::string back_str ="";
- Direction back = NONE;
LispReader level_reader(data);
level_reader.read_string("name", &name);
level_reader.read_bool("solved", &solved);
- if (level_reader.read_string("back", &back_str))
- back = string_to_direction(back_str);
-
- std::cout << "Name: " << name << " " << solved << std::endl;
for(Levels::iterator i = levels.begin(); i != levels.end(); ++i)
{
|