diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/vm.cpp | 31 | ||||
-rw-r--r-- | engines/sci/engine/vm.h | 4 |
2 files changed, 19 insertions, 16 deletions
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 6f02c96de8..3729fc5236 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -974,21 +974,24 @@ void run_vm(EngineState *s) { break; - case 0x26: // (38) - case 0x27: // (39) - if (getSciVersion() == SCI_VERSION_3) { - if (extOpcode == 0x4c) - s->r_acc = obj->getInfoSelector(); - else if (extOpcode == 0x4d) - PUSH32(obj->getInfoSelector()); - else if (extOpcode == 0x4e) - s->r_acc = obj->getSuperClassSelector(); // TODO: is this correct? - // TODO: There are also opcodes in - // here to get the superclass, and possibly the species too. - else - error("Dummy opcode 0x%x called", opcode); // should never happen - } else + case op_infoToa: // (38) + if (getSciVersion() < SCI_VERSION_3) error("Dummy opcode 0x%x called", opcode); // should never happen + + if (!(extOpcode & 1)) + s->r_acc = obj->getInfoSelector(); + else + PUSH32(obj->getInfoSelector()); + break; + + case op_superToa: // (39) + if (getSciVersion() < SCI_VERSION_3) + error("Dummy opcode 0x%x called", opcode); // should never happen + + if (!(extOpcode & 1)) + s->r_acc = obj->getSuperClassSelector(); + else + PUSH32(obj->getSuperClassSelector()); break; case op_class: // 0x28 (40) diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index cf65803929..514bf58b64 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -176,8 +176,8 @@ enum SciOpcodes { op_calle = 0x23, // 035 op_ret = 0x24, // 036 op_send = 0x25, // 037 - // dummy 0x26, // 038 - // dummy 0x27, // 039 + op_infoToa = 0x26, // 038 + op_superToa = 0x27, // 039 op_class = 0x28, // 040 // dummy 0x29, // 041 op_self = 0x2a, // 042 |