X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fhigh_scores.cpp;h=dce9593bff65d8ef68c43e374cd21eecb50578b8;hb=84160722392a024dda42bd86ca9bd85b68c49457;hp=1849ff22debf681d0f95dfe3ae9eadb1204aadcb;hpb=e6d655ddad66169ced466eb17f0c27964800d5b3;p=supertux.git diff --git a/src/high_scores.cpp b/src/high_scores.cpp index 1849ff22d..dce9593bf 100644 --- a/src/high_scores.cpp +++ b/src/high_scores.cpp @@ -1,9 +1,22 @@ -/* - - by Adam Czachorowski - gislan@o2.pl - -*/ +// $Id$ +// +// SuperTux +// Copyright (C) 2004 Adam Czachorowski +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. /* Open the highscore file: */ @@ -77,7 +90,6 @@ void save_hs(int score) hs_score = score; - menu_reset(); Menu::set_current(highscore_menu); if(!highscore_menu->item[0].input) @@ -86,8 +98,7 @@ void save_hs(int score) strcpy(highscore_menu->item[0].input,hs_name.c_str()); /* ask for player's name */ - show_menu = 1; - while(show_menu) + while(Menu::current()) { bkgd->draw_bg(); @@ -96,12 +107,14 @@ void save_hs(int score) sprintf(str, "%d", hs_score); yellow_nums->draw(str, 350, 170, 1, NO_UPDATE); - menu_process_current(); + Menu::current()->draw(); + Menu::current()->action(); + flipscreen(); while(SDL_PollEvent(&event)) if(event.type == SDL_KEYDOWN) - current_menu->event(event); + Menu::current()->event(event); switch (highscore_menu->check()) {