diff options
author | Paul Gilbert | 2009-05-15 04:35:47 +0000 |
---|---|---|
committer | Paul Gilbert | 2009-05-15 04:35:47 +0000 |
commit | bb45be960d1762a480ec3523d97955754c7ce9f2 (patch) | |
tree | d00ec17373c22e123cfe9686bcbd988db9727212 /engines/cruise/script.cpp | |
parent | 03f5ad5cbbabc93fa0eda4366da5d77da0545014 (diff) | |
download | scummvm-rg350-bb45be960d1762a480ec3523d97955754c7ce9f2.tar.gz scummvm-rg350-bb45be960d1762a480ec3523d97955754c7ce9f2.tar.bz2 scummvm-rg350-bb45be960d1762a480ec3523d97955754c7ce9f2.zip |
Converted various printf statements to use debug, warning, and error.
svn-id: r40588
Diffstat (limited to 'engines/cruise/script.cpp')
-rw-r--r-- | engines/cruise/script.cpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/engines/cruise/script.cpp b/engines/cruise/script.cpp index 4f62d22bd1..f060e379ad 100644 --- a/engines/cruise/script.cpp +++ b/engines/cruise/script.cpp @@ -104,8 +104,7 @@ int32 opcodeType0(void) { pushVar(*address); return (0); } else { - printf("Unsupported code in opcodeType0 case 1!\n"); - exit(1); + error("Unsupported code in opcodeType0 case 1!"); } return (0); @@ -129,11 +128,8 @@ int32 opcodeType0(void) { break; } - default: { - printf("Unsupported type %d in opcodeType0\n", - currentScriptOpcodeType); - exit(1); - } + default: + error("Unsupported type %d in opcodeType0", currentScriptOpcodeType); } return 0; @@ -200,10 +196,8 @@ int32 opcodeType1(void) { *(ptr + var_A + offset) = var; return (0); } - default: { - printf("Unsupported code in opcodeType1 case 1!\n"); - exit(1); - } + default: + error("Unsupported code in opcodeType1 case 1!"); } break; @@ -229,11 +223,8 @@ int32 opcodeType1(void) { saveOpcodeVar = var; break; } - default: { - printf("Unsupported type %d in opcodeType1\n", - currentScriptOpcodeType); - exit(1); - } + default: + error("Unsupported type %d in opcodeType1", currentScriptOpcodeType); } return (0); @@ -647,9 +638,7 @@ int executeScripts(scriptInstanceStruct *ptr) { currentScriptOpcodeType = opcodeType & 7; if (!opcodeTypeTable[(opcodeType & 0xFB) >> 3]) { - printf("Unsupported opcode type %d\n", (opcodeType & 0xFB) >> 3); - exit(1); - return (-21); + error("Unsupported opcode type %d", (opcodeType & 0xFB) >> 3); } } while (!opcodeTypeTable[(opcodeType & 0xFB) >> 3]()); |