diff --git a/src/game/data/data_01a3a0.c b/src/game/data/data_01a3a0.c index 37c320c58..b55074001 100644 --- a/src/game/data/data_01a3a0.c +++ b/src/game/data/data_01a3a0.c @@ -841,7 +841,7 @@ struct menu_item menuitems_1b7bc[] = { { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(282), (u32)&soloMenuTextNumKills, NULL }, // "Kills:" { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(283), (u32)&func0f10d1d0, NULL }, // "Accuracy:" { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, - { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(284), (u32)&func0f10d080, NULL }, // "Shot Total:" + { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(284), (u32)&soloMenuTextNumShots, NULL }, // "Shot Total:" { MENUITEMTYPE_LABEL, 0, L_AME(0), L_OPTIONS(285), (u32)&func0f10d0c0, NULL }, // "Head Shots:" { MENUITEMTYPE_LABEL, 0, L_AME(0), L_OPTIONS(286), (u32)&func0f10d100, NULL }, // "Body Shots:" { MENUITEMTYPE_LABEL, 0, L_AME(0), L_OPTIONS(287), (u32)&func0f10d140, NULL }, // "Limb Shots:" @@ -869,7 +869,7 @@ struct menu_item menuitems_1b98c[] = { { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(282), (u32)&soloMenuTextNumKills, NULL }, // "Kills:" { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(283), (u32)&func0f10d1d0, NULL }, // "Accuracy:" { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, - { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(284), (u32)&func0f10d080, NULL }, // "Shot Total:" + { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(284), (u32)&soloMenuTextNumShots, NULL }, // "Shot Total:" { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(285), (u32)&func0f10d0c0, NULL }, // "Head Shots:" { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(286), (u32)&func0f10d100, NULL }, // "Body Shots:" { MENUITEMTYPE_LABEL, 6, 0x00000000, L_OPTIONS(287), (u32)&func0f10d140, menuhandler0010e064 }, // "Limb Shots:" diff --git a/src/game/game_0b0420.c b/src/game/game_0b0420.c index dece3485a..a1a7ce5e9 100644 --- a/src/game/game_0b0420.c +++ b/src/game/game_0b0420.c @@ -116,7 +116,7 @@ glabel func0f0b0520 ); GLOBAL_ASM( -glabel func0f0b052c +glabel currentPlayerGetShotCount /* f0b052c: 3c0e800a */ lui $t6,%hi(g_Vars+0x288) /* f0b0530: 8dcea248 */ lw $t6,%lo(g_Vars+0x288)($t6) /* f0b0534: 00047880 */ sll $t7,$a0,0x2 diff --git a/src/game/game_10ccd0.c b/src/game/game_10ccd0.c index f6000ea9a..fe8dba951 100644 --- a/src/game/game_10ccd0.c +++ b/src/game/game_10ccd0.c @@ -275,32 +275,18 @@ char *soloMenuTextNumKills(struct menu_item *item) return g_StringPointer; } -GLOBAL_ASM( -glabel func0f10d080 -/* f10d080: 27bdffe8 */ addiu $sp,$sp,-24 -/* f10d084: afbf0014 */ sw $ra,0x14($sp) -/* f10d088: afa40018 */ sw $a0,0x18($sp) -/* f10d08c: 0fc2c14b */ jal func0f0b052c -/* f10d090: 00002025 */ or $a0,$zero,$zero -/* f10d094: 3c048007 */ lui $a0,%hi(g_StringPointer) -/* f10d098: 3c057f1b */ lui $a1,%hi(var7f1b3874) -/* f10d09c: 24a53874 */ addiu $a1,$a1,%lo(var7f1b3874) -/* f10d0a0: 8c841440 */ lw $a0,%lo(g_StringPointer)($a0) -/* f10d0a4: 0c004dad */ jal sprintf -/* f10d0a8: 00403025 */ or $a2,$v0,$zero -/* f10d0ac: 8fbf0014 */ lw $ra,0x14($sp) -/* f10d0b0: 3c028007 */ lui $v0,%hi(g_StringPointer) -/* f10d0b4: 8c421440 */ lw $v0,%lo(g_StringPointer)($v0) -/* f10d0b8: 03e00008 */ jr $ra -/* f10d0bc: 27bd0018 */ addiu $sp,$sp,0x18 -); +char *soloMenuTextNumShots(struct menu_item *item) +{ + sprintf(g_StringPointer, "%d", currentPlayerGetShotCount(0)); + return g_StringPointer; +} GLOBAL_ASM( glabel func0f10d0c0 /* f10d0c0: 27bdffe8 */ addiu $sp,$sp,-24 /* f10d0c4: afbf0014 */ sw $ra,0x14($sp) /* f10d0c8: afa40018 */ sw $a0,0x18($sp) -/* f10d0cc: 0fc2c14b */ jal func0f0b052c +/* f10d0cc: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d0d0: 24040001 */ addiu $a0,$zero,0x1 /* f10d0d4: 3c048007 */ lui $a0,%hi(g_StringPointer) /* f10d0d8: 3c057f1b */ lui $a1,%hi(var7f1b3878) @@ -320,7 +306,7 @@ glabel func0f10d100 /* f10d100: 27bdffe8 */ addiu $sp,$sp,-24 /* f10d104: afbf0014 */ sw $ra,0x14($sp) /* f10d108: afa40018 */ sw $a0,0x18($sp) -/* f10d10c: 0fc2c14b */ jal func0f0b052c +/* f10d10c: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d110: 24040002 */ addiu $a0,$zero,0x2 /* f10d114: 3c048007 */ lui $a0,%hi(g_StringPointer) /* f10d118: 3c057f1b */ lui $a1,%hi(var7f1b387c) @@ -340,7 +326,7 @@ glabel func0f10d140 /* f10d140: 27bdffe8 */ addiu $sp,$sp,-24 /* f10d144: afbf0014 */ sw $ra,0x14($sp) /* f10d148: afa40018 */ sw $a0,0x18($sp) -/* f10d14c: 0fc2c14b */ jal func0f0b052c +/* f10d14c: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d150: 24040003 */ addiu $a0,$zero,0x3 /* f10d154: 3c048007 */ lui $a0,%hi(g_StringPointer) /* f10d158: 3c057f1b */ lui $a1,%hi(var7f1b3880) @@ -360,10 +346,10 @@ glabel func0f10d180 /* f10d180: 27bdffe0 */ addiu $sp,$sp,-32 /* f10d184: afbf0014 */ sw $ra,0x14($sp) /* f10d188: afa40020 */ sw $a0,0x20($sp) -/* f10d18c: 0fc2c14b */ jal func0f0b052c +/* f10d18c: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d190: 24040004 */ addiu $a0,$zero,0x4 /* f10d194: afa20018 */ sw $v0,0x18($sp) -/* f10d198: 0fc2c14b */ jal func0f0b052c +/* f10d198: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d19c: 24040005 */ addiu $a0,$zero,0x5 /* f10d1a0: 8fae0018 */ lw $t6,0x18($sp) /* f10d1a4: 3c048007 */ lui $a0,%hi(g_StringPointer) @@ -384,25 +370,25 @@ glabel func0f10d1d0 /* f10d1d0: 27bdffc8 */ addiu $sp,$sp,-56 /* f10d1d4: afbf001c */ sw $ra,0x1c($sp) /* f10d1d8: afa40038 */ sw $a0,0x38($sp) -/* f10d1dc: 0fc2c14b */ jal func0f0b052c +/* f10d1dc: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d1e0: 00002025 */ or $a0,$zero,$zero /* f10d1e4: afa20034 */ sw $v0,0x34($sp) -/* f10d1e8: 0fc2c14b */ jal func0f0b052c +/* f10d1e8: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d1ec: 24040001 */ addiu $a0,$zero,0x1 /* f10d1f0: afa20030 */ sw $v0,0x30($sp) -/* f10d1f4: 0fc2c14b */ jal func0f0b052c +/* f10d1f4: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d1f8: 24040002 */ addiu $a0,$zero,0x2 /* f10d1fc: afa2002c */ sw $v0,0x2c($sp) -/* f10d200: 0fc2c14b */ jal func0f0b052c +/* f10d200: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d204: 24040003 */ addiu $a0,$zero,0x3 /* f10d208: afa20028 */ sw $v0,0x28($sp) -/* f10d20c: 0fc2c14b */ jal func0f0b052c +/* f10d20c: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d210: 24040004 */ addiu $a0,$zero,0x4 /* f10d214: afa20024 */ sw $v0,0x24($sp) -/* f10d218: 0fc2c14b */ jal func0f0b052c +/* f10d218: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d21c: 24040005 */ addiu $a0,$zero,0x5 /* f10d220: afa20020 */ sw $v0,0x20($sp) -/* f10d224: 0fc2c14b */ jal func0f0b052c +/* f10d224: 0fc2c14b */ jal currentPlayerGetShotCount /* f10d228: 24040006 */ addiu $a0,$zero,0x6 /* f10d22c: 8fa30034 */ lw $v1,0x34($sp) /* f10d230: 3c057f1b */ lui $a1,%hi(var7f1b3888) @@ -631,7 +617,6 @@ glabel func0f10d678 /* f10d6e0: 27bd0020 */ addiu $sp,$sp,0x20 ); -const char var7f1b3874[] = "%d"; const char var7f1b3878[] = "%d"; const char var7f1b387c[] = "%d"; const char var7f1b3880[] = "%d"; diff --git a/src/game/mplayer.c b/src/game/mplayer.c index a79429c1d..d056c03e0 100644 --- a/src/game/mplayer.c +++ b/src/game/mplayer.c @@ -3531,10 +3531,10 @@ glabel var7f1b8db0 /* f18a6dc: 00002025 */ or $a0,$zero,$zero /* f18a6e0: af001974 */ sw $zero,0x1974($t8) /* f18a6e4: 8c590284 */ lw $t9,0x284($v0) -/* f18a6e8: 0fc2c14b */ jal func0f0b052c +/* f18a6e8: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a6ec: af201978 */ sw $zero,0x1978($t9) /* f18a6f0: ae620000 */ sw $v0,0x0($s3) -/* f18a6f4: 0fc2c14b */ jal func0f0b052c +/* f18a6f4: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a6f8: 24040001 */ addiu $a0,$zero,0x1 /* f18a6fc: ae620004 */ sw $v0,0x4($s3) /* f18a700: ae600008 */ sw $zero,0x8($s3) @@ -3629,22 +3629,22 @@ glabel var7f1b8db0 /* f18a84c: ae6e0034 */ sw $t6,0x34($s3) /* f18a850: e6680028 */ swc1 $f8,0x28($s3) /* f18a854: 46049183 */ div.s $f6,$f18,$f4 -/* f18a858: 0fc2c14b */ jal func0f0b052c +/* f18a858: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a85c: e6660024 */ swc1 $f6,0x24($s3) /* f18a860: 00409025 */ or $s2,$v0,$zero -/* f18a864: 0fc2c14b */ jal func0f0b052c +/* f18a864: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a868: 24040004 */ addiu $a0,$zero,0x4 /* f18a86c: afa20064 */ sw $v0,0x64($sp) -/* f18a870: 0fc2c14b */ jal func0f0b052c +/* f18a870: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a874: 24040003 */ addiu $a0,$zero,0x3 /* f18a878: afa20068 */ sw $v0,0x68($sp) -/* f18a87c: 0fc2c14b */ jal func0f0b052c +/* f18a87c: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a880: 24040002 */ addiu $a0,$zero,0x2 /* f18a884: afa2006c */ sw $v0,0x6c($sp) -/* f18a888: 0fc2c14b */ jal func0f0b052c +/* f18a888: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a88c: 24040001 */ addiu $a0,$zero,0x1 /* f18a890: 00408825 */ or $s1,$v0,$zero -/* f18a894: 0fc2c14b */ jal func0f0b052c +/* f18a894: 0fc2c14b */ jal currentPlayerGetShotCount /* f18a898: 24040006 */ addiu $a0,$zero,0x6 /* f18a89c: 8e630000 */ lw $v1,0x0($s3) /* f18a8a0: 3c013f80 */ lui $at,0x3f80 diff --git a/src/include/game/game_0b0420.h b/src/include/game/game_0b0420.h index 629c100eb..93fc510b6 100644 --- a/src/include/game/game_0b0420.h +++ b/src/include/game/game_0b0420.h @@ -6,7 +6,7 @@ u32 func0f0b0420(void); u32 func0f0b046c(void); u32 func0f0b0520(void); -u32 func0f0b052c(void); +s32 currentPlayerGetShotCount(u32 type); void incrementKillCount(void); void incrementKnockoutCount(void); void decrementKnockoutCount(void); diff --git a/src/include/game/game_10ccd0.h b/src/include/game/game_10ccd0.h index b79b6a736..6b8cb5cfb 100644 --- a/src/include/game/game_10ccd0.h +++ b/src/include/game/game_10ccd0.h @@ -9,7 +9,7 @@ void savefileUnsetFlag(u32 value); u32 func0f10ce74(void); u32 func0f10cf2c(void); char *soloMenuTextNumKills(struct menu_item *item); -u32 func0f10d080(void); +char *soloMenuTextNumShots(struct menu_item *item); u32 func0f10d0c0(void); u32 func0f10d100(void); u32 func0f10d140(void);