SCI: fix console commands so that console gets detached correctly

svn-id: r50940
This commit is contained in:
Martin Kiewitz 2010-07-16 19:40:51 +00:00
parent 564b68a9fc
commit 92c0e7e800

View file

@ -1099,13 +1099,13 @@ bool Console::cmdRestoreGame(int argc, const char **argv) {
return true;
}
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdRestartGame(int argc, const char **argv) {
_engine->_gamestate->abortScriptProcessing = kAbortRestartGame;;
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdClassTable(int argc, const char **argv) {
@ -1341,7 +1341,7 @@ bool Console::cmdPlayVideo(int argc, const char **argv) {
if (filename.hasSuffix(".seq") || filename.hasSuffix(".avi") || filename.hasSuffix(".vmd")) {
_videoFile = filename;
_videoFrameDelay = (argc == 2) ? 10 : atoi(argv[2]);
return false;
return Cmd_Exit(0, 0);
} else {
DebugPrintf("Unknown video file type\n");
return true;
@ -1631,7 +1631,7 @@ bool Console::cmdShowMap(int argc, const char **argv) {
DebugPrintf("Map %d is not available.\n", map);
return true;
}
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdSongLib(int argc, const char **argv) {
@ -1676,8 +1676,7 @@ bool Console::cmdStartSound(int argc, const char **argv) {
}
g_sci->_soundCmd->startNewSound(number);
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdToggleSound(int argc, const char **argv) {
@ -2310,7 +2309,7 @@ bool Console::cmdTrace(int argc, const char **argv) {
_debugState.runningStep = atoi(argv[1]) - 1;
_debugState.debugging = true;
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdStepOver(int argc, const char **argv) {
@ -2318,14 +2317,14 @@ bool Console::cmdStepOver(int argc, const char **argv) {
_debugState.seekLevel = _engine->_gamestate->_executionStack.size();
_debugState.debugging = true;
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdStepEvent(int argc, const char **argv) {
_debugState.stopOnEvent = true;
_debugState.debugging = true;
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdStepRet(int argc, const char **argv) {
@ -2333,7 +2332,7 @@ bool Console::cmdStepRet(int argc, const char **argv) {
_debugState.seekLevel = _engine->_gamestate->_executionStack.size() - 1;
_debugState.debugging = true;
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdStepGlobal(int argc, const char **argv) {
@ -2347,7 +2346,7 @@ bool Console::cmdStepGlobal(int argc, const char **argv) {
_debugState.seekSpecial = atoi(argv[1]);
_debugState.debugging = true;
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdStepCallk(int argc, const char **argv) {
@ -2380,7 +2379,7 @@ bool Console::cmdStepCallk(int argc, const char **argv) {
}
_debugState.debugging = true;
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdDisassemble(int argc, const char **argv) {
@ -2884,7 +2883,7 @@ bool Console::cmdQuit(int argc, const char **argv) {
exit(0);
}
return false;
return Cmd_Exit(0, 0);
}
bool Console::cmdAddresses(int argc, const char **argv) {