diff --git a/src/game/game_092610.c b/src/game/game_092610.c index 172684817..dc6cf4f5e 100644 --- a/src/game/game_092610.c +++ b/src/game/game_092610.c @@ -64,60 +64,20 @@ const u32 var7f1ab784[] = {0x4b18967f}; const u32 var7f1ab788[] = {0x4b18967f}; const u32 var7f1ab78c[] = {0x00000000}; -GLOBAL_ASM( -glabel func0f092610 -/* f092610: 3c038009 */ lui $v1,%hi(g_Is4Mb) -/* f092614: 90630af0 */ lbu $v1,%lo(g_Is4Mb)($v1) -/* f092618: 24080001 */ addiu $t0,$zero,0x1 -/* f09261c: 00803025 */ or $a2,$a0,$zero -/* f092620: 00a03825 */ or $a3,$a1,$zero -/* f092624: 15030003 */ bne $t0,$v1,.L0f092634 -/* f092628: 00001025 */ or $v0,$zero,$zero -/* f09262c: 10000002 */ b .L0f092638 -/* f092630: 2404001e */ addiu $a0,$zero,0x1e -.L0f092634: -/* f092634: 24040028 */ addiu $a0,$zero,0x28 -.L0f092638: -/* f092638: 1880001d */ blez $a0,.L0f0926b0 -/* f09263c: 3c0e8007 */ lui $t6,%hi(var8006ae10) -/* f092640: 8dceae10 */ lw $t6,%lo(var8006ae10)($t6) -/* f092644: 00027900 */ sll $t7,$v0,0x4 -/* f092648: 01e27823 */ subu $t7,$t7,$v0 -/* f09264c: 000f78c0 */ sll $t7,$t7,0x3 -/* f092650: 01cf2821 */ addu $a1,$t6,$t7 -/* f092654: 94b80030 */ lhu $t8,0x30($a1) -.L0f092658: -/* f092658: 24420001 */ addiu $v0,$v0,0x1 -/* f09265c: 33190001 */ andi $t9,$t8,0x1 -/* f092660: 1720000b */ bnez $t9,.L0f092690 -/* f092664: 00000000 */ nop -/* f092668: 8ca90050 */ lw $t1,0x50($a1) -/* f09266c: 14c90008 */ bne $a2,$t1,.L0f092690 -/* f092670: 00000000 */ nop -/* f092674: 84aa0028 */ lh $t2,0x28($a1) -/* f092678: 10ea0003 */ beq $a3,$t2,.L0f092688 -/* f09267c: 00000000 */ nop -/* f092680: 14e80003 */ bne $a3,$t0,.L0f092690 -/* f092684: 00000000 */ nop -.L0f092688: -/* f092688: 03e00008 */ jr $ra -/* f09268c: 24020001 */ addiu $v0,$zero,0x1 -.L0f092690: -/* f092690: 15030003 */ bne $t0,$v1,.L0f0926a0 -/* f092694: 24a50078 */ addiu $a1,$a1,0x78 -/* f092698: 10000002 */ b .L0f0926a4 -/* f09269c: 2404001e */ addiu $a0,$zero,0x1e -.L0f0926a0: -/* f0926a0: 24040028 */ addiu $a0,$zero,0x28 -.L0f0926a4: -/* f0926a4: 0044082a */ slt $at,$v0,$a0 -/* f0926a8: 5420ffeb */ bnezl $at,.L0f092658 -/* f0926ac: 94b80030 */ lhu $t8,0x30($a1) -.L0f0926b0: -/* f0926b0: 00001025 */ or $v0,$zero,$zero -/* f0926b4: 03e00008 */ jr $ra -/* f0926b8: 00000000 */ nop -); +bool func0f092610(s32 arg0, s32 arg1) +{ + s32 i; + + for (i = 0; i < (IS4MB() ? 30 : 40); i++) { + if ((var8006ae10[i].unk30 & 1) == 0 + && arg0 == var8006ae10[i].unk50 + && (arg1 == var8006ae10[i].unk28 || arg1 == 1)) { + return true; + } + } + + return false; +} GLOBAL_ASM( glabel func0f0926bc diff --git a/src/include/game/game_092610.h b/src/include/game/game_092610.h index 9f11750fa..5df6f0e72 100644 --- a/src/include/game/game_092610.h +++ b/src/include/game/game_092610.h @@ -3,7 +3,7 @@ #include #include "types.h" -u32 func0f092610(void); +bool func0f092610(s32 arg0, s32 arg1); void func0f0926bc(struct prop *prop, s32 arg1, u16 arg2); s32 func0f0927d4(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4); s32 func0f092914(s32 arg0); diff --git a/src/include/types.h b/src/include/types.h index eeb27d764..7e2fed7db 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -6688,7 +6688,7 @@ struct var8006ae10 { /*0x20*/ u32 unk20; /*0x24*/ u16 unk24; /*0x26*/ s16 unk26; - /*0x28*/ u32 unk28; + /*0x28*/ s16 unk28; /*0x2c*/ u32 unk2c; /*0x30*/ u16 unk30; /*0x34*/ u32 unk34;