From 43f2d984fb4f9549a033de2c7198a1b522512f6b Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 23 Feb 2006 07:45:51 +0000 Subject: Don't call exit() directly. Instead, use the backend's quit() method for normal shutdown, and error() for abnormal termination. svn-id: r20818 --- engines/cine/main_loop.cpp | 2 +- engines/cine/object.cpp | 5 ++--- engines/cine/script.cpp | 8 +++----- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'engines') 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); } } } -- cgit v1.2.3