[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src game.cpp
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src game.cpp |
Date: |
Sun, 21 Aug 2005 12:48:26 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 05/08/21 16:48:26
Modified files:
src : game.cpp
Log message:
Fixed #14235 : tips of day are now changed when playing a game, not when
opening any random dialog.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.272&tr2=1.273&r1=text&r2=text
Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.272 wesnoth/src/game.cpp:1.273
--- wesnoth/src/game.cpp:1.272 Thu Aug 11 14:41:11 2005
+++ wesnoth/src/game.cpp Sun Aug 21 16:48:26 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.272 2005/08/11 14:41:11 ott Exp $ */
+/* $Id: game.cpp,v 1.273 2005/08/21 16:48:26 gruikya Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -1637,6 +1637,9 @@
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE);
#endif
+ int ntip = -1;
+ config tips_of_day;
+
for(;;) {
//make sure the game config is always set to how it should be
at the title screen
game.reset_game_cfg();
@@ -1662,12 +1665,9 @@
std::cerr << (SDL_GetTicks() - start_ticks) << "\n";
gui::TITLE_RESULT res = game.is_loading() ? gui::LOAD_GAME :
gui::TITLE_CONTINUE;
- int ntip = -1;
- config tips_of_day;
while(res == gui::TITLE_CONTINUE) {
res = gui::show_title(game.disp(),tips_of_day,&ntip);
}
- tips_of_day.clear();
game_controller::RELOAD_GAME_DATA should_reload =
game_controller::RELOAD_DATA;
std::cerr << "title screen returned result\n";
@@ -1703,6 +1703,7 @@
}
game.play_game(should_reload);
+ ntip = -1; // Change tip when a game is played
}
return 0;