aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Skovlund2010-11-18 21:41:13 +0000
committerLars Skovlund2010-11-18 21:41:13 +0000
commitc325d815d295e4b51f9c53cdf646210f37508fc2 (patch)
tree74312b44017b4631890ab1de8f7412dd2b2eda96
parentf0fea21639b003db4e378b3968014737e9999995 (diff)
downloadscummvm-rg350-c325d815d295e4b51f9c53cdf646210f37508fc2.tar.gz
scummvm-rg350-c325d815d295e4b51f9c53cdf646210f37508fc2.tar.bz2
scummvm-rg350-c325d815d295e4b51f9c53cdf646210f37508fc2.zip
SCI: Fix debugger disassembly of property accesses in SCI3
svn-id: r54348
-rw-r--r--engines/sci/engine/scriptdebug.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 4f89f1dd43..5ad6fbf561 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -124,11 +124,13 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
case Script_SByte:
case Script_Byte:
+ param_value = scr[retval.offset++];
debugN(" %02x", scr[retval.offset++]);
break;
case Script_Word:
case Script_SWord:
+ param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]);
debugN(" %04x", READ_SCI11ENDIAN_UINT16(&scr[retval.offset]));
retval.offset += 2;
break;
@@ -193,7 +195,12 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
if (!obj)
warning("Attempted to reference on non-object at %04x:%04x", PRINT_REG(s->xs->objp));
else
- debugN(" (%s)", g_sci->getKernel()->getSelectorName(obj->propertyOffsetToId(s->_segMan, scr[pos.offset + 1])).c_str());
+ {
+ if (getSciVersion() == SCI_VERSION_3)
+ debugN(" (%s)", g_sci->getKernel()->getSelectorName(param_value).c_str());
+ else
+ debugN(" (%s)", g_sci->getKernel()->getSelectorName(obj->propertyOffsetToId(s->_segMan, param_value)).c_str());
+ }
}
}