Add op_get_script

This commit is contained in:
Alexander Batalov 2023-09-03 13:34:16 +03:00
parent 427672741a
commit b706756ec9

View File

@ -275,6 +275,13 @@ static void op_abs(Program* program)
}
}
// get_script
static void op_get_script(Program* program)
{
Object* obj = static_cast<Object*>(programStackPopPointer(program));
programStackPushInteger(program, obj->field_80 + 1);
}
// get_proto_data
static void op_get_proto_data(Program* program)
{
@ -932,6 +939,7 @@ void sfallOpcodesInit()
interpreterRegisterOpcode(0x81EB, op_get_ini_string);
interpreterRegisterOpcode(0x81EC, op_sqrt);
interpreterRegisterOpcode(0x81ED, op_abs);
interpreterRegisterOpcode(0x81F5, op_get_script);
interpreterRegisterOpcode(0x8204, op_get_proto_data);
interpreterRegisterOpcode(0x8205, op_set_proto_data);
interpreterRegisterOpcode(0x820D, opListBegin);