From 638cf3751cde723ab6e167a57ed5a6251e60fcbd Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Fri, 29 Nov 2019 22:01:52 +1000 Subject: [PATCH] Decompile func0f0bb350 --- src/game/game_0b28d0.c | 46 ++++++++++------------------------ src/include/game/game_0b28d0.h | 2 +- src/include/types.h | 8 +++--- 3 files changed, 18 insertions(+), 38 deletions(-) diff --git a/src/game/game_0b28d0.c b/src/game/game_0b28d0.c index 312ca7067..8cc37d6e7 100644 --- a/src/game/game_0b28d0.c +++ b/src/game/game_0b28d0.c @@ -10104,39 +10104,19 @@ void func0f0bb320(s32 arg0, s32 arg1, s32 arg2, float arg3) g_Vars.currentplayer->unk02e4 = arg3; } -GLOBAL_ASM( -glabel func0f0bb350 -/* f0bb350: 3c03800a */ lui $v1,%hi(g_Vars) -/* f0bb354: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) -/* f0bb358: 8c6e0284 */ lw $t6,0x284($v1) -/* f0bb35c: 44802000 */ mtc1 $zero,$f4 -/* f0bb360: 00000000 */ sll $zero,$zero,0x0 -/* f0bb364: e5c402e8 */ swc1 $f4,0x2e8($t6) -/* f0bb368: 8c6f0284 */ lw $t7,0x284($v1) -/* f0bb36c: e5ec02ec */ swc1 $f12,0x2ec($t7) -/* f0bb370: 8c620284 */ lw $v0,0x284($v1) -/* f0bb374: 8c5802d8 */ lw $t8,0x2d8($v0) -/* f0bb378: ac5802f0 */ sw $t8,0x2f0($v0) -/* f0bb37c: 8c790284 */ lw $t9,0x284($v1) -/* f0bb380: af2502f4 */ sw $a1,0x2f4($t9) -/* f0bb384: 8c620284 */ lw $v0,0x284($v1) -/* f0bb388: 8c4802dc */ lw $t0,0x2dc($v0) -/* f0bb38c: ac4802f8 */ sw $t0,0x2f8($v0) -/* f0bb390: 8c690284 */ lw $t1,0x284($v1) -/* f0bb394: ad2602fc */ sw $a2,0x2fc($t1) -/* f0bb398: 8c620284 */ lw $v0,0x284($v1) -/* f0bb39c: 8c4a02e0 */ lw $t2,0x2e0($v0) -/* f0bb3a0: ac4a0300 */ sw $t2,0x300($v0) -/* f0bb3a4: 8c6b0284 */ lw $t3,0x284($v1) -/* f0bb3a8: ad670304 */ sw $a3,0x304($t3) -/* f0bb3ac: 8c620284 */ lw $v0,0x284($v1) -/* f0bb3b0: c44602e4 */ lwc1 $f6,0x2e4($v0) -/* f0bb3b4: e4460308 */ swc1 $f6,0x308($v0) -/* f0bb3b8: 8c6c0284 */ lw $t4,0x284($v1) -/* f0bb3bc: c7a80010 */ lwc1 $f8,0x10($sp) -/* f0bb3c0: 03e00008 */ jr $ra -/* f0bb3c4: e588030c */ swc1 $f8,0x30c($t4) -); +void func0f0bb350(float arg0, s32 arg1, s32 arg2, s32 arg3, float arg4) +{ + g_Vars.currentplayer->unk02e8 = 0; + g_Vars.currentplayer->unk02ec = arg0; + g_Vars.currentplayer->unk02f0 = g_Vars.currentplayer->unk02d8; + g_Vars.currentplayer->unk02f4 = arg1; + g_Vars.currentplayer->unk02f8 = g_Vars.currentplayer->unk02dc; + g_Vars.currentplayer->unk02fc = arg2; + g_Vars.currentplayer->unk0300 = g_Vars.currentplayer->unk02e0; + g_Vars.currentplayer->unk0304 = arg3; + g_Vars.currentplayer->unk0308 = g_Vars.currentplayer->unk02e4; + g_Vars.currentplayer->unk030c = arg4; +} GLOBAL_ASM( glabel func0f0bb3c8 diff --git a/src/include/game/game_0b28d0.h b/src/include/game/game_0b28d0.h index 761418b55..3bbbfd64c 100644 --- a/src/include/game/game_0b28d0.h +++ b/src/include/game/game_0b28d0.h @@ -106,7 +106,7 @@ u32 func0f0baf84(void); u32 func0f0bb04c(void); u32 func0f0bb2e8(void); void func0f0bb320(s32 arg0, s32 arg1, s32 arg2, float arg3); -u32 func0f0bb350(void); +void func0f0bb350(float arg0, s32 arg1, s32 arg2, s32 arg3, float arg4); void func0f0bb3c8(float arg0, float arg1); u32 func0f0bb3fc(void); u32 func0f0bb42c(void); diff --git a/src/include/types.h b/src/include/types.h index ae4d3ecfb..71c1810c8 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -657,16 +657,16 @@ struct player { /*0x02dc*/ u32 unk02dc; /*0x02e0*/ u32 unk02e0; /*0x02e4*/ float unk02e4; - /*0x02e8*/ u32 unk02e8; - /*0x02ec*/ u32 unk02ec; + /*0x02e8*/ float unk02e8; + /*0x02ec*/ float unk02ec; /*0x02f0*/ u32 unk02f0; /*0x02f4*/ u32 unk02f4; /*0x02f8*/ u32 unk02f8; /*0x02fc*/ u32 unk02fc; /*0x0300*/ u32 unk0300; /*0x0304*/ u32 unk0304; - /*0x0308*/ u32 unk0308; - /*0x030c*/ u32 unk030c; + /*0x0308*/ float unk0308; + /*0x030c*/ float unk030c; /*0x0310*/ u32 unk0310; /*0x0314*/ u32 unk0314; /*0x0318*/ u32 unk0318;