aboutsummaryrefslogtreecommitdiff
path: root/script.cpp
diff options
context:
space:
mode:
authorJames Brown2002-04-26 14:13:39 +0000
committerJames Brown2002-04-26 14:13:39 +0000
commit965b96b4895f0a5ad203abd0d9b48cc438447b31 (patch)
tree9a4b3281658244abf176718c991e1b66eadcf258 /script.cpp
parentab2d1d03faa0e1d0f38a8972f85a778a2bbd9158 (diff)
downloadscummvm-rg350-965b96b4895f0a5ad203abd0d9b48cc438447b31.tar.gz
scummvm-rg350-965b96b4895f0a5ad203abd0d9b48cc438447b31.tar.bz2
scummvm-rg350-965b96b4895f0a5ad203abd0d9b48cc438447b31.zip
Add enhanced debugging patch.
svn-id: r4090
Diffstat (limited to 'script.cpp')
-rw-r--r--script.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/script.cpp b/script.cpp
index f9dcefce26..fffcd93081 100644
--- a/script.cpp
+++ b/script.cpp
@@ -274,7 +274,7 @@ void Scumm::executeScript()
_opcode = fetchScriptByte();
_scriptPointerStart = _scriptPointer;
vm.slot[_currentScript].didexec = 1;
- //debug(1, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]);
+ debug(9, "Script %d: [%X] %s()", vm.slot[_currentScript].number, _opcode, _opcodes_lookup[_opcode]);
op = getOpcode(_opcode);
(this->*op) ();
}
@@ -358,9 +358,12 @@ void Scumm::writeVar(uint var, int value)
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
_vars[var] = value;
- if ((_varwatch == (int)var) || (_varwatch == 0))
- printf("vars[%d] = %d (via script %d)\n", var, value,
- vm.slot[_currentScript].number);
+ if ((_varwatch == (int)var) || (_varwatch == 0)) {
+ if (vm.slot[_currentScript].number < 100)
+ debug(0, "vars[%d] = %d (via script-%d)", var, value, vm.slot[_currentScript].number);
+ else
+ debug(0, "vars[%d] = %d (via room-%d-%d)", var, value, _currentRoom, vm.slot[_currentScript].number);
+ }
return;
}