[Super-tux-commit] supertux/src title.cpp,1.127,1.128 worldmap.cpp,1.125,1.126
Brought to you by:
wkendrick
From: Ryan F. <sik...@us...> - 2004-10-24 23:29:16
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26582 Modified Files: title.cpp worldmap.cpp Log Message: committed patches from Richard Smith Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- title.cpp 21 Oct 2004 22:05:08 -0000 1.127 +++ title.cpp 24 Oct 2004 23:29:06 -0000 1.128 @@ -80,6 +80,20 @@ static FrameRate frame_rate(100); +/* If the demo was stopped - because game started, level + editor was excuted, etc - call this when you get back + to the title code. + */ +void resume_demo() +{ + // FIXME: shouldn't be needed if GameSession + // didn't relay on global variables + titlesession->get_current_sector()->activate(); + titlesession->set_current(); + + frame_rate.update(); +} + void update_load_save_game_menu(Menu* pmenu) { for(int i = 2; i < 7; ++i) @@ -181,6 +195,7 @@ worldmap.display(); // run the map Menu::set_current(main_menu); + resume_demo(); } else if (index < (int)contrib_subsets.size() + first_level_index) { @@ -239,26 +254,11 @@ session.run(); player_status.reset(); Menu::set_current(main_menu); - titlesession->get_current_sector()->activate(); - titlesession->set_current(); + resume_demo(); } } } -/* If the demo was stopped - because game started, level - editor was excuted, etc - call this when you get back - to the title code. - */ -void resume_demo() -{ - // FIXME: shouldn't be needed if GameSession - // didn't relay on global variables - titlesession->get_current_sector()->activate(); - titlesession->set_current(); - - frame_rate.update(); -} - void draw_demo(double frame_ratio) { Sector* world = titlesession->get_current_sector(); Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- worldmap.cpp 21 Oct 2004 17:08:17 -0000 1.125 +++ worldmap.cpp 24 Oct 2004 23:29:06 -0000 1.126 @@ -631,6 +631,9 @@ } lisp_free(root_obj); + + delete tux; + tux = new Tux(this); } void WorldMap::get_level_title(Level& level) |