aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/scriptdebug.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 16098ab275..957930784b 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -174,13 +174,15 @@ reg_t disassemble(EngineState *s, reg_t pos, bool printBWTag, bool printBytecode
break;
case Script_SRelative:
- if (opsize)
- param_value = scr[retval.offset++];
+ if (opsize) {
+ int8 offset = (int8)scr[retval.offset++];
+ debugN(" %02x [%04x]", 0xff & offset, 0xffff & (retval.offset + offset));
+ }
else {
- param_value = READ_SCI11ENDIAN_UINT16(&scr[retval.offset]);
+ int16 offset = (int16)READ_SCI11ENDIAN_UINT16(&scr[retval.offset]);
retval.offset += 2;
+ debugN(" %04x [%04x]", 0xffff & offset, 0xffff & (retval.offset + offset));
}
- debugN(opsize ? " %02x [%04x]" : " %04x [%04x]", param_value, (0xffff) & (retval.offset + param_value));
break;
case Script_End: