aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/script.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-07-10 12:05:38 +0000
committerJohannes Schickel2008-07-10 12:05:38 +0000
commite1e95f0c0edf58553af5f31d33f46f5eb864d168 (patch)
tree46f9c68837ef7c77a49c3fffe1dee8acf155a71f /engines/kyra/script.cpp
parent9a34ef702de478611718bc94b4d1bcfc6a922613 (diff)
downloadscummvm-rg350-e1e95f0c0edf58553af5f31d33f46f5eb864d168.tar.gz
scummvm-rg350-e1e95f0c0edf58553af5f31d33f46f5eb864d168.tar.bz2
scummvm-rg350-e1e95f0c0edf58553af5f31d33f46f5eb864d168.zip
Added filename to unknown opcode/command warnings of EMC scripts.
svn-id: r32988
Diffstat (limited to 'engines/kyra/script.cpp')
-rw-r--r--engines/kyra/script.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp
index a29cdc8ca3..b10a4b32bf 100644
--- a/engines/kyra/script.cpp
+++ b/engines/kyra/script.cpp
@@ -132,6 +132,8 @@ bool EMCInterpreter::load(const char *filename, EMCData *scriptData, const Commo
scriptData->opcodes = opcodes;
+ strncpy(scriptData->filename, filename, 13);
+
return true;
}
@@ -205,7 +207,7 @@ bool EMCInterpreter::run(EMCState *script) {
}
if (opcode > 18) {
- error("Script unknown command: %d", opcode);
+ error("Script unknown command: %d in file '%s' at offset 0x%.08X", opcode, script->dataPtr->filename, instOffset);
} else {
debugC(5, kDebugLevelScript, "[0x%.08X] EMCInterpreter::%s([%d/%u])", instOffset, _commands[opcode].desc, _parameter, (uint)_parameter);
(this->*(_commands[opcode].proc))(script);
@@ -388,7 +390,7 @@ void EMCInterpreter::cmd_execOpcode(EMCState* script) {
script->retValue = (*(*script->dataPtr->opcodes)[opcode])(script);
} else {
script->retValue = 0;
- warning("calling unimplemented opcode(0x%.02X/%d)", opcode, opcode);
+ warning("Calling unimplemented opcode(0x%.02X/%d) from file '%s'", opcode, opcode, script->dataPtr->filename);
}
}