aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-07-10 12:05:38 +0000
committerJohannes Schickel2008-07-10 12:05:38 +0000
commite1e95f0c0edf58553af5f31d33f46f5eb864d168 (patch)
tree46f9c68837ef7c77a49c3fffe1dee8acf155a71f
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
-rw-r--r--engines/kyra/script.cpp6
-rw-r--r--engines/kyra/script.h2
2 files changed, 6 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);
}
}
diff --git a/engines/kyra/script.h b/engines/kyra/script.h
index de52093f66..2b97a83289 100644
--- a/engines/kyra/script.h
+++ b/engines/kyra/script.h
@@ -36,6 +36,8 @@ struct EMCState;
typedef Common::Functor1<EMCState*, int> Opcode;
struct EMCData {
+ char filename[13];
+
byte *text;
uint16 *data;
uint16 *ordr;