From 2a5bd3c035e326f80f2e0efe3e78401961f9fdb1 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 2 Nov 2020 22:56:41 +1000 Subject: [PATCH] Decompile func0f0a20fc --- src/game/game_097ba0.c | 19 ++++--------------- src/include/game/game_097ba0.h | 2 +- src/include/types.h | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/game/game_097ba0.c b/src/game/game_097ba0.c index 74db690ec..842854dd6 100644 --- a/src/game/game_097ba0.c +++ b/src/game/game_097ba0.c @@ -12592,21 +12592,10 @@ void currentPlayerEquipWeaponWrapper(bool arg0, s32 weaponnum) } } -GLOBAL_ASM( -glabel func0f0a20fc -/* f0a20fc: 00047900 */ sll $t7,$a0,0x4 -/* f0a2100: 01e47823 */ subu $t7,$t7,$a0 -/* f0a2104: 000f7880 */ sll $t7,$t7,0x2 -/* f0a2108: 01e47821 */ addu $t7,$t7,$a0 -/* f0a210c: 3c0e800a */ lui $t6,%hi(g_Vars+0x284) -/* f0a2110: 8dcea244 */ lw $t6,%lo(g_Vars+0x284)($t6) -/* f0a2114: 000f78c0 */ sll $t7,$t7,0x3 -/* f0a2118: 01e47821 */ addu $t7,$t7,$a0 -/* f0a211c: 000f7880 */ sll $t7,$t7,0x2 -/* f0a2120: 01cfc021 */ addu $t8,$t6,$t7 -/* f0a2124: 03e00008 */ jr $ra -/* f0a2128: 8302063c */ lb $v0,0x63c($t8) -); +s32 func0f0a20fc(s32 handnum) +{ + return g_Vars.currentplayer->hands[handnum].unk063c; +} GLOBAL_ASM( glabel func0f0a212c diff --git a/src/include/game/game_097ba0.h b/src/include/game/game_097ba0.h index 8d1a8006a..5a970b80b 100644 --- a/src/include/game/game_097ba0.h +++ b/src/include/game/game_097ba0.h @@ -98,7 +98,7 @@ void func0f0a1c2c(void); bool func0f0a1d14(u32 weaponnum); void func0f0a1df4(void); void currentPlayerEquipWeaponWrapper(bool arg0, s32 weaponnum); -bool func0f0a20fc(u32 arg0); +s32 func0f0a20fc(s32 handnum); u32 func0f0a212c(void); char *weaponGetName(s32 weaponnum); u16 weaponGetNameId(s32 weaponnum); diff --git a/src/include/types.h b/src/include/types.h index a3c8c0cff..c4af229ab 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -1667,7 +1667,7 @@ struct hand { /*0x0639*/ u8 unk0639; /*0x063a*/ u8 unk063a; /*0x063b*/ u8 weaponfunc; // 0 or 1 - /*0x063c*/ u8 unk063c; + /*0x063c*/ s8 unk063c; /*0x063d*/ s8 torchon; /*0x063e*/ u8 unk063e; /*0x063f*/ u8 unk063f;