[Scummvm-cvs-logs] SF.net SVN: scummvm:[41243] scummvm/trunk/engines/agi

sev at users.sourceforge.net sev at users.sourceforge.net
Sat Jun 6 19:40:56 CEST 2009


Revision: 41243
          http://scummvm.svn.sourceforge.net/scummvm/?rev=41243&view=rev
Author:   sev
Date:     2009-06-06 17:40:56 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
Fix bug #2721940: "AGI: Gold Rush! Restart Option differs from original"

Modified Paths:
--------------
    scummvm/trunk/engines/agi/agi.cpp
    scummvm/trunk/engines/agi/agi.h
    scummvm/trunk/engines/agi/cycle.cpp
    scummvm/trunk/engines/agi/keyboard.cpp
    scummvm/trunk/engines/agi/op_cmd.cpp
    scummvm/trunk/engines/agi/op_test.cpp
    scummvm/trunk/engines/agi/saveload.cpp
    scummvm/trunk/engines/agi/text.cpp

Modified: scummvm/trunk/engines/agi/agi.cpp
===================================================================
--- scummvm/trunk/engines/agi/agi.cpp	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/agi.cpp	2009-06-06 17:40:56 UTC (rev 41243)
@@ -394,8 +394,6 @@
 
 	initWords();
 
-	restartGame = false;
-
 	if (!_menu)
 		_menu = new Menu(this, _gfx, _picture);
 
@@ -679,6 +677,8 @@
 
 	_objects = NULL;
 
+	_restartGame = false;
+
 	_oldMode = -1;
 
 	_predictiveDialogRunning = false;

Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/agi.h	2009-06-06 17:40:56 UTC (rev 41243)
@@ -808,7 +808,7 @@
 
 	uint8 *_intobj;
 	int _oldMode;
-	bool restartGame;
+	bool _restartGame;
 
 	Menu* _menu;
 

Modified: scummvm/trunk/engines/agi/cycle.cpp
===================================================================
--- scummvm/trunk/engines/agi/cycle.cpp	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/cycle.cpp	2009-06-06 17:40:56 UTC (rev 41243)
@@ -120,7 +120,7 @@
 	oldSound = getflag(fSoundOn);
 
 	_game.exitAllLogics = false;
-	while (runLogic(0) == 0 && !(shouldQuit() || restartGame)) {
+	while (runLogic(0) == 0 && !(shouldQuit() || _restartGame)) {
 		_game.vars[vWordNotFound] = 0;
 		_game.vars[vBorderTouchObj] = 0;
 		_game.vars[vBorderCode] = 0;
@@ -369,7 +369,7 @@
 			saveGame(getSavegameFilename(0), "Autosave");
 		}
 
-	} while (!(shouldQuit() || restartGame));
+	} while (!(shouldQuit() || _restartGame));
 
 	_sound->stopSound();
 
@@ -390,9 +390,9 @@
 		if (agiInit() != errOK)
 			break;
 
-		if (restartGame) {
+		if (_restartGame) {
 			setflag(fRestartGame, true);
-			restartGame = false;
+			_restartGame = false;
 		}
 
 		// Set computer type (v20 i.e. vComputer)
@@ -446,7 +446,7 @@
 		ec = playGame();
 		_game.state = STATE_LOADED;
 		agiDeinit();
-	} while (restartGame);
+	} while (_restartGame);
 
 	delete _menu;
 	_menu = NULL;

Modified: scummvm/trunk/engines/agi/keyboard.cpp
===================================================================
--- scummvm/trunk/engines/agi/keyboard.cpp	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/keyboard.cpp	2009-06-06 17:40:56 UTC (rev 41243)
@@ -385,7 +385,7 @@
 	}
 
 	debugC(3, kDebugLevelInput, "waiting...");
