From: Ingo Ruhnke Date: Mon, 19 Apr 2004 19:22:27 +0000 (+0000) Subject: - removed menu_process_current() X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6e85c29076267d353d426427bdb64c0684297d01;p=supertux.git - removed menu_process_current() SVN-Revision: 579 --- diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 4b8f5778d..4c2bfd2cc 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -381,7 +381,8 @@ GameSession::draw() if(Menu::current()) { - menu_process_current(); + Menu::current()->action(); + Menu::current()->draw(); mouse_cursor->draw(); } diff --git a/src/high_scores.cpp b/src/high_scores.cpp index d50aea006..5b2d827a6 100644 --- a/src/high_scores.cpp +++ b/src/high_scores.cpp @@ -94,7 +94,9 @@ void save_hs(int score) sprintf(str, "%d", hs_score); yellow_nums->draw(str, 350, 170, 1, NO_UPDATE); - menu_process_current(); + Menu::current()->action(); + Menu::current()->draw(); + flipscreen(); while(SDL_PollEvent(&event)) diff --git a/src/leveleditor.cpp b/src/leveleditor.cpp index ab50b2e25..358462d3e 100644 --- a/src/leveleditor.cpp +++ b/src/leveleditor.cpp @@ -210,7 +210,9 @@ int leveleditor(int levelnb) if(Menu::current()) { - menu_process_current(); + Menu::current()->action(); + Menu::current()->draw(); + if(Menu::current() == leveleditor_menu) { switch (leveleditor_menu->check()) diff --git a/src/menu.cpp b/src/menu.cpp index d05f5109c..6c9fe4eca 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -523,17 +523,6 @@ Menu::draw() } } -/* --- MENU --- */ -/* Draw the current menu and execute the (menu)events */ -void menu_process_current() -{ - if(Menu::current()) - { - Menu::current()->action(); - Menu::current()->draw(); - } -} - /* Check for menu event */ void Menu::event(SDL_Event& event) diff --git a/src/menu.h b/src/menu.h index 92b1ae19f..8a7ef5534 100644 --- a/src/menu.h +++ b/src/menu.h @@ -132,9 +132,6 @@ extern Menu* highscore_menu; extern Menu* load_game_menu; extern Menu* save_game_menu; -/* "Calculate" and draw the menu */ -void menu_process_current(void); - #endif /*SUPERTUX_MENU_H*/ /* Local Variables: */ diff --git a/src/title.cpp b/src/title.cpp index 138b9ee49..7a3581513 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -300,7 +300,10 @@ bool title(void) /* Don't draw menu, if quit is true */ if(!done) - menu_process_current(); + { + Menu::current()->action(); + Menu::current()->draw(); + } if(Menu::current() == main_menu) { diff --git a/src/worldmap.cpp b/src/worldmap.cpp index e26391281..424b62778 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -708,7 +708,8 @@ WorldMap::display() if(Menu::current()) { - menu_process_current(); + Menu::current()->action(); + Menu::current()->draw(); mouse_cursor->draw(); } flipscreen();