[Super-tux-commit] supertux/src title.cpp,1.81.2.1,1.81.2.2 worldmap.h,1.28.2.3,1.28.2.4
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-07-18 19:12:51
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6841/src Modified Files: Tag: supertux_0_1_1_branch title.cpp worldmap.h Log Message: Mark all contrib world map levels as played. This as to be done (at least, until another solution is implemented), since the world map level's state are not saved, and it would make no sense to make the player to have to play the all map without exiting the game. Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.81.2.1 retrieving revision 1.81.2.2 diff -u -d -r1.81.2.1 -r1.81.2.2 --- title.cpp 18 Jul 2004 11:58:15 -0000 1.81.2.1 +++ title.cpp 18 Jul 2004 19:12:27 -0000 1.81.2.2 @@ -142,6 +142,9 @@ { WorldMapNS::WorldMap worldmap; worldmap.loadmap(worldmap_list.item[index - contrib_subsets.size()]); + // since levels state is not saved, make them all as solved, since + // we can't expect the user to play them all at once. + worldmap.set_levels_as_solved(); worldmap.display(); Menu::set_current(main_menu); Index: worldmap.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.h,v retrieving revision 1.28.2.3 retrieving revision 1.28.2.4 diff -u -d -r1.28.2.3 -r1.28.2.4 --- worldmap.h 18 Jul 2004 11:58:15 -0000 1.28.2.3 +++ worldmap.h 18 Jul 2004 19:12:28 -0000 1.28.2.4 @@ -188,7 +188,7 @@ ~WorldMap(); void set_map_file(std::string mapfile); - + /** Busy loop */ void display(); @@ -223,6 +223,12 @@ const int& get_start_y() const { return start_y; } + /** This functions should be call by contrib menu to set + all levels as played, since their state is not saved. */ + void set_levels_as_solved() + { for(Levels::iterator i = levels.begin(); i != levels.end(); ++i) + i->solved = true; } + private: void on_escape_press(); }; |