diff options
author | Torbjörn Andersson | 2009-05-31 10:02:16 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2009-05-31 10:02:16 +0000 |
commit | 0999534749f6c4edb9e4d054b95f185b829adba3 (patch) | |
tree | 55744aee72afd7cc699213a88be65938e70fa0a0 /engines/m4/script.cpp | |
parent | 3b311c65d0140e8bf727910d230ffd7a7f803761 (diff) | |
download | scummvm-rg350-0999534749f6c4edb9e4d054b95f185b829adba3.tar.gz scummvm-rg350-0999534749f6c4edb9e4d054b95f185b829adba3.tar.bz2 scummvm-rg350-0999534749f6c4edb9e4d054b95f185b829adba3.zip |
The error() and warning() functions add ! and newline automatically. (I didn't
look at debug() and debugC(), since I'm really bored with this now. :-)
svn-id: r41061
Diffstat (limited to 'engines/m4/script.cpp')
-rw-r--r-- | engines/m4/script.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/m4/script.cpp b/engines/m4/script.cpp index 243f073403..659c7e9f05 100644 --- a/engines/m4/script.cpp +++ b/engines/m4/script.cpp @@ -236,12 +236,12 @@ void ScriptInterpreter::open(const char *filename) { _scriptFile = new Common::File(); _scriptFile->open(filename); if (!_scriptFile->isOpen()) - error("ScriptInterpreter::open() Error opening %s.", filename); + error("ScriptInterpreter::open() Error opening %s", filename); _scriptFile->readUint32LE(); // skip magic for now uint32 version = _scriptFile->readUint32LE(); if (version != kScriptFileVersion) { - error("ScriptInterpreter::open() DAT file version mismatch; requested %li, got %i\n", kScriptFileVersion, version); + error("ScriptInterpreter::open() DAT file version mismatch; requested %li, got %i", kScriptFileVersion, version); } int functionCount = _scriptFile->readUint32LE(); @@ -369,13 +369,13 @@ int ScriptInterpreter::runFunction(ScriptFunction *scriptFunction) { void ScriptInterpreter::push(const ScriptValue &value) { if (_stackPtr == ARRAYSIZE(_stack)) - error("ScriptInterpreter::push() Stack overflow!\n"); + error("ScriptInterpreter::push() Stack overflow"); _stack[_stackPtr++] = value; } void ScriptInterpreter::pop(ScriptValue &value) { if (_stackPtr == 0) - error("ScriptInterpreter::pop() Stack underflow!\n"); + error("ScriptInterpreter::pop() Stack underflow"); value = _stack[_stackPtr--]; } @@ -720,7 +720,7 @@ bool ScriptInterpreter::execOpcode(byte opcode) { derefValue(value1); derefValue(value2); if (value1.type != kInteger || value2.type != kInteger) - warning("ScriptInterpreter::execOpcode() Trying to compare non-integer values (%d, %d, line %d)!\n", value1.type, value2.type, _lineNum); + warning("ScriptInterpreter::execOpcode() Trying to compare non-integer values (%d, %d, line %d)", value1.type, value2.type, _lineNum); _cmpFlags = value1.value - value2.value; printf("-> cmp %d, %d\n", value1.value, value2.value); printf("-> _cmpFlags = %d\n", _cmpFlags); |