diff --git a/src/game/data/data_01a3a0.c b/src/game/data/data_01a3a0.c index d466cfbaa..a783e8a70 100644 --- a/src/game/data/data_01a3a0.c +++ b/src/game/data/data_01a3a0.c @@ -836,7 +836,7 @@ struct menu_item menuitems_1b7bc[] = { { MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)menutextDifficulty, 0x00000000, NULL }, { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, { MENUITEMTYPE_LABEL, 0, L_AME(16), L_OPTIONS(281), 0x00000000, NULL }, // "Weapon of Choice:" - { MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)&func0f178450, 0x00000000, NULL }, + { MENUITEMTYPE_LABEL, 0, 0x00000020, (u32)&mpMenuTextWeaponOfChoiceName, 0x00000000, NULL }, { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(282), (u32)&func0f10d044, NULL }, // "Kills:" { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(283), (u32)&func0f10d1d0, NULL }, // "Accuracy:" @@ -865,7 +865,7 @@ struct menu_item menuitems_1b98c[] = { { MENUITEMTYPE_LABEL, 3, 0x01000020, (u32)&func0f10e3fc, 0x00000000, menuhandler0010e064 }, { MENUITEMTYPE_LABEL, 5, 0x01000020, (u32)&func0f10e468, 0x00000000, menuhandler0010e064 }, { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, - { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(281), (u32)&func0f178450, NULL }, // "Weapon of Choice" + { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(281), (u32)&mpMenuTextWeaponOfChoiceName, NULL }, // "Weapon of Choice" { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(282), (u32)&func0f10d044, NULL }, // "Kills:" { MENUITEMTYPE_LABEL, 0, 0x00000000, L_OPTIONS(283), (u32)&func0f10d1d0, NULL }, // "Accuracy:" { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index 5278798d7..12ae4f97d 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -10228,8 +10228,8 @@ struct menu_item menuitems_2a950[] = { { MENUITEMTYPE_LABEL, 0, 0x01000010, (u32)&mpGetCurrentPlayerName, (u32)&func0f17853c, menuhandler001785c4 }, { MENUITEMTYPE_LABEL, 0, 0x01000000, L_MPMENU(261), (u32)&mpMenuTextPlayerTitle, menuhandler00178a94 }, // "Title:" { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, - { MENUITEMTYPE_LABEL, 0, L_AME(16), L_MPMENU(262), 0x00000000, NULL }, // "Weapon of Choice:" - { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&func0f178450, 0x00000000, NULL }, + { MENUITEMTYPE_LABEL, 0, 0x00000210, L_MPMENU(262), 0x00000000, NULL }, // "Weapon of Choice:" + { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&mpMenuTextWeaponOfChoiceName, 0x00000000, NULL }, { MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, { MENUITEMTYPE_LABEL, 0, 0x00200210, L_MPMENU(263), 0x00000000, menuhandler001786d8 }, // "Awards:" { MENUITEMTYPE_LABEL, 0, 0x00000120, (u32)&func0f1784a4, 0x00000000, NULL }, diff --git a/src/game/game_016100.c b/src/game/game_016100.c index 007ff5fa5..9cabb384f 100644 --- a/src/game/game_016100.c +++ b/src/game/game_016100.c @@ -37,7 +37,7 @@ #include "types.h" GLOBAL_ASM( -glabel func0f016100 +glabel mpPlayerGetWeaponOfChoiceName /* f016100: 3c0e800a */ lui $t6,%hi(g_Vars+0x28c) /* f016104: 8dcea24c */ lw $t6,%lo(g_Vars+0x28c)($t6) /* f016108: 27bdffd0 */ addiu $sp,$sp,-48 diff --git a/src/game/game_177e00.c b/src/game/game_177e00.c index 67906116f..eda7f084c 100644 --- a/src/game/game_177e00.c +++ b/src/game/game_177e00.c @@ -321,30 +321,10 @@ glabel func0f1783a0 /* f17844c: 00001025 */ or $v0,$zero,$zero ); -GLOBAL_ASM( -glabel func0f178450 -/* f178450: 3c0e8007 */ lui $t6,%hi(g_MpPlayerNum) -/* f178454: 8dce1448 */ lw $t6,%lo(g_MpPlayerNum)($t6) -/* f178458: 27bdffe8 */ addiu $sp,$sp,-24 -/* f17845c: afa40018 */ sw $a0,0x18($sp) -/* f178460: 000e78c0 */ sll $t7,$t6,0x3 -/* f178464: 01ee7823 */ subu $t7,$t7,$t6 -/* f178468: 000f7880 */ sll $t7,$t7,0x2 -/* f17846c: 01ee7821 */ addu $t7,$t7,$t6 -/* f178470: 000f78c0 */ sll $t7,$t7,0x3 -/* f178474: 01ee7823 */ subu $t7,$t7,$t6 -/* f178478: 000f7900 */ sll $t7,$t7,0x4 -/* f17847c: 3c04800a */ lui $a0,%hi(g_MenuStack+0x83b) -/* f178480: afbf0014 */ sw $ra,0x14($sp) -/* f178484: 008f2021 */ addu $a0,$a0,$t7 -/* f178488: 9084e83b */ lbu $a0,%lo(g_MenuStack+0x83b)($a0) -/* f17848c: 0fc05840 */ jal func0f016100 -/* f178490: 00002825 */ or $a1,$zero,$zero -/* f178494: 8fbf0014 */ lw $ra,0x14($sp) -/* f178498: 27bd0018 */ addiu $sp,$sp,0x18 -/* f17849c: 03e00008 */ jr $ra -/* f1784a0: 00000000 */ sll $zero,$zero,0x0 -); +char *mpMenuTextWeaponOfChoiceName(struct menu_item *item) +{ + return mpPlayerGetWeaponOfChoiceName(g_MenuStack[g_MpPlayerNum].playernum, false); +} GLOBAL_ASM( glabel func0f1784a4 diff --git a/src/include/game/game_016100.h b/src/include/game/game_016100.h index 6592429a5..d3b3d42db 100644 --- a/src/include/game/game_016100.h +++ b/src/include/game/game_016100.h @@ -3,7 +3,7 @@ #include #include "types.h" -u32 func0f016100(void); +char *mpPlayerGetWeaponOfChoiceName(u32 playernum, bool arg1); u32 func0f01616c(void); u32 func0f016404(void); u32 func0f01644c(void); diff --git a/src/include/game/game_177e00.h b/src/include/game/game_177e00.h index 764630165..db9e6fd84 100644 --- a/src/include/game/game_177e00.h +++ b/src/include/game/game_177e00.h @@ -9,7 +9,7 @@ char *menutextPauseOrUnpause(s32 arg0); char *menutextMatchTime(s32 arg0); char *mpMenuTextWeaponDescription(struct menu_item *item); u32 func0f1783a0(void); -u32 func0f178450(void); +char *mpMenuTextWeaponOfChoiceName(struct menu_item *item); u32 func0f1784a4(void); u32 func0f1784f0(void); u32 func0f17853c(void); diff --git a/src/include/types.h b/src/include/types.h index 8b14a6bae..64bf02c68 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -3897,7 +3897,9 @@ struct menustackitem { /*0x82c*/ u32 unk82c; /*0x830*/ u32 unk830; /*0x834*/ u32 unk834; - /*0x838*/ u32 unk838; + /*0x838*/ u16 unk838; + /*0x83a*/ u8 unk83a; + /*0x83b*/ u8 playernum; /*0x83c*/ u32 unk83c; /*0x840*/ u32 unk840; /*0x844*/ u32 unk844;