diff options
author | Walter van Niftrik | 2010-01-28 19:22:58 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-01-28 19:22:58 +0000 |
commit | 31728b32caaa9c574cd472c2b828b383ab45d42f (patch) | |
tree | 1d4aa68b71b3a616ad1a9d097c86bc48977974b1 /engines | |
parent | d883b6215fe2af48bb7b643de57170f62a82c51f (diff) | |
download | scummvm-rg350-31728b32caaa9c574cd472c2b828b383ab45d42f.tar.gz scummvm-rg350-31728b32caaa9c574cd472c2b828b383ab45d42f.tar.bz2 scummvm-rg350-31728b32caaa9c574cd472c2b828b383ab45d42f.zip |
SCI: Add debug opcodes
svn-id: r47646
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/script.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/script.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/vm.cpp | 11 |
3 files changed, 10 insertions, 5 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp index 6b411c687f..a838758d1a 100644 --- a/engines/sci/engine/script.cpp +++ b/engines/sci/engine/script.cpp @@ -64,7 +64,7 @@ opcode_format g_opcode_formats[128][4] = { /*38*/ {Script_Property, END}, {Script_SRelative, END}, {Script_SRelative, END}, {Script_None}, /*3C*/ - {Script_None}, {Script_None}, {Script_None}, {Script_Invalid}, + {Script_None}, {Script_None}, {Script_None}, {Script_Word}, /*40-4F*/ {Script_Global, END}, {Script_Local, END}, {Script_Temp, END}, {Script_Param, END}, {Script_Global, END}, {Script_Local, END}, {Script_Temp, END}, {Script_Param, END}, diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h index 1c7ef0f52e..cef90b0e28 100644 --- a/engines/sci/engine/script.h +++ b/engines/sci/engine/script.h @@ -133,7 +133,7 @@ enum sci_opcodes { op_push1 = 0x3c, // 060 op_push2 = 0x3d, // 061 op_pushSelf = 0x3e, // 062 - // dummy 0x3f, // 063 + op_line = 0x3f, // 063 op_lag = 0x40, // 064 op_lal = 0x41, // 065 op_lat = 0x42, // 066 diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index d552cedf9e..f645e31fb7 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -1354,11 +1354,16 @@ void run_vm(EngineState *s, int restoring) { break; case op_pushSelf: // 0x3e (62) - PUSH32(scriptState.xs->objp); + if (!(opcode & 1)) { + PUSH32(scriptState.xs->objp); + } else { + // Debug opcode op_file, skip null-terminated string (file name) + while (GET_OP_BYTE()) ; + } break; - case 0x3f: // (63) - error("Dummy opcode 0x%x called", opnumber); // should never happen + case op_line: // 0x3f (63) + // Debug opcode (line number) break; case op_lag: // 0x40 (64) |