From e42a4e6db6bd0389b2c56b473e40c2fac1cd26a9 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 16 Mar 2020 20:36:28 +1000 Subject: [PATCH] Decompile currentPlayerSetUnk1754 --- src/game/game_0b3350.c | 11 ++++------- src/include/game/game_0b3350.h | 2 +- src/lib/lib_09660.c | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/game/game_0b3350.c b/src/game/game_0b3350.c index e7cab749d..a69d342da 100644 --- a/src/game/game_0b3350.c +++ b/src/game/game_0b3350.c @@ -2382,13 +2382,10 @@ f32 *currentPlayerGetUnk1740(void) return g_Vars.currentplayer->unk1740; } -GLOBAL_ASM( -glabel func0f0b5708 -/* f0b5708: 3c0e800a */ lui $t6,%hi(g_Vars+0x284) -/* f0b570c: 8dcea244 */ lw $t6,%lo(g_Vars+0x284)($t6) -/* f0b5710: 03e00008 */ jr $ra -/* f0b5714: adc41754 */ sw $a0,0x1754($t6) -); +void currentPlayerSetUnk1754(u32 value) +{ + g_Vars.currentplayer->unk1754 = value; +} GLOBAL_ASM( glabel func0f0b5718 diff --git a/src/include/game/game_0b3350.h b/src/include/game/game_0b3350.h index 078dcd50f..26ba961b0 100644 --- a/src/include/game/game_0b3350.h +++ b/src/include/game/game_0b3350.h @@ -35,7 +35,7 @@ void currentPlayerSetUnk1740(f32 *value); u32 func0f0b5050(void); u32 func0f0b53a4(void); f32 *currentPlayerGetUnk1740(void); -u32 func0f0b5708(void); +void currentPlayerSetUnk1754(u32 value); u32 func0f0b5718(void); u32 func0f0b5758(void); u32 func0f0b5778(void); diff --git a/src/lib/lib_09660.c b/src/lib/lib_09660.c index d3c1c9610..99614f575 100644 --- a/src/lib/lib_09660.c +++ b/src/lib/lib_09660.c @@ -1813,7 +1813,7 @@ glabel func0000ad5c /* aed8: 0fc2d3f6 */ jal currentPlayerSetUnk1750 /* aedc: 8ca40000 */ lw $a0,0x0($a1) /* aee0: 3c048009 */ lui $a0,%hi(var80092830) -/* aee4: 0fc2d5c2 */ jal func0f0b5708 +/* aee4: 0fc2d5c2 */ jal currentPlayerSetUnk1754 /* aee8: 24842830 */ addiu $a0,$a0,%lo(var80092830) /* aeec: 8fbf002c */ lw $ra,0x2c($sp) /* aef0: 02001025 */ or $v0,$s0,$zero @@ -1939,7 +1939,7 @@ glabel func0000af00 /* b0c0: 0fc2d3f6 */ jal currentPlayerSetUnk1750 /* b0c4: 8ca40000 */ lw $a0,0x0($a1) /* b0c8: 3c048009 */ lui $a0,%hi(var80092830) -/* b0cc: 0fc2d5c2 */ jal func0f0b5708 +/* b0cc: 0fc2d5c2 */ jal currentPlayerSetUnk1754 /* b0d0: 24842830 */ addiu $a0,$a0,%lo(var80092830) /* b0d4: 8fbf002c */ lw $ra,0x2c($sp) /* b0d8: 02001025 */ or $v0,$s0,$zero