rename si funcs

This commit is contained in:
Alex Bates 2020-11-08 19:20:09 +00:00
parent c13ca4392b
commit 70032a1123
8 changed files with 84 additions and 84 deletions

View File

@ -16,7 +16,7 @@ glabel si_execute_next_command
/* EBDDC 802C742C 00220821 */ addu $at, $at, $v0
/* EBDE0 802C7430 8C229F20 */ lw $v0, -0x60e0($at)
/* EBDE4 802C7434 00400008 */ jr $v0
/* EBDE8 802C7438 00000000 */ nop
/* EBDE8 802C7438 00000000 */ nop
/* EBDEC 802C743C 8E030008 */ lw $v1, 8($s0)
/* EBDF0 802C7440 24050003 */ addiu $a1, $zero, 3
/* EBDF4 802C7444 0060102D */ daddu $v0, $v1, $zero
@ -57,11 +57,11 @@ glabel si_execute_next_command
/* EBE80 802C74D0 0200202D */ daddu $a0, $s0, $zero
/* EBE84 802C74D4 080B1E95 */ j .L802C7A54
/* EBE88 802C74D8 0040282D */ daddu $a1, $v0, $zero
/* EBE8C 802C74DC 0C0B12D7 */ jal si_handle_wait
/* EBE8C 802C74DC 0C0B12D7 */ jal si_handle_sleep_frames
/* EBE90 802C74E0 0200202D */ daddu $a0, $s0, $zero
/* EBE94 802C74E4 080B1E95 */ j .L802C7A54
/* EBE98 802C74E8 0040282D */ daddu $a1, $v0, $zero
/* EBE9C 802C74EC 0C0B12EE */ jal si_handle_wait_seconds
/* EBE9C 802C74EC 0C0B12EE */ jal si_handle_sleep_seconds
/* EBEA0 802C74F0 0200202D */ daddu $a0, $s0, $zero
/* EBEA4 802C74F4 080B1E95 */ j .L802C7A54
/* EBEA8 802C74F8 0040282D */ daddu $a1, $v0, $zero
@ -89,11 +89,11 @@ glabel si_execute_next_command
/* EBF00 802C7550 0200202D */ daddu $a0, $s0, $zero
/* EBF04 802C7554 080B1E95 */ j .L802C7A54
/* EBF08 802C7558 0040282D */ daddu $a1, $v0, $zero
/* EBF0C 802C755C 0C0B13A4 */ jal si_handle_if_AND
/* EBF0C 802C755C 0C0B13A4 */ jal si_handle_if_flag
/* EBF10 802C7560 0200202D */ daddu $a0, $s0, $zero
/* EBF14 802C7564 080B1E95 */ j .L802C7A54
/* EBF18 802C7568 0040282D */ daddu $a1, $v0, $zero
/* EBF1C 802C756C 0C0B13BA */ jal si_handle_if_not_AND
/* EBF1C 802C756C 0C0B13BA */ jal si_handle_if_not_flag
/* EBF20 802C7570 0200202D */ daddu $a0, $s0, $zero
/* EBF24 802C7574 080B1E95 */ j .L802C7A54
/* EBF28 802C7578 0040282D */ daddu $a1, $v0, $zero
@ -105,11 +105,11 @@ glabel si_execute_next_command
/* EBF40 802C7590 0200202D */ daddu $a0, $s0, $zero
/* EBF44 802C7594 080B1E95 */ j .L802C7A54
/* EBF48 802C7598 0040282D */ daddu $a1, $v0, $zero
/* EBF4C 802C759C 0C0B13DD */ jal si_handle_switch
/* EBF4C 802C759C 0C0B13DD */ jal si_handle_match
/* EBF50 802C75A0 0200202D */ daddu $a0, $s0, $zero
/* EBF54 802C75A4 080B1E95 */ j .L802C7A54
/* EBF58 802C75A8 0040282D */ daddu $a1, $v0, $zero
/* EBF5C 802C75AC 0C0B13F9 */ jal si_handle_switch_const
/* EBF5C 802C75AC 0C0B13F9 */ jal si_handle_match_const
/* EBF60 802C75B0 0200202D */ daddu $a0, $s0, $zero
/* EBF64 802C75B4 080B1E95 */ j .L802C7A54
/* EBF68 802C75B8 0040282D */ daddu $a1, $v0, $zero
@ -137,27 +137,27 @@ glabel si_execute_next_command
/* EBFC0 802C7610 0200202D */ daddu $a0, $s0, $zero
/* EBFC4 802C7614 080B1E95 */ j .L802C7A54
/* EBFC8 802C7618 0040282D */ daddu $a1, $v0, $zero
/* EBFCC 802C761C 0C0B1511 */ jal si_handle_case_default
/* EBFCC 802C761C 0C0B1511 */ jal si_handle_case_else
/* EBFD0 802C7620 0200202D */ daddu $a0, $s0, $zero
/* EBFD4 802C7624 080B1E95 */ j .L802C7A54
/* EBFD8 802C7628 0040282D */ daddu $a1, $v0, $zero
/* EBFDC 802C762C 0C0B15B5 */ jal si_handle_break_case
/* EBFDC 802C762C 0C0B15B5 */ jal si_handle_break_match
/* EBFE0 802C7630 0200202D */ daddu $a0, $s0, $zero
/* EBFE4 802C7634 080B1E95 */ j .L802C7A54
/* EBFE8 802C7638 0040282D */ daddu $a1, $v0, $zero
/* EBFEC 802C763C 0C0B1546 */ jal si_handle_case_equal_OR
/* EBFEC 802C763C 0C0B1546 */ jal si_handle_case_multi_or_equal
/* EBFF0 802C7640 0200202D */ daddu $a0, $s0, $zero
/* EBFF4 802C7644 080B1E95 */ j .L802C7A54
/* EBFF8 802C7648 0040282D */ daddu $a1, $v0, $zero
/* EBFFC 802C764C 0C0B1597 */ jal si_handle_end_case_group
/* EBFFC 802C764C 0C0B1597 */ jal si_handle_end_case_multi
/* EC000 802C7650 0200202D */ daddu $a0, $s0, $zero
/* EC004 802C7654 080B1E95 */ j .L802C7A54
/* EC008 802C7658 0040282D */ daddu $a1, $v0, $zero
/* EC00C 802C765C 0C0B156E */ jal si_handle_case_equal_AND
/* EC00C 802C765C 0C0B156E */ jal si_handle_case_multi_and_equal
/* EC010 802C7660 0200202D */ daddu $a0, $s0, $zero
/* EC014 802C7664 080B1E95 */ j .L802C7A54
/* EC018 802C7668 0040282D */ daddu $a1, $v0, $zero
/* EC01C 802C766C 0C0B1527 */ jal si_handle_case_AND
/* EC01C 802C766C 0C0B1527 */ jal si_handle_case_flag
/* EC020 802C7670 0200202D */ daddu $a0, $s0, $zero
/* EC024 802C7674 080B1E95 */ j .L802C7A54
/* EC028 802C7678 0040282D */ daddu $a1, $v0, $zero
@ -165,7 +165,7 @@ glabel si_execute_next_command
/* EC030 802C7680 0200202D */ daddu $a0, $s0, $zero
/* EC034 802C7684 080B1E95 */ j .L802C7A54
/* EC038 802C7688 0040282D */ daddu $a1, $v0, $zero
/* EC03C 802C768C 0C0B15C6 */ jal si_handle_end_switch
/* EC03C 802C768C 0C0B15C6 */ jal si_handle_end_match
/* EC040 802C7690 0200202D */ daddu $a0, $s0, $zero
/* EC044 802C7694 080B1E95 */ j .L802C7A54
/* EC048 802C7698 0040282D */ daddu $a1, $v0, $zero
@ -277,7 +277,7 @@ glabel si_execute_next_command
/* EC1F0 802C7840 0200202D */ daddu $a0, $s0, $zero
/* EC1F4 802C7844 080B1E95 */ j .L802C7A54
/* EC1F8 802C7848 0040282D */ daddu $a1, $v0, $zero
/* EC1FC 802C784C 0C0B1A1C */ jal si_handle_kill
/* EC1FC 802C784C 0C0B1A1C */ jal si_handle_kill_script
/* EC200 802C7850 0200202D */ daddu $a0, $s0, $zero
/* EC204 802C7854 080B1E95 */ j .L802C7A54
/* EC208 802C7858 0040282D */ daddu $a1, $v0, $zero
@ -301,19 +301,19 @@ glabel si_execute_next_command
/* EC250 802C78A0 0200202D */ daddu $a0, $s0, $zero
/* EC254 802C78A4 080B1E95 */ j .L802C7A54
/* EC258 802C78A8 0040282D */ daddu $a1, $v0, $zero
/* EC25C 802C78AC 0C0B191B */ jal si_handle_exec1
/* EC25C 802C78AC 0C0B191B */ jal si_handle_spawn_script
/* EC260 802C78B0 0200202D */ daddu $a0, $s0, $zero
/* EC264 802C78B4 080B1E95 */ j .L802C7A54
/* EC268 802C78B8 0040282D */ daddu $a1, $v0, $zero
/* EC26C 802C78BC 0C0B1949 */ jal si_handle_exec2
/* EC26C 802C78BC 0C0B1949 */ jal si_handle_spawn_script_get_id
/* EC270 802C78C0 0200202D */ daddu $a0, $s0, $zero
/* EC274 802C78C4 080B1E95 */ j .L802C7A54
/* EC278 802C78C8 0040282D */ daddu $a1, $v0, $zero
/* EC27C 802C78CC 0C0B197F */ jal si_handle_exec_wait
/* EC27C 802C78CC 0C0B197F */ jal si_handle_await_script
/* EC280 802C78D0 0200202D */ daddu $a0, $s0, $zero
/* EC284 802C78D4 080B1E95 */ j .L802C7A54
/* EC288 802C78D8 0040282D */ daddu $a1, $v0, $zero
/* EC28C 802C78DC 0C0B19C5 */ jal si_handle_bind
/* EC28C 802C78DC 0C0B19C5 */ jal si_handle_bind_trigger
/* EC290 802C78E0 0200202D */ daddu $a0, $s0, $zero
/* EC294 802C78E4 080B1E95 */ j .L802C7A54
/* EC298 802C78E8 0040282D */ daddu $a1, $v0, $zero
@ -357,11 +357,11 @@ glabel si_execute_next_command
/* EC330 802C7980 0200202D */ daddu $a0, $s0, $zero
/* EC334 802C7984 080B1E95 */ j .L802C7A54
/* EC338 802C7988 0040282D */ daddu $a1, $v0, $zero
/* EC33C 802C798C 0C0B1A88 */ jal si_handle_suspend
/* EC33C 802C798C 0C0B1A88 */ jal si_handle_suspend_script
/* EC340 802C7990 0200202D */ daddu $a0, $s0, $zero
/* EC344 802C7994 080B1E95 */ j .L802C7A54
/* EC348 802C7998 0040282D */ daddu $a1, $v0, $zero
/* EC34C 802C799C 0C0B1A93 */ jal si_handle_resume
/* EC34C 802C799C 0C0B1A93 */ jal si_handle_resume_script
/* EC350 802C79A0 0200202D */ daddu $a0, $s0, $zero
/* EC354 802C79A4 080B1E95 */ j .L802C7A54
/* EC358 802C79A8 0040282D */ daddu $a1, $v0, $zero
@ -369,19 +369,19 @@ glabel si_execute_next_command
/* EC360 802C79B0 0200202D */ daddu $a0, $s0, $zero
/* EC364 802C79B4 080B1E95 */ j .L802C7A54
/* EC368 802C79B8 0040282D */ daddu $a1, $v0, $zero
/* EC36C 802C79BC 0C0B1B1E */ jal si_handle_thread
/* EC36C 802C79BC 0C0B1B1E */ jal si_handle_spawn_thread
/* EC370 802C79C0 0200202D */ daddu $a0, $s0, $zero
/* EC374 802C79C4 080B1E95 */ j .L802C7A54
/* EC378 802C79C8 0040282D */ daddu $a1, $v0, $zero
/* EC37C 802C79CC 0C0B1B53 */ jal si_handle_end_thread
/* EC37C 802C79CC 0C0B1B53 */ jal si_handle_end_spawn_thread
/* EC380 802C79D0 0200202D */ daddu $a0, $s0, $zero
/* EC384 802C79D4 080B1E95 */ j .L802C7A54
/* EC388 802C79D8 0040282D */ daddu $a1, $v0, $zero
/* EC38C 802C79DC 0C0B1B5B */ jal si_handle_child_thread
/* EC38C 802C79DC 0C0B1B5B */ jal si_handle_parallel_thread
/* EC390 802C79E0 0200202D */ daddu $a0, $s0, $zero
/* EC394 802C79E4 080B1E95 */ j .L802C7A54
/* EC398 802C79E8 0040282D */ daddu $a1, $v0, $zero
/* EC39C 802C79EC 0C0B1B7D */ jal si_handle_end_child_thread
/* EC39C 802C79EC 0C0B1B7D */ jal si_handle_end_parallel_thread
/* EC3A0 802C79F0 0200202D */ daddu $a0, $s0, $zero
/* EC3A4 802C79F4 080B1E95 */ j .L802C7A54
/* EC3A8 802C79F8 0040282D */ daddu $a1, $v0, $zero
@ -407,7 +407,7 @@ glabel si_execute_next_command
/* EC3F8 802C7A48 0040282D */ daddu $a1, $v0, $zero
.L802C7A4C:
/* EC3FC 802C7A4C 080B1E93 */ j .L802C7A4C
/* EC400 802C7A50 00000000 */ nop
/* EC400 802C7A50 00000000 */ nop
.L802C7A54:
/* EC404 802C7A54 24020003 */ addiu $v0, $zero, 3
/* EC408 802C7A58 10A2FE6E */ beq $a1, $v0, .L802C7414
@ -424,13 +424,13 @@ glabel si_execute_next_command
/* EC434 802C7A84 A2000002 */ sb $zero, 2($s0)
.L802C7A88:
/* EC438 802C7A88 14A2FE62 */ bne $a1, $v0, .L802C7414
/* EC43C 802C7A8C 00000000 */ nop
/* EC43C 802C7A8C 00000000 */ nop
/* EC440 802C7A90 A2000002 */ sb $zero, 2($s0)
/* EC444 802C7A94 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* EC448 802C7A98 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* EC44C 802C7A9C 80420078 */ lb $v0, 0x78($v0)
/* EC450 802C7AA0 1445FE5C */ bne $v0, $a1, .L802C7414
/* EC454 802C7AA4 00000000 */ nop
/* EC454 802C7AA4 00000000 */ nop
.L802C7AA8:
/* EC458 802C7AA8 0000102D */ daddu $v0, $zero, $zero
.L802C7AAC:

