aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2008-07-10 12:12:42 +0000
committerJohannes Schickel2008-07-10 12:12:42 +0000
commita117024d23c3d43ee0ced9046fdbf8e866ddc135 (patch)
tree4f2e4d65383a2afb23ba48dc6d22eef6ad478aa4 /engines
parente1e95f0c0edf58553af5f31d33f46f5eb864d168 (diff)
downloadscummvm-rg350-a117024d23c3d43ee0ced9046fdbf8e866ddc135.tar.gz
scummvm-rg350-a117024d23c3d43ee0ced9046fdbf8e866ddc135.tar.bz2
scummvm-rg350-a117024d23c3d43ee0ced9046fdbf8e866ddc135.zip
Added filename to unkown command/opcode warnings for TIM scripts.
svn-id: r32989
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/script_tim.cpp8
-rw-r--r--engines/kyra/script_tim.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index 8725f6def9..8ea316f159 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -124,6 +124,8 @@ TIM *TIMInterpreter::load(const char *filename, const Common::Array<const TIMOpc
for (int i = 0; i < num; ++i)
tim->func[i].avtl = tim->avtl + tim->avtl[i];
+ strncpy(tim->filename, filename, 13);
+
return tim;
}
@@ -201,12 +203,12 @@ void TIMInterpreter::refreshTimersAfterPause(uint32 elapsedTime) {
int TIMInterpreter::execCommand(int cmd, const uint16 *param) {
if (cmd < 0 || cmd >= _commandsSize) {
- warning("Calling unimplemented TIM command %d", cmd);
+ warning("Calling unimplemented TIM command %d from file '%s'", cmd, _currentTim->filename);
return 0;
}
if (_commands[cmd].proc == 0) {
- warning("Calling unimplemented TIM command %d", cmd);
+ warning("Calling unimplemented TIM command %d from file '%s'", cmd, _currentTim->filename);
return 0;
}
@@ -261,7 +263,7 @@ int TIMInterpreter::cmd_execOpcode(const uint16 *param) {
uint16 opcode = *param++;
if (opcode > _currentTim->opcodes->size()) {
- warning("Calling unimplemented TIM opcode(0x%.02X/%d)", opcode, opcode);
+ warning("Calling unimplemented TIM opcode(0x%.02X/%d) form file '%s'", opcode, opcode, _currentTim->filename);
return 0;
}
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index f171823444..39a1d90a44 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -37,6 +37,8 @@ struct TIM;
typedef Common::Functor2<const TIM*, const uint16*, int> TIMOpcode;
struct TIM {
+ char filename[13];
+
int16 procFunc;
uint16 procParam;