Decompile coverHasFlag0002

This commit is contained in:
Ryan Dwyer 2020-01-26 23:35:10 +10:00
parent c035633229
commit 9e958fbe5c
3 changed files with 12 additions and 26 deletions

View File

@ -50932,7 +50932,7 @@ glabel func0f04ba34
/* f04bba4: 322a2000 */ andi $t2,$s1,0x2000
/* f04bba8: 5540000b */ bnezl $t2,.L0f04bbd8
/* f04bbac: 322c0040 */ andi $t4,$s1,0x40
/* f04bbb0: 0fc45917 */ jal func0f11645c
/* f04bbb0: 0fc45917 */ jal coverHasFlag0002
/* f04bbb4: 02002025 */ or $a0,$s0,$zero
/* f04bbb8: 1440008b */ bnez $v0,.L0f04bde8
/* f04bbbc: 8fab0098 */ lw $t3,0x98($sp)
@ -51310,7 +51310,7 @@ glabel func0f04bffc
/* f04c0e4: 02402825 */ or $a1,$s2,$zero
/* f04c0e8: 5040003e */ beqzl $v0,.L0f04c1e4
/* f04c0ec: 26100001 */ addiu $s0,$s0,0x1
/* f04c0f0: 0fc45917 */ jal func0f11645c
/* f04c0f0: 0fc45917 */ jal coverHasFlag0002
/* f04c0f4: 02002025 */ or $a0,$s0,$zero
/* f04c0f8: 14400039 */ bnez $v0,.L0f04c1e0
/* f04c0fc: 8fa90064 */ lw $t1,0x64($sp)

View File

@ -800,29 +800,15 @@ glabel func0f1162e0
/* f116458: 00801025 */ or $v0,$a0,$zero
);
GLOBAL_ASM(
glabel func0f11645c
/* f11645c: 04800007 */ bltz $a0,.L0f11647c
/* f116460: 3c0e800a */ lui $t6,0x800a
/* f116464: 8dce2350 */ lw $t6,0x2350($t6)
/* f116468: 3c18800a */ lui $t8,0x800a
/* f11646c: 8dcf0004 */ lw $t7,0x4($t6)
/* f116470: 01e4082a */ slt $at,$t7,$a0
/* f116474: 10200003 */ beqz $at,.L0f116484
/* f116478: 00000000 */ sll $zero,$zero,0x0
.L0f11647c:
/* f11647c: 03e00008 */ jr $ra
/* f116480: 00001025 */ or $v0,$zero,$zero
.L0f116484:
/* f116484: 8f182360 */ lw $t8,0x2360($t8)
/* f116488: 0004c840 */ sll $t9,$a0,0x1
/* f11648c: 03194021 */ addu $t0,$t8,$t9
/* f116490: 95020000 */ lhu $v0,0x0($t0)
/* f116494: 30490002 */ andi $t1,$v0,0x2
/* f116498: 01201025 */ or $v0,$t1,$zero
/* f11649c: 03e00008 */ jr $ra
/* f1164a0: 00000000 */ sll $zero,$zero,0x0
);
bool coverHasFlag0002(s32 covernum)
{
// @bug: Second condition should be >=
if (covernum < 0 || covernum > g_PadsFile[1]) {
return false;
}
return g_CoverFlags[covernum] & COVERFLAG_0002;
}
void coverSetFlag0002(s32 covernum, bool enable)
{

View File

@ -12,7 +12,7 @@ void padSetFlag(s32 padnum, u32 flag);
void padUnsetFlag(s32 padnum, u32 flag);
s32 func0f1162d0(void);
u32 func0f1162e0(s16 cover, struct coord **pos);
u32 func0f11645c(void);
bool coverHasFlag0002(s32 covernum);
void coverSetFlag0002(s32 covernum, bool enable);
void coverSetFlag(s32 covernum, u32 flag);
void coverUnsetFlag(s32 covernum, u32 flag);