Decompile playerGetCrouchPos

This commit is contained in:
Ryan Dwyer 2020-03-01 22:09:26 +10:00
parent 58935b3464
commit 1b96b5b765
3 changed files with 8 additions and 19 deletions

View File

@ -13228,7 +13228,7 @@ glabel func0f0c2364
/* f0c2614: 0c00744f */ jal animGetId
/* f0c2618: 8e040020 */ lw $a0,0x20($s0)
/* f0c261c: afa20078 */ sw $v0,0x78($sp)
/* f0c2620: 0fc331ab */ jal func0f0cc6ac
/* f0c2620: 0fc331ab */ jal playerGetCrouchPos
/* f0c2624: 8fa400fc */ lw $a0,0xfc($sp)
/* f0c2628: c62a0148 */ lwc1 $f10,0x148($s1)
/* f0c262c: 8e260168 */ lw $a2,0x168($s1)

View File

@ -4510,20 +4510,9 @@ s32 currentPlayerGetCrouchPos(void)
: g_Vars.currentplayer->autocrouchpos;
}
GLOBAL_ASM(
glabel func0f0cc6ac
/* f0cc6ac: 00047080 */ sll $t6,$a0,0x2
/* f0cc6b0: 3c02800a */ lui $v0,0x800a
/* f0cc6b4: 004e1021 */ addu $v0,$v0,$t6
/* f0cc6b8: 8c42a024 */ lw $v0,-0x5fdc($v0)
/* f0cc6bc: 8c4300ac */ lw $v1,0xac($v0)
/* f0cc6c0: 8c4500b0 */ lw $a1,0xb0($v0)
/* f0cc6c4: 0065082a */ slt $at,$v1,$a1
/* f0cc6c8: 10200003 */ beqz $at,.L0f0cc6d8
/* f0cc6cc: 00a02025 */ or $a0,$a1,$zero
/* f0cc6d0: 03e00008 */ jr $ra
/* f0cc6d4: 00601025 */ or $v0,$v1,$zero
.L0f0cc6d8:
/* f0cc6d8: 03e00008 */ jr $ra
/* f0cc6dc: 00801025 */ or $v0,$a0,$zero
);
s32 playerGetCrouchPos(s32 playernum)
{
return (g_Vars.players[playernum]->crouchpos < g_Vars.players[playernum]->autocrouchpos)
? g_Vars.players[playernum]->crouchpos
: g_Vars.players[playernum]->autocrouchpos;
}

View File

@ -41,6 +41,6 @@ void func0f0cc19c(struct coord *arg);
u32 func0f0cc3b8(void);
u32 func0f0cc654(void);
s32 currentPlayerGetCrouchPos(void);
u32 func0f0cc6ac(void);
s32 playerGetCrouchPos(s32 playernum);
#endif