diff --git a/asm/nonmatchings/code_317E50/func_802BD300.s b/asm/nonmatchings/code_317E50/func_802BD300.s deleted file mode 100644 index b52da54411..0000000000 --- a/asm/nonmatchings/code_317E50/func_802BD300.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802BD300 -/* 318050 802BD300 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 318054 802BD304 AFBF0014 */ sw $ra, 0x14($sp) -/* 318058 802BD308 AFB00010 */ sw $s0, 0x10($sp) -/* 31805C 802BD30C 10A00003 */ beqz $a1, .L802BD31C -/* 318060 802BD310 8C90014C */ lw $s0, 0x14c($a0) -/* 318064 802BD314 0C03BB31 */ jal func_800EECC4 -/* 318068 802BD318 0200202D */ daddu $a0, $s0, $zero -.L802BD31C: -/* 31806C 802BD31C 0C03BB3A */ jal func_800EECE8 -/* 318070 802BD320 0200202D */ daddu $a0, $s0, $zero -/* 318074 802BD324 8FBF0014 */ lw $ra, 0x14($sp) -/* 318078 802BD328 8FB00010 */ lw $s0, 0x10($sp) -/* 31807C 802BD32C 0002102B */ sltu $v0, $zero, $v0 -/* 318080 802BD330 03E00008 */ jr $ra -/* 318084 802BD334 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/asm/nonmatchings/code_317E50/func_802BD748.s b/asm/nonmatchings/code_317E50/func_802BD748.s deleted file mode 100644 index d1ed230c4c..0000000000 --- a/asm/nonmatchings/code_317E50/func_802BD748.s +++ /dev/null @@ -1,8 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802BD748 -/* 318498 802BD748 3C028011 */ lui $v0, %hi(D_8010EBB0) -/* 31849C 802BD74C 8042EBB0 */ lb $v0, %lo(D_8010EBB0)($v0) -/* 3184A0 802BD750 03E00008 */ jr $ra -/* 3184A4 802BD754 2C420001 */ sltiu $v0, $v0, 1 diff --git a/asm/nonmatchings/code_317E50/func_802BE4E8.s b/asm/nonmatchings/code_317E50/func_802BE4E8.s deleted file mode 100644 index e50ee13b01..0000000000 --- a/asm/nonmatchings/code_317E50/func_802BE4E8.s +++ /dev/null @@ -1,19 +0,0 @@ -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches - -glabel func_802BE4E8 -/* 319238 802BE4E8 27BDFFE8 */ addiu $sp, $sp, -0x18 -/* 31923C 802BE4EC AFBF0014 */ sw $ra, 0x14($sp) -/* 319240 802BE4F0 AFB00010 */ sw $s0, 0x10($sp) -/* 319244 802BE4F4 10A00003 */ beqz $a1, .L802BE504 -/* 319248 802BE4F8 8C90014C */ lw $s0, 0x14c($a0) -/* 31924C 802BE4FC 0C03BA65 */ jal func_800EE994 -/* 319250 802BE500 0200202D */ daddu $a0, $s0, $zero -.L802BE504: -/* 319254 802BE504 0C03BA6E */ jal func_800EE9B8 -/* 319258 802BE508 0200202D */ daddu $a0, $s0, $zero -/* 31925C 802BE50C 8FBF0014 */ lw $ra, 0x14($sp) -/* 319260 802BE510 8FB00010 */ lw $s0, 0x10($sp) -/* 319264 802BE514 0002102B */ sltu $v0, $zero, $v0 -/* 319268 802BE518 03E00008 */ jr $ra -/* 31926C 802BE51C 27BD0018 */ addiu $sp, $sp, 0x18 diff --git a/src/code_317E50.c b/src/code_317E50.c index f50d902bdd..8c9bbbf551 100644 --- a/src/code_317E50.c +++ b/src/code_317E50.c @@ -4,7 +4,14 @@ INCLUDE_ASM(s32, "code_317E50", func_802BD100_317E50); INCLUDE_ASM(s32, "code_317E50", func_802BD2D8); -INCLUDE_ASM(s32, "code_317E50", func_802BD300); +ApiStatus func_802BD300(ScriptInstance* script, s32 isInitialCall) { + s32 unk = script->owner2.npc; // todo what is this + + if (isInitialCall) { + func_800EECC4(unk); + } + return func_800EECE8(unk) != 0; +} INCLUDE_ASM(s32, "code_317E50", func_802BD338); @@ -12,11 +19,20 @@ INCLUDE_ASM(s32, "code_317E50", func_802BD6DC); INCLUDE_ASM(s32, "code_317E50", func_802BD720); -INCLUDE_ASM(s32, "code_317E50", func_802BD748); +s32 func_802BD748(void) { + return D_8010EBB0[0] == 0; +} INCLUDE_ASM(s32, "code_317E50", func_802BD758); -INCLUDE_ASM(s32, "code_317E50", func_802BE4E8); +ApiStatus func_802BE4E8(ScriptInstance* script, s32 isInitialCall) { + s32 unk = script->owner2.npc; // todo what is this + + if (isInitialCall) { + func_800EE994(unk); + } + return func_800EE9B8(unk) != 0; +} INCLUDE_ASM(s32, "code_317E50", func_802BE520);