From a0351a782870b8974646d3369774973e31846cbb Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sat, 29 Feb 2020 16:59:52 +1000 Subject: [PATCH] Decompile func0f128a9c and func0f128ab8 --- src/game/game_127910.c | 30 ++++++++++-------------------- src/include/game/game_127910.h | 4 ++-- src/include/types.h | 3 ++- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/game/game_127910.c b/src/game/game_127910.c index 780d736cf..d1b123eab 100644 --- a/src/game/game_127910.c +++ b/src/game/game_127910.c @@ -1122,27 +1122,17 @@ glabel propGetPlayerNum /* f128a98: 27bd0008 */ addiu $sp,$sp,0x8 ); -GLOBAL_ASM( -glabel func0f128a9c -/* f128a9c: 3c02800a */ lui $v0,%hi(g_Vars) -/* f128aa0: 24429fc0 */ addiu $v0,$v0,%lo(g_Vars) -/* f128aa4: 8c4e0284 */ lw $t6,0x284($v0) -/* f128aa8: a5c40630 */ sh $a0,0x630($t6) -/* f128aac: 8c4f0284 */ lw $t7,0x284($v0) -/* f128ab0: 03e00008 */ jr $ra -/* f128ab4: a5e50632 */ sh $a1,0x632($t7) -); +void func0f128a9c(u32 arg0, u32 arg1) +{ + g_Vars.currentplayer->unk0630 = arg0; + g_Vars.currentplayer->unk0632 = arg1; +} -GLOBAL_ASM( -glabel func0f128ab8 -/* f128ab8: 3c02800a */ lui $v0,%hi(g_Vars) -/* f128abc: 24429fc0 */ addiu $v0,$v0,%lo(g_Vars) -/* f128ac0: 8c4e0284 */ lw $t6,0x284($v0) -/* f128ac4: a5c40634 */ sh $a0,0x634($t6) -/* f128ac8: 8c4f0284 */ lw $t7,0x284($v0) -/* f128acc: 03e00008 */ jr $ra -/* f128ad0: a5e50636 */ sh $a1,0x636($t7) -); +void func0f128ab8(u32 arg0, u32 arg1) +{ + g_Vars.currentplayer->unk0634 = arg0; + g_Vars.currentplayer->unk0636 = arg1; +} void currentPlayerSetFovY(f32 fovy) { diff --git a/src/include/game/game_127910.h b/src/include/game/game_127910.h index d4cedcd10..7f4378adc 100644 --- a/src/include/game/game_127910.h +++ b/src/include/game/game_127910.h @@ -9,8 +9,8 @@ void playersAllocate(s32 count); void playerAllocate(u32 index); void currentPlayerCalculateAiBuddyNums(void); u32 propGetPlayerNum(struct prop *prop); -void func0f128a9c(u32 arg0, u32 arg2); -u32 func0f128ab8(void); +void func0f128a9c(u32 arg0, u32 arg1); +void func0f128ab8(u32 arg0, u32 arg1); void currentPlayerSetFovY(f32 fovy); void currentPlayerSetAspectRatio(f32 aspect); s32 func0f128af4(s32 arg0); diff --git a/src/include/types.h b/src/include/types.h index 1b00609b0..93ab3ca4c 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -1380,7 +1380,8 @@ struct player { /*0x062c*/ u32 unk062c; /*0x0630*/ u16 unk0630; /*0x0632*/ u16 unk0632; - /*0x0634*/ u32 unk0634; + /*0x0634*/ u16 unk0634; + /*0x0636*/ u16 unk0636; /*0x0638*/ u8 unk0638; /*0x063c*/ u32 unk063c; /*0x0640*/ u32 unk0640;