-	while (!(shouldQuit() || restartGame || getflag(fRestoreJustRan))) {
+	while (!(shouldQuit() || _restartGame || getflag(fRestoreJustRan))) {
 		_gfx->pollTimer();	// msdos driver -> does nothing
 		key = doPollKeyboard();
 		if (key == KEY_ENTER || key == KEY_ESCAPE || key == BUTTON_LEFT)
@@ -408,7 +408,7 @@
 	}
 
 	debugC(3, kDebugLevelInput, "waiting... (any key)");
-	while (!(shouldQuit() || restartGame)) {
+	while (!(shouldQuit() || _restartGame)) {
 		_gfx->pollTimer();	// msdos driver -> does nothing
 		key = doPollKeyboard();
 		if (key)

Modified: scummvm/trunk/engines/agi/op_cmd.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_cmd.cpp	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/op_cmd.cpp	2009-06-06 17:40:56 UTC (rev 41243)
@@ -1242,7 +1242,7 @@
 		g_agi->selectionBox(" Restart game, or continue? \n\n\n", buttons);
 
 	if (sel == 0) {
-		g_agi->restartGame = true;
+		g_agi->_restartGame = true;
 		g_agi->setflag(fRestartGame, true);
 		g_agi->_menu->enableAll();
 	}
@@ -1346,7 +1346,7 @@
 
 	do {
 		g_agi->mainCycle();
-	} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->restartGame));
+	} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->_restartGame));
 }
 
 cmd(get_num) {
@@ -1366,7 +1366,7 @@
 
 	do {
 		g_agi->mainCycle();
-	} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->restartGame));
+	} while (game.inputMode == INPUT_GETSTRING && !(g_agi->shouldQuit() || g_agi->_restartGame));
 
 	_v[p1] = atoi(game.strings[MAX_STRINGS]);
 
@@ -1770,7 +1770,7 @@
 	curLogic->cIP = curLogic->sIP;
 
 	timerHack = 0;
-	while (ip < _game.logics[n].size && !(shouldQuit() || restartGame)) {
+	while (ip < _game.logics[n].size && !(shouldQuit() || _restartGame)) {
 		if (_debug.enabled) {
 			if (_debug.steps > 0) {
 				if (_debug.logic0 || n) {

Modified: scummvm/trunk/engines/agi/op_test.cpp
===================================================================
--- scummvm/trunk/engines/agi/op_test.cpp	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/op_test.cpp	2009-06-06 17:40:56 UTC (rev 41243)
@@ -230,7 +230,7 @@
 	uint8 p[16] = { 0 };
 	bool end_test = false;
 
-	while (retval && !(shouldQuit() || restartGame) && !end_test) {
+	while (retval && !(shouldQuit() || _restartGame) && !end_test) {
 		if (_debug.enabled && (_debug.logic0 || lognum))
 			debugConsole(lognum, lTEST_MODE, NULL);
 

Modified: scummvm/trunk/engines/agi/saveload.cpp
===================================================================
--- scummvm/trunk/engines/agi/saveload.cpp	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/saveload.cpp	2009-06-06 17:40:56 UTC (rev 41243)
@@ -574,7 +574,7 @@
 	int oldFirstSlot = _firstSlot + 1;
 	int oldActive = active + 1;
 
-	while (!(shouldQuit() || restartGame)) {
+	while (!(shouldQuit() || _restartGame)) {
 		int sbPos = 0;
 
 		// Use the extreme scrollbar positions only if the extreme

Modified: scummvm/trunk/engines/agi/text.cpp
===================================================================
--- scummvm/trunk/engines/agi/text.cpp	2009-06-06 17:40:27 UTC (rev 41242)
+++ scummvm/trunk/engines/agi/text.cpp	2009-06-06 17:40:56 UTC (rev 41243)
@@ -379,7 +379,7 @@
 	AllowSyntheticEvents on(this);
 
 	debugC(4, kDebugLevelText, "selectionBox(): waiting...");
-	while (!(shouldQuit() || restartGame)) {
+	while (!(shouldQuit() || _restartGame)) {
 		for (i = 0; b[i]; i++)
 			_gfx->drawCurrentStyleButton(bx[i], by[i], b[i], i == active, false, i == 0);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list