aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2017-01-05 10:33:54 -0600
committerColin Snover2017-01-09 19:34:54 -0600
commit7567940ba14ef7d2277dea73161383c8d65e9ee6 (patch)
tree7e47f1a62e09aa60113eb131923771265edef372 /engines/sci
parentbd9bc7ce878dd2ccdce31ade062e9e91d5eb16a9 (diff)
downloadscummvm-rg350-7567940ba14ef7d2277dea73161383c8d65e9ee6.tar.gz
scummvm-rg350-7567940ba14ef7d2277dea73161383c8d65e9ee6.tar.bz2
scummvm-rg350-7567940ba14ef7d2277dea73161383c8d65e9ee6.zip
SCI32: Clean up SCI3-only opcodes
SCI3 includes four new opcodes: * op_info[0x26][0] puts -info- flag in accumulator * op_infoSP[0x26][1] pushes -info- flag to stack * op_superP[0x27][0] puts -super- reference in accumulator * op_superPSP[0x27][1] pushes -super- reference to stack The implementation of these opcodes was correct already, but the opcode names given were a bit misleading (the value is not always stored to accumulator), and magic numbers were used for these opcodes in places. A review of the opcode table in Phant2 indicates that there are no other new opcodes for SCI3.
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kernel.cpp6
-rw-r--r--engines/sci/engine/vm.cpp4
-rw-r--r--engines/sci/engine/vm.h4
3 files changed, 6 insertions, 8 deletions
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 85cad99226..1845ecaac5 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -989,10 +989,8 @@ void script_adjust_opcode_formats() {
}
if (getSciVersion() >= SCI_VERSION_3) {
- // TODO: There are also opcodes in
- // here to get the superclass, and possibly the species too.
- g_sci->_opcode_formats[0x4d/2][0] = Script_None;
- g_sci->_opcode_formats[0x4e/2][0] = Script_None;
+ g_sci->_opcode_formats[op_info][0] = Script_None;
+ g_sci->_opcode_formats[op_superP][0] = Script_None;
}
#endif
}
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index 8e407a6ab9..74a2841521 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -1043,7 +1043,7 @@ void run_vm(EngineState *s) {
break;
- case op_infoToa: // (38)
+ case op_info: // (38)
if (getSciVersion() < SCI_VERSION_3)
error("Dummy opcode 0x%x called", opcode); // should never happen
@@ -1053,7 +1053,7 @@ void run_vm(EngineState *s) {
PUSH32(obj->getInfoSelector());
break;
- case op_superToa: // (39)
+ case op_superP: // (39)
if (getSciVersion() < SCI_VERSION_3)
error("Dummy opcode 0x%x called", opcode); // should never happen
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index 13f60fd49c..18549e3a0e 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -198,8 +198,8 @@ enum SciOpcodes {
op_calle = 0x23, // 035
op_ret = 0x24, // 036
op_send = 0x25, // 037
- op_infoToa = 0x26, // 038
- op_superToa = 0x27, // 039
+ op_info = 0x26, // 038
+ op_superP = 0x27, // 039
op_class = 0x28, // 040
// dummy 0x29, // 041
op_self = 0x2a, // 042