From 4435b3161a3c92a3ad766491b66ba79f8377e4b5 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 16 Mar 2020 22:28:16 +1000 Subject: [PATCH] Decompile currentPlayerGetScaleBg2Gfx --- src/game/game_0b63b0.c | 2 +- src/game/game_13c510.c | 2 +- src/game/game_157db0.c | 11 ++++------- src/game/game_165670.c | 2 +- src/include/game/game_157db0.h | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/game/game_0b63b0.c b/src/game/game_0b63b0.c index f08f45497..2fed0bfa1 100644 --- a/src/game/game_0b63b0.c +++ b/src/game/game_0b63b0.c @@ -10518,7 +10518,7 @@ glabel func0f0bfc7c /* f0bfc8c: 00a08025 */ or $s0,$a1,$zero /* f0bfc90: 00c08825 */ or $s1,$a2,$zero /* f0bfc94: afb20040 */ sw $s2,0x40($sp) -/* f0bfc98: 0fc5722e */ jal func0f15c8b8 +/* f0bfc98: 0fc5722e */ jal currentPlayerGetScaleBg2Gfx /* f0bfc9c: afa40110 */ sw $a0,0x110($sp) /* f0bfca0: 3c12800a */ lui $s2,%hi(g_Vars) /* f0bfca4: 26529fc0 */ addiu $s2,$s2,%lo(g_Vars) diff --git a/src/game/game_13c510.c b/src/game/game_13c510.c index dfd3c7831..b07896b6e 100644 --- a/src/game/game_13c510.c +++ b/src/game/game_13c510.c @@ -301,7 +301,7 @@ glabel func0f13c780 /* f13c85c: 02002025 */ or $a0,$s0,$zero /* f13c860: 0fc59a9b */ jal func0f166a6c /* f13c864: 018d8821 */ addu $s1,$t4,$t5 -/* f13c868: 0fc5722e */ jal func0f15c8b8 +/* f13c868: 0fc5722e */ jal currentPlayerGetScaleBg2Gfx /* f13c86c: 00000000 */ sll $zero,$zero,0x0 /* f13c870: 46000306 */ mov.s $f12,$f0 /* f13c874: 0c0057e2 */ jal func00015f88 diff --git a/src/game/game_157db0.c b/src/game/game_157db0.c index 8b5855b8d..f305f9057 100644 --- a/src/game/game_157db0.c +++ b/src/game/game_157db0.c @@ -5297,13 +5297,10 @@ glabel func0f15c888 /* f15c8b4: 46062003 */ div.s $f0,$f4,$f6 ); -GLOBAL_ASM( -glabel func0f15c8b8 -/* f15c8b8: 3c0e800a */ lui $t6,%hi(g_Vars+0x288) -/* f15c8bc: 8dcea248 */ lw $t6,%lo(g_Vars+0x288)($t6) -/* f15c8c0: 03e00008 */ jr $ra -/* f15c8c4: c5c00074 */ lwc1 $f0,0x74($t6) -); +f32 currentPlayerGetScaleBg2Gfx(void) +{ + return g_Vars.currentplayerstats->scale_bg2gfx; +} void currentPlayerSetScaleBg2Gfx(f32 scale) { diff --git a/src/game/game_165670.c b/src/game/game_165670.c index 55184e9b3..2d6f9555c 100644 --- a/src/game/game_165670.c +++ b/src/game/game_165670.c @@ -154,7 +154,7 @@ glabel func0f1657f8 /* f16580c: 8fbf0014 */ lw $ra,0x14($sp) /* f165810: 0c002fb8 */ jal func0000bee0 /* f165814: 27a40038 */ addiu $a0,$sp,0x38 -/* f165818: 0fc5722e */ jal func0f15c8b8 +/* f165818: 0fc5722e */ jal currentPlayerGetScaleBg2Gfx /* f16581c: 00000000 */ sll $zero,$zero,0x0 /* f165820: 3c048008 */ lui $a0,%hi(var80081058) /* f165824: 24841058 */ addiu $a0,$a0,%lo(var80081058) diff --git a/src/include/game/game_157db0.h b/src/include/game/game_157db0.h index e941016ef..3c0216c3c 100644 --- a/src/include/game/game_157db0.h +++ b/src/include/game/game_157db0.h @@ -28,7 +28,7 @@ void func0f15b908(s32 stagenum); u32 func0f15c850(void); u32 func0f15c880(void); f32 func0f15c888(void); -u32 func0f15c8b8(void); +f32 currentPlayerGetScaleBg2Gfx(void); void currentPlayerSetScaleBg2Gfx(f32 arg0); void func0f15c920(void); u32 func0f15ca00(void);