diff --git a/src/game/game_015470.c b/src/game/game_015470.c index a9d7918d6..fab9a3185 100644 --- a/src/game/game_015470.c +++ b/src/game/game_015470.c @@ -1050,7 +1050,7 @@ glabel func0f016100 /* f016114: 0fc4a24b */ jal setCurrentPlayerNum /* f016118: afae0020 */ sw $t6,0x20($sp) /* f01611c: 27a40028 */ addiu $a0,$sp,0x28 -/* f016120: 0fc44c6b */ jal func0f1131ac +/* f016120: 0fc44c6b */ jal currentPlayerGetWeaponOfChoice /* f016124: 27a50024 */ addiu $a1,$sp,0x24 /* f016128: 8faf0034 */ lw $t7,0x34($sp) /* f01612c: 24010001 */ addiu $at,$zero,0x1 diff --git a/src/game/game_111600.c b/src/game/game_111600.c index 0bc1289ce..53ca9b32e 100644 --- a/src/game/game_111600.c +++ b/src/game/game_111600.c @@ -1571,7 +1571,7 @@ void currentPlayerIncrementGunHeldTime(s32 weapon1, s32 weapon2) } GLOBAL_ASM( -glabel func0f1131ac +glabel currentPlayerGetWeaponOfChoice /* f1131ac: ac800000 */ sw $zero,0x0($a0) /* f1131b0: 3c08800a */ lui $t0,%hi(g_Vars) /* f1131b4: 2402ffff */ addiu $v0,$zero,-1 @@ -1605,3 +1605,23 @@ glabel func0f1131ac /* f113218: 00000000 */ sll $zero,$zero,0x0 /* f11321c: 00000000 */ sll $zero,$zero,0x0 ); + +// regalloc +//void currentPlayerGetWeaponOfChoice(s32 *weapon1, s32 *weapon2) +//{ +// s32 mosttime = -1; +// s32 i; +// +// *weapon1 = 0; +// *weapon2 = 0; +// +// for (i = 0; i != MAX_GUNHELD; i++) { +// s32 time = g_Vars.currentplayer->gunheldarr[i].totaltime240_60; +// +// if (time >= 0 && time > mosttime) { +// *weapon1 = g_Vars.currentplayer->gunheldarr[i].weapon1; +// *weapon2 = g_Vars.currentplayer->gunheldarr[i].weapon2; +// mosttime = time; +// } +// } +//} diff --git a/src/include/game/game_111600.h b/src/include/game/game_111600.h index 6744d29f4..8fe010e45 100644 --- a/src/include/game/game_111600.h +++ b/src/include/game/game_111600.h @@ -46,6 +46,6 @@ void currentPlayerCalculateEquipCurItem(void); char *objGetActivatedText(struct defaultobj *obj); char *weaponGetActivatedText(s32 weaponnum); void currentPlayerIncrementGunHeldTime(s32 param_1, s32 param_2); -u32 func0f1131ac(void); +void currentPlayerGetWeaponOfChoice(s32 *weapon1, s32 *weapon2); #endif