View File

@ -1,7 +1,7 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_child_thread
glabel si_handle_parallel_thread
/* EB71C 802C6D6C 27BDFFE8 */ addiu $sp, $sp, -0x18
/* EB720 802C6D70 AFB00010 */ sw $s0, 0x10($sp)
/* EB724 802C6D74 0080802D */ daddu $s0, $a0, $zero

View File

@ -1,7 +1,7 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel si_handle_thread
glabel si_handle_spawn_thread
/* EB628 802C6C78 27BDFFE8 */ addiu $sp, $sp, -0x18
/* EB62C 802C6C7C AFB00010 */ sw $s0, 0x10($sp)
/* EB630 802C6C80 0080802D */ daddu $s0, $a0, $zero

View File

@ -35,8 +35,8 @@ typedef enum ScriptOpcode {
ScriptOpcode_CASE_LE, ///< Args: expression to test for
ScriptOpcode_CASE_GE, ///< Args: expression to test for
ScriptOpcode_CASE_ELSE,
ScriptOpcode_CASE_MULTI_EQ, ///< Args: expression to test for
ScriptOpcode_CASE_MULTI_NE, ///< Args: expression to test for
ScriptOpcode_CASE_MULTI_OR_EQ, ///< Args: expression to test for
ScriptOpcode_CASE_MULTI_AND_EQ, ///< Args: expression to test for
ScriptOpcode_CASE_FLAG, ///< Args: expression to test for
ScriptOpcode_END_CASE_MULTI, ///< Ends the case block of ScriptOpcode_CASE_MULTI_OR_EQ condition(s).
ScriptOpcode_CASE_RANGE, ///< Args: from, to

View File

@ -84,7 +84,7 @@ ApiStatus si_handle_break_loop(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_wait(ScriptInstance* script) {
ApiStatus si_handle_sleep_frames(ScriptInstance* script) {
Bytecode* ptrReadPos = script->ptrReadPos;
if (!script->blocked) {
@ -102,7 +102,7 @@ ApiStatus si_handle_wait(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_wait_seconds(ScriptInstance* script) {
ApiStatus si_handle_sleep_seconds(ScriptInstance* script) {
Bytecode* ptrReadPos = script->ptrReadPos;
if (!script->blocked) {
@ -180,7 +180,7 @@ ApiStatus si_handle_if_greater_equal(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_if_AND(ScriptInstance* script) {
ApiStatus si_handle_if_flag(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
@ -191,7 +191,7 @@ ApiStatus si_handle_if_AND(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_if_not_AND(ScriptInstance* script) {
ApiStatus si_handle_if_not_flag(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
Bytecode var = *args++;
@ -211,7 +211,7 @@ ApiStatus si_handle_end_if(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_switch(ScriptInstance* script) {
ApiStatus si_handle_match(ScriptInstance* script) {
Bytecode value = get_variable(script, *script->ptrReadPos);
s32 switchDepth = ++script->switchDepth;
@ -223,7 +223,7 @@ ApiStatus si_handle_switch(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_switch_const(ScriptInstance* script) {
ApiStatus si_handle_match_const(ScriptInstance* script) {
Bytecode* args = *script->ptrReadPos;
s32 switchDepth = ++script->switchDepth;
@ -399,7 +399,7 @@ ApiStatus si_handle_case_range(ScriptInstance* script) {
do {} while (0); // Necessary to match
}
ApiStatus si_handle_case_default(ScriptInstance* script) {
ApiStatus si_handle_case_else(ScriptInstance* script) {
s32 switchDepth = script->switchDepth;
ASSERT(switchDepth >= 0);
@ -413,7 +413,7 @@ ApiStatus si_handle_case_default(ScriptInstance* script) {
do {} while (0); // Necessary to match
}
ApiStatus si_handle_case_AND(ScriptInstance* script) {
ApiStatus si_handle_case_flag(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
s32 switchDepth = script->switchDepth;
s32 var;
@ -438,7 +438,7 @@ ApiStatus si_handle_case_AND(ScriptInstance* script) {
do {} while (0); // Necessary to match
}
ApiStatus si_handle_case_equal_OR(ScriptInstance* script) {
ApiStatus si_handle_case_multi_or_equal(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
s32 switchDepth = script->switchDepth;
s32 var;
@ -463,7 +463,7 @@ ApiStatus si_handle_case_equal_OR(ScriptInstance* script) {
do {} while (0); // Necessary to match
}
ApiStatus si_handle_case_equal_AND(ScriptInstance* script) {
ApiStatus si_handle_case_multi_and_equal(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
s32 switchDepth = script->switchDepth;
s32 var;
@ -491,7 +491,7 @@ ApiStatus si_handle_case_equal_AND(ScriptInstance* script) {
do {} while (0); // Necessary to match
}
ApiStatus si_handle_end_case_group(ScriptInstance* script) {
ApiStatus si_handle_end_case_multi(ScriptInstance* script) {
ASSERT(script->switchDepth >= 0);
if (script->switchBlockState[script->switchDepth] == 0) {
@ -509,13 +509,13 @@ ApiStatus si_handle_end_case_group(ScriptInstance* script) {
do {} while (0); // Necessary to match
}
ApiStatus si_handle_break_case(ScriptInstance* script) {
ApiStatus si_handle_break_match(ScriptInstance* script) {
ASSERT(script->switchDepth >= 0);
script->ptrNextLine = si_goto_end_case(script);
return ApiStatus_DONE2;
}
ApiStatus si_handle_end_switch(ScriptInstance* script) {
ApiStatus si_handle_end_match(ScriptInstance* script) {
s32 switchDepth = script->switchDepth;
ASSERT(switchDepth >= 0);
@ -898,7 +898,7 @@ ApiStatus si_handle_call(ScriptInstance* script) {
return func(newScript, isInitialCall); // todo fake match
}
ApiStatus si_handle_exec1(ScriptInstance* script) {
ApiStatus si_handle_spawn_script(ScriptInstance* script) {
ScriptInstance* newScript;
s32 i;
@ -924,7 +924,7 @@ ApiStatus si_handle_exec1(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_exec2(ScriptInstance* script) {
ApiStatus si_handle_spawn_script_get_id(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
ScriptInstance* var = (ScriptInstance*)get_variable(script, *args++);
Bytecode arg2 = *args++;
@ -952,7 +952,7 @@ ApiStatus si_handle_exec2(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_exec_wait(ScriptInstance* script) {
ApiStatus si_handle_await_script(ScriptInstance* script) {
start_child_script(script, get_variable(script, *script->ptrReadPos), 0);
script->currentOpcode = 0;
return ApiStatus_FINISH;
@ -991,7 +991,7 @@ s32 _bound_script_trigger_handler(Trigger* trigger) {
return 1;
}
ApiStatus si_handle_bind(ScriptInstance* script) {
ApiStatus si_handle_bind_trigger(ScriptInstance* script) {
Bytecode* args = script->ptrReadPos;
Trigger* trigger;
Bytecode* triggerScript = get_variable(script, *args++);
@ -1033,7 +1033,7 @@ ApiStatus si_handle_unbind(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_kill(ScriptInstance* script) {
ApiStatus si_handle_kill_script(ScriptInstance* script) {
kill_script_by_ID(get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
@ -1073,12 +1073,12 @@ ApiStatus si_handle_resume_others(ScriptInstance* script) {
return ApiStatus_DONE2;
}
ApiStatus si_handle_suspend(ScriptInstance* script) {
ApiStatus si_handle_suspend_script(ScriptInstance* script) {
suspend_all_script(get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
ApiStatus si_handle_resume(ScriptInstance* script) {
ApiStatus si_handle_resume_script(ScriptInstance* script) {
resume_all_script(get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2;
}
@ -1139,16 +1139,16 @@ ApiStatus si_handle_bind_lock(ScriptInstance* script) {
return ApiStatus_DONE2;
}
INCLUDE_ASM(s32, "si", si_handle_thread, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "si", si_handle_spawn_thread, ScriptInstance* script, s32 isInitialCall);
ApiStatus si_handle_end_thread(ScriptInstance* script) {
ApiStatus si_handle_end_spawn_thread(ScriptInstance* script) {
kill_script(script);
return ApiStatus_FINISH;
}
INCLUDE_ASM(s32, "si", si_handle_child_thread, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "si", si_handle_parallel_thread, ScriptInstance* script, s32 isInitialCall);
ApiStatus si_handle_end_child_thread(ScriptInstance* script) {
ApiStatus si_handle_end_parallel_thread(ScriptInstance* script) {
kill_script(script);
return ApiStatus_BLOCK;
}

View File

@ -5,7 +5,7 @@ from lark import Lark, exceptions, Tree, Transformer, Visitor, v_args, Token
from lark.visitors import Discard
import traceback
DEBUG_OUTPUT = "debug.i"
DEBUG_OUTPUT = None
def eprint(*args, **kwargs):
print(*args, file=stderr, **kwargs)
@ -389,7 +389,7 @@ class Compile(Transformer):
return [*multi_case, *block, Cmd("ScriptOpcode_END_CASE_MULTI")]
def multi_case(self, tree):
return [Cmd("ScriptOpcode_CASE_MULTI_EQ", expr) for expr in tree.children]
return [Cmd("ScriptOpcode_CASE_MULTI_OR_EQ", expr) for expr in tree.children]
def loop_stmt(self, tree):
expr = tree.children.pop(0) if len(tree.children) > 1 else 0

View File

@ -235,11 +235,11 @@ class ScriptDisassembler:
self.indent += 1
elif opcode == 0x1D:
self.indent -= 1
self.write_line(f"SI_CMD(ScriptOpcode_CASE_MULTI_EQ, {self.var(argv[0])}),")
self.write_line(f"SI_CMD(ScriptOpcode_CASE_MULTI_OR_EQ, {self.var(argv[0])}),")
self.indent += 1
elif opcode == 0x1E:
self.indent -= 1
self.write_line(f"SI_CMD(ScriptOpcode_CASE_MULTI_NE, {self.var(argv[0])}),")
self.write_line(f"SI_CMD(ScriptOpcode_CASE_MULTI_AND_EQ, {self.var(argv[0])}),")
self.indent += 1
elif opcode == 0x1F:
self.indent -= 1

View File

@ -1555,20 +1555,20 @@ si_handle_goto = 0x802C49C0;
si_handle_loop = 0x802C4A00;
si_handle_end_loop = 0x802C4A48;
si_handle_break_loop = 0x802C4B0C;
si_handle_wait = 0x802C4B5C;
si_handle_wait_seconds = 0x802C4BB8;
si_handle_sleep_frames = 0x802C4B5C;
si_handle_sleep_seconds = 0x802C4BB8;
si_handle_if_equal = 0x802C4C40;
si_handle_if_not_equal = 0x802C4CA0;
si_handle_if_less = 0x802C4D00;
si_handle_if_greater = 0x802C4D64;
si_handle_if_less_equal = 0x802C4DC8;
si_handle_if_greater_equal = 0x802C4E2C;
si_handle_if_AND = 0x802C4E90;
si_handle_if_not_AND = 0x802C4EE8;
si_handle_if_flag = 0x802C4E90;
si_handle_if_not_flag = 0x802C4EE8;
si_handle_else = 0x802C4F40;
si_handle_end_if = 0x802C4F6C;
si_handle_switch = 0x802C4F74;
si_handle_switch_const = 0x802C4FE4;
si_handle_match = 0x802C4F74;
si_handle_match_const = 0x802C4FE4;
si_handle_case_equal = 0x802C5030;
si_handle_case_not_equal = 0x802C50BC;
si_handle_case_less = 0x802C5148;
@ -1576,13 +1576,13 @@ si_handle_case_less_equal = 0x802C51D8;
si_handle_case_greater = 0x802C5268;
si_handle_case_greater_equal = 0x802C52F8;
si_handle_case_range = 0x802C5388;
si_handle_case_default = 0x802C5444;
si_handle_case_AND = 0x802C549C;
si_handle_case_equal_OR = 0x802C5518;
si_handle_case_equal_AND = 0x802C55B8;
si_handle_end_case_group = 0x802C565C;
si_handle_break_case = 0x802C56D4;
si_handle_end_switch = 0x802C5718;
si_handle_case_else = 0x802C5444;
si_handle_case_flag = 0x802C549C;
si_handle_case_multi_or_equal = 0x802C5518;
si_handle_case_multi_and_equal = 0x802C55B8;
si_handle_end_case_multi = 0x802C565C;
si_handle_break_match = 0x802C56D4;
si_handle_end_match = 0x802C5718;
si_handle_set_var = 0x802C5744;
si_handle_set_const = 0x802C5790;
si_handle_set_float = 0x802C57B8;
@ -1615,15 +1615,15 @@ si_handle_AND_const = 0x802C62D4;
si_handle_OR = 0x802C632C;
si_handle_OR_const = 0x802C6390;
si_handle_call = 0x802C63E8;
si_handle_exec1 = 0x802C646C;
si_handle_exec2 = 0x802C6524;
si_handle_exec_wait = 0x802C65FC;
si_handle_spawn_script = 0x802C646C;
si_handle_spawn_script_get_id = 0x802C6524;
si_handle_await_script = 0x802C65FC;
si_handle_jump = 0x802C6640;
_bound_script_trigger_handler = 0x802C667C;
si_handle_bind = 0x802C6714;
si_handle_bind_trigger = 0x802C6714;
DeleteTrigger = 0x802C6824;
si_handle_unbind = 0x802C6850;
si_handle_kill = 0x802C6870;
si_handle_kill_script = 0x802C6870;
si_handle_set_priority = 0x802C689C;
si_handle_set_timescale = 0x802C68D8;
si_handle_set_group = 0x802C6914;
@ -1631,15 +1631,15 @@ si_handle_suspend_all = 0x802C6950;
si_handle_resume_all = 0x802C697C;
si_handle_suspend_others = 0x802C69A8;
si_handle_resume_others = 0x802C69E4;
si_handle_suspend = 0x802C6A20;
si_handle_resume = 0x802C6A4C;
si_handle_suspend_script = 0x802C6A20;
si_handle_resume_script = 0x802C6A4C;
si_handle_does_script_exist = 0x802C6A78;
si_standard_trigger_executor = 0x802C6AD0;
si_handle_bind_lock = 0x802C6B54;
si_handle_thread = 0x802C6C78;
si_handle_end_thread = 0x802C6D4C;
si_handle_child_thread = 0x802C6D6C;
si_handle_end_child_thread = 0x802C6DF4;
si_handle_spawn_thread = 0x802C6C78;
si_handle_end_spawn_thread = 0x802C6D4C;
si_handle_parallel_thread = 0x802C6D6C;
si_handle_end_parallel_thread = 0x802C6DF4;
si_handle_print_debug_var = 0x802C6E1C;
si_execute_next_command = 0x802C7404;
get_variable = 0x802C7ABC;