[Scummvm-cvs-logs] SF.net SVN: scummvm:[53116] scummvm/trunk/engines/hugo

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Sun Oct 10 15:06:48 CEST 2010


Revision: 53116
          http://scummvm.svn.sourceforge.net/scummvm/?rev=53116&view=rev
Author:   strangerke
Date:     2010-10-10 13:06:48 +0000 (Sun, 10 Oct 2010)

Log Message:
-----------
HUGO: Fix 'Exit' command behavior in the DOS versions

Modified Paths:
--------------
    scummvm/trunk/engines/hugo/engine.cpp
    scummvm/trunk/engines/hugo/game.h
    scummvm/trunk/engines/hugo/hugo.cpp
    scummvm/trunk/engines/hugo/parser.cpp

Modified: scummvm/trunk/engines/hugo/engine.cpp
===================================================================
--- scummvm/trunk/engines/hugo/engine.cpp	2010-10-10 11:40:16 UTC (rev 53115)
+++ scummvm/trunk/engines/hugo/engine.cpp	2010-10-10 13:06:48 UTC (rev 53116)
@@ -91,6 +91,7 @@
 	_status.jumpExitFl    = false;                  // Can't jump to a screen exit
 	_status.godModeFl     = false;                  // No special cheats allowed
 	_status.helpFl        = false;                  // Not calling WinHelp()
+	_status.doQuitFl      = false;
 	_status.path[0]       = 0;                      // Path to write files
 	_status.saveSlot      = 0;                      // Slot to save/restore game
 	_status.screenWidth   = 0;                      // Desktop screen width

Modified: scummvm/trunk/engines/hugo/game.h
===================================================================
--- scummvm/trunk/engines/hugo/game.h	2010-10-10 11:40:16 UTC (rev 53115)
+++ scummvm/trunk/engines/hugo/game.h	2010-10-10 13:06:48 UTC (rev 53116)
@@ -796,6 +796,7 @@
 	bool     jumpExitFl;                            // Allowed to jump to a screen exit
 	bool     godModeFl;                             // Allow DEBUG features in live version
 	bool     helpFl;                                // Calling WinHelp (don't disable music)
+	bool     doQuitFl;
 	uint32   tick;                                  // Current time in ticks
 	uint32   saveTick;                              // Time of last save in ticks
 	vstate_t viewState;                             // View state machine

Modified: scummvm/trunk/engines/hugo/hugo.cpp
===================================================================
--- scummvm/trunk/engines/hugo/hugo.cpp	2010-10-10 11:40:16 UTC (rev 53115)
+++ scummvm/trunk/engines/hugo/hugo.cpp	2010-10-10 13:06:48 UTC (rev 53116)
@@ -223,9 +223,9 @@
 	// Start the state machine
 	_status.viewState = V_INTROINIT;
 
-	bool doQuitFl = false;
+	_status.doQuitFl = false;
 
-	while (!doQuitFl) {
+	while (!_status.doQuitFl) {
 		g_system->updateScreen();
 
 		runMachine();
@@ -253,7 +253,7 @@
 				_status.rightButtonFl = false;
 				break;
 			case Common::EVENT_QUIT:
-				doQuitFl = true;
+				_status.doQuitFl = true;
 				break;
 			default:
 				break;
@@ -322,6 +322,7 @@
 		break;
 	case V_EXIT:                                    // Game over or user exited
 		gameStatus.viewState = V_IDLE;
+		_status.doQuitFl = true;
 		break;
 	}
 }

Modified: scummvm/trunk/engines/hugo/parser.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser.cpp	2010-10-10 11:40:16 UTC (rev 53115)
+++ scummvm/trunk/engines/hugo/parser.cpp	2010-10-10 13:06:48 UTC (rev 53116)
@@ -910,8 +910,7 @@
 	if (!strcmp("exit", _line) || strstr(_line, "quit")) {
 		if (Utils::Box(BOX_YESNO, "%s", _vm._textParser[kTBExit_1d]) != 0)
 			_vm.endGame();
-		else
-			return;
+		return;
 	}
 
 	// SAVE/RESTORE


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