diff options
author | Colin Snover | 2017-04-06 22:05:06 -0500 |
---|---|---|
committer | Colin Snover | 2017-04-23 13:07:25 -0500 |
commit | a2d7851e4ddb7c3858b5ee89b95daccf3dfa5531 (patch) | |
tree | ec77a2859023074188a816b2a5f3b5b6dd344f5a /engines | |
parent | 3d4fb4ccb4f8bed013e6be9f9c677a071e84266d (diff) | |
download | scummvm-rg350-a2d7851e4ddb7c3858b5ee89b95daccf3dfa5531.tar.gz scummvm-rg350-a2d7851e4ddb7c3858b5ee89b95daccf3dfa5531.tar.bz2 scummvm-rg350-a2d7851e4ddb7c3858b5ee89b95daccf3dfa5531.zip |
SCI32: Improve disassembly output of SCI3 property opcodes
Since SCI3 scripts use selectors instead of offsets as operands
to property-related opcodes, the disassembler can look up and
display property names everywhere (unlike SCI2.1 and earlier,
which need to know the object being operated on to look up the
correct selector for a given offset).
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 7d186eb788..09b38d1bac 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -196,6 +196,21 @@ reg_t disassemble(EngineState *s, reg32_t pos, reg_t objAddr, bool printBWTag, b } debugN(","); +#ifdef ENABLE_SCI32 + } else if (getSciVersion() == SCI_VERSION_3 && ( + opcode == op_pToa || opcode == op_aTop || + opcode == op_pTos || opcode == op_sTop || + opcode == op_ipToa || opcode == op_dpToa || + opcode == op_ipTos || opcode == op_dpTos)) { + + const char *selectorName = "<invalid>"; + + if (param_value < kernel->getSelectorNamesSize()) { + selectorName = kernel->getSelectorName(param_value).c_str(); + } + + debugN("\t%s[%x]", selectorName, param_value); +#endif } else { const char *separator = defaultSeparator; |