mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-08 10:51:11 +00:00
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.
This commit is contained in:
parent
bd9bc7ce87
commit
7567940ba1
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user