[Scummvm-cvs-logs] scummvm master -> 59dd072f63cfad3c9a251b9033dcf88377c4778c

wjp wjp at usecode.org
Sun May 29 16:04:38 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
59dd072f63 SCI: Make 'quit' an alias for 'quit game' in the console


Commit: 59dd072f63cfad3c9a251b9033dcf88377c4778c
    https://github.com/scummvm/scummvm/commit/59dd072f63cfad3c9a251b9033dcf88377c4778c
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-05-29T07:01:56-07:00

Commit Message:
SCI: Make 'quit' an alias for 'quit game' in the console

Changed paths:
    engines/sci/console.cpp



diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index ac87b3f..af94524 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -3362,20 +3362,22 @@ bool Console::cmdSfx01Track(int argc, const char **argv) {
 
 bool Console::cmdQuit(int argc, const char **argv) {
 	if (argc != 2) {
-		DebugPrintf("%s game - exit gracefully\n", argv[0]);
-		DebugPrintf("%s now - exit ungracefully\n", argv[0]);
-		return true;
 	}
 
-	if (!scumm_stricmp(argv[1], "game")) {
+	if (argc == 2 && !scumm_stricmp(argv[1], "now")) {
+		// Quit ungracefully
+		g_system->quit();
+	} else if (argc == 1 || (argc == 2 && !scumm_stricmp(argv[1], "game"))) {
+
 		// Quit gracefully
 		_engine->_gamestate->abortScriptProcessing = kAbortQuitGame; // Terminate VM
 		_debugState.seeking = kDebugSeekNothing;
 		_debugState.runningStep = 0;
 
-	} else if (!scumm_stricmp(argv[1], "now")) {
-		// Quit ungracefully
-		g_system->quit();
+	} else {
+		DebugPrintf("%s [game] - exit gracefully\n", argv[0]);
+		DebugPrintf("%s now - exit ungracefully\n", argv[0]);
+		return true;
 	}
 
 	return Cmd_Exit(0, 0);






More information about the Scummvm-git-logs mailing list