diff options
author | Torbjörn Andersson | 2006-02-23 07:45:51 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-02-23 07:45:51 +0000 |
commit | 43f2d984fb4f9549a033de2c7198a1b522512f6b (patch) | |
tree | 09104bfb375558d51c8de792ab666bbd67189412 | |
parent | ed577e61d5a404fe27e3d3fcfed307740c1c05e5 (diff) | |
download | scummvm-rg350-43f2d984fb4f9549a033de2c7198a1b522512f6b.tar.gz scummvm-rg350-43f2d984fb4f9549a033de2c7198a1b522512f6b.tar.bz2 scummvm-rg350-43f2d984fb4f9549a033de2c7198a1b522512f6b.zip |
Don't call exit() directly. Instead, use the backend's quit() method for normal
shutdown, and error() for abnormal termination.
svn-id: r20818
-rw-r--r-- | engines/cine/main_loop.cpp | 2 | ||||
-rw-r--r-- | engines/cine/object.cpp | 5 | ||||
-rw-r--r-- | engines/cine/script.cpp | 8 |
3 files changed, 6 insertions, 9 deletions
diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 7d3b98038f..f2c12a00a0 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -48,7 +48,7 @@ void manageEvents(void) { mouseData.Y = event.mouse.y; break; case OSystem::EVENT_QUIT: - exit(0); + g_system->quit(); break; default: break; diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index f9376f422d..6f3a534b5d 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -436,10 +436,9 @@ u8 compareObjectParam(u8 objIdx, u8 param1, s16 param2) { } default: { - printf - ("Unsupported compare type: %d in compareObjectParam\n", + error + ("Unsupported compare type: %d in compareObjectParam", param1 - 1); - exit(1); } } diff --git a/engines/cine/script.cpp b/engines/cine/script.cpp index 85268c9fad..6f39fe562f 100644 --- a/engines/cine/script.cpp +++ b/engines/cine/script.cpp @@ -403,10 +403,9 @@ u16 computeScriptStackSub(u8 mode, byte *scriptPtr, s16 *stackPtr, } default: { - printf - ("Unsupported opcode %X in computeScriptStack\n", + error + ("Unsupported opcode %X in computeScriptStack", opcode - 1); - exit(1); } } @@ -2752,8 +2751,7 @@ void executeScript(prcLinkedListStruct *scriptElement, u16 param) { } default: { - printf("Unsupported opcode %X\n", opcode - 1); - exit(1); + error("Unsupported opcode %X", opcode - 1); } } } |