From c3ef77d15b413a895bbd26de9483725d604448d2 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Tue, 4 Feb 2020 22:24:06 +1000 Subject: [PATCH] Decompile currentPlayerSetAllGuns --- src/game/game_111600.c | 28 +++++++++++----------------- src/include/game/game_097a50.h | 2 +- src/include/game/game_111600.h | 4 ++-- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/game/game_111600.c b/src/game/game_111600.c index 3be8b6aed..aae1febd2 100644 --- a/src/game/game_111600.c +++ b/src/game/game_111600.c @@ -285,24 +285,18 @@ glabel func0f111928 /* f11197c: 00000000 */ sll $zero,$zero,0x0 ); +void currentPlayerSetAllGuns(bool enable) +{ + s32 weaponnum; + + g_Vars.currentplayer->equipallguns = enable; + func0f112f70(); + weaponnum = func0f112c44(g_Vars.currentplayer->equipcuritem); + currentPlayerEquipWeaponInCutscene(weaponnum); +} + GLOBAL_ASM( -glabel currentPlayerSetAllGuns -/* f111980: 3c0e800a */ lui $t6,0x800a -/* f111984: 8dcea244 */ lw $t6,-0x5dbc($t6) -/* f111988: 27bdffe8 */ addiu $sp,$sp,-24 -/* f11198c: afbf0014 */ sw $ra,0x14($sp) -/* f111990: 0fc44bdc */ jal func0f112f70 -/* f111994: adc41870 */ sw $a0,0x1870($t6) -/* f111998: 3c0f800a */ lui $t7,0x800a -/* f11199c: 8defa244 */ lw $t7,-0x5dbc($t7) -/* f1119a0: 0fc44b11 */ jal func0f112c44 -/* f1119a4: 8de41874 */ lw $a0,0x1874($t7) -/* f1119a8: 0fc2865b */ jal currentPlayerEquipWeaponInCutscene -/* f1119ac: 00402025 */ or $a0,$v0,$zero -/* f1119b0: 8fbf0014 */ lw $ra,0x14($sp) -/* f1119b4: 27bd0018 */ addiu $sp,$sp,0x18 -/* f1119b8: 03e00008 */ jr $ra -/* f1119bc: 00000000 */ sll $zero,$zero,0x0 +glabel func0f1119c0 /* f1119c0: 3c0e800a */ lui $t6,0x800a /* f1119c4: 8dcea244 */ lw $t6,-0x5dbc($t6) /* f1119c8: 03e00008 */ jr $ra diff --git a/src/include/game/game_097a50.h b/src/include/game/game_097a50.h index ad6ffd139..fa00eee70 100644 --- a/src/include/game/game_097a50.h +++ b/src/include/game/game_097a50.h @@ -92,7 +92,7 @@ u32 func0f0a12b0(void); u32 func0f0a1318(void); u32 func0f0a134c(void); u32 func0f0a1528(void); -u32 currentPlayerEquipWeaponInCutscene(s8 arg0); +u32 currentPlayerEquipWeaponInCutscene(s32 arg0); u32 getCurrentPlayerWeaponId(u32 arg0); u32 getCurrentPlayerWeaponIdWrapper(u32 arg0); u32 func0f0a1a10(void); diff --git a/src/include/game/game_111600.h b/src/include/game/game_111600.h index 4249ccc39..89b2ed4c1 100644 --- a/src/include/game/game_111600.h +++ b/src/include/game/game_111600.h @@ -35,14 +35,14 @@ u32 func0f112950(void); u32 func0f112a58(void); struct textoverride *objGetTextOverride(struct defaultobj *obj); u32 func0f112bfc(void); -u32 func0f112c44(void); +s32 func0f112c44(s32 equipcuritem); u32 func0f112cf8(void); u32 func0f112dfc(void); u32 func0f112e24(void); u32 func0f112f38(void); u32 func0f112f50(void); u32 func0f112f60(void); -u32 func0f112f70(void); +void func0f112f70(void); u32 func0f112fec(void); u32 func0f113034(void); u32 func0f11307c(void);