diff options
| author | Travis Howell | 2004-09-14 12:05:00 +0000 |
|---|---|---|
| committer | Travis Howell | 2004-09-14 12:05:00 +0000 |
| commit | 8c5381295d0400551d51ffa022fc460b838e6c69 (patch) | |
| tree | 9878e24943982315adeb6e08fd813790653ea308 /scumm | |
| parent | c97d5297870526f9a138d8d3af9357da0b3f8e93 (diff) | |
| download | scummvm-rg350-8c5381295d0400551d51ffa022fc460b838e6c69.tar.gz scummvm-rg350-8c5381295d0400551d51ffa022fc460b838e6c69.tar.bz2 scummvm-rg350-8c5381295d0400551d51ffa022fc460b838e6c69.zip | |
Add opcode
svn-id: r15115
Diffstat (limited to 'scumm')
| -rw-r--r-- | scumm/intern.h | 1 | ||||
| -rw-r--r-- | scumm/script_v6he.cpp | 9 | ||||
| -rw-r--r-- | scumm/script_v80he.cpp | 11 | ||||
| -rw-r--r-- | scumm/script_v90he.cpp | 2 |
4 files changed, 16 insertions, 7 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index e165e6987d..f4fdd8f915 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -796,6 +796,7 @@ protected: /* HE version 80 script opcodes */ void o80_unknown45(); void o80_unknown49(); + void o80_unknown4A(); void o80_readConfigFile(); void o80_writeConfigFile(); void o80_cursorCommand(); diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index 7b21b02128..eadacaf7ae 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -1156,11 +1156,10 @@ void ScummEngine_v6he::o6_soundOps() { void ScummEngine_v6he::o6_localizeArray() { int slot = pop(); - if (slot < _numArray) { - _arraySlot[slot] = vm.slot[_currentScript].number; - } else { - warning("o6_localizeArray(%d): array slot out of range", slot); - } + if (slot >= _numArray) + error("o6_localizeArray(%d): array slot out of range", slot); + + _arraySlot[slot] = vm.slot[_currentScript].number; } void ScummEngine_v6he::o6_seekFilePos() { diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp index 0a0f31ece6..6712e5b4ee 100644 --- a/scumm/script_v80he.cpp +++ b/scumm/script_v80he.cpp @@ -137,7 +137,7 @@ void ScummEngine_v80he::setupOpcodes() { /* 48 */ OPCODE(o6_invalid), OPCODE(o80_unknown49), - OPCODE(o6_invalid), + OPCODE(o80_unknown4A), OPCODE(o72_wordArrayIndexedWrite), /* 4C */ OPCODE(o6_invalid), @@ -422,6 +422,15 @@ void ScummEngine_v80he::o80_unknown49() { debug(1,"o80_unknown49 stub (%d, %d)", subOp, snd); } +void ScummEngine_v80he::o80_unknown4A() { + int slot = pop(); + + if (slot >= _numArray) + error("o80_unknown4A(%d): array slot out of range", slot); + + _arraySlot[slot] = -1; +} + void ScummEngine_v80he::o80_readConfigFile() { byte name[128], section[128], filename[256]; int type, retval; diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index c1f6ae8f93..0c4cc8d241 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -137,7 +137,7 @@ void ScummEngine_v90he::setupOpcodes() { /* 48 */ OPCODE(o6_invalid), OPCODE(o80_unknown49), - OPCODE(o6_invalid), + OPCODE(o80_unknown4A), OPCODE(o72_wordArrayIndexedWrite), /* 4C */ OPCODE(o6_invalid), |
