From b706756ec960599f02ab6007e7e0516925edd53e Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sun, 3 Sep 2023 13:34:16 +0300 Subject: [PATCH] Add op_get_script --- src/sfall_opcodes.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sfall_opcodes.cc b/src/sfall_opcodes.cc index 032e1db..a07f21d 100644 --- a/src/sfall_opcodes.cc +++ b/src/sfall_opcodes.cc @@ -275,6 +275,13 @@ static void op_abs(Program* program) } } +// get_script +static void op_get_script(Program* program) +{ + Object* obj = static_cast(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);