aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorColin Snover2017-02-16 21:16:33 -0600
committerColin Snover2017-04-22 19:28:35 -0500
commit3ab1f5f4cc6aa79e755fc9688202e2386b74cf92 (patch)
treede70b6ad520668816ed65d95fda03e91f0c90789 /engines/sci/engine
parent086fab741ac53a01f583bbd3749f976bce4467d6 (diff)
downloadscummvm-rg350-3ab1f5f4cc6aa79e755fc9688202e2386b74cf92.tar.gz
scummvm-rg350-3ab1f5f4cc6aa79e755fc9688202e2386b74cf92.tar.bz2
scummvm-rg350-3ab1f5f4cc6aa79e755fc9688202e2386b74cf92.zip
SCI: Display class names in disassembly
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/scriptdebug.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 971c721d6b..2dcf03b0d8 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -176,6 +176,14 @@ reg_t disassemble(EngineState *s, reg32_t pos, reg_t objAddr, bool printBWTag, b
debugN("\t%s[%x],", (param_value < kernel->_kernelFuncs.size()) ?
((param_value < kernel->getKernelNamesSize()) ? kernel->getKernelName(param_value).c_str() : "[Unknown(postulated)]")
: "<invalid>", param_value);
+ } else if (opcode == op_class) {
+ const reg_t classAddr = s->_segMan->getClassAddress(param_value, SCRIPT_GET_DONT_LOAD, retval.getSegment());
+ if (!classAddr.isNull()) {
+ debugN("\t%s", s->_segMan->getObjectName(classAddr));
+ debugN(opsize ? "[%02x]" : "[%04x]", param_value);
+ } else {
+ debugN(opsize ? "\t%02x" : "\t%04x", param_value);
+ }
} else if (opcode == op_super) {
Object *obj;
if (objAddr != NULL_REG && (obj = s->_segMan->getObject(objAddr)) != nullptr) {