diff options
author | Colin Snover | 2016-12-12 12:45:13 -0600 |
---|---|---|
committer | Colin Snover | 2016-12-12 15:20:08 -0600 |
commit | be14778b2b6afac7ff238d315ac735a9dc322dbe (patch) | |
tree | acb2af330e864e7700391e9824391d2a40b77551 /engines | |
parent | 3653f03d30a7610a2648485f1f4f5b3de90eb8ad (diff) | |
download | scummvm-rg350-be14778b2b6afac7ff238d315ac735a9dc322dbe.tar.gz scummvm-rg350-be14778b2b6afac7ff238d315ac735a9dc322dbe.tar.bz2 scummvm-rg350-be14778b2b6afac7ff238d315ac735a9dc322dbe.zip |
SCI: Ensure bytecode/BWT for "file" op is also printed
Learning the bytecode for file op is necessary when creating
workaround signatures, as the signature-finding mechanism does not
currently ignore line/file instructions.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/scriptdebug.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp index 9ed97723d0..54b925a1b6 100644 --- a/engines/sci/engine/scriptdebug.cpp +++ b/engines/sci/engine/scriptdebug.cpp @@ -99,17 +99,6 @@ reg_t disassemble(EngineState *s, reg32_t pos, reg_t objAddr, bool printBWTag, b debugN("%04x:%04x: ", PRINT_REG(pos)); - if (opcode == op_pushSelf) { // 0x3e (62) - if ((opsize & 1) && g_sci->getGameId() != GID_FANMADE) { - // Debug opcode op_file - debugN("file \"%s\"\n", scr + pos.getOffset() + 1); // +1: op_pushSelf size - retval.incOffset(bytecount - 1); - return retval; - } - } - - opsize &= 1; // byte if true, word if false - if (printBytecode) { if (pos.getOffset() + bytecount > scr_size) { warning("Operation arguments extend beyond end of script"); @@ -123,9 +112,18 @@ reg_t disassemble(EngineState *s, reg32_t pos, reg_t objAddr, bool printBWTag, b debugN(" "); } + opsize &= 1; // byte if true, word if false + if (printBWTag) debugN("[%c] ", opsize ? 'B' : 'W'); + if (opcode == op_pushSelf && opsize && g_sci->getGameId() != GID_FANMADE) { // 0x3e (62) + // Debug opcode op_file + debugN("file \"%s\"\n", scr + pos.getOffset() + 1); // +1: op_pushSelf size + retval.incOffset(bytecount - 1); + return retval; + } + #ifndef REDUCE_MEMORY_USAGE debugN("%-5s", opcodeNames[opcode]); #endif |