diff --git a/src/game/data/data_020df0.c b/src/game/data/data_020df0.c index da0b75b89..3c5f1d453 100644 --- a/src/game/data/data_020df0.c +++ b/src/game/data/data_020df0.c @@ -10423,7 +10423,7 @@ struct menu_dialog menudialog_mpsavesetupname = { // 2ad14 struct menu_item menuitems_mpsavesetup[] = { - { MENUITEMTYPE_LABEL, 0, L_AME(16), L_MPWEAPONS(230), (u32)&func0f179b58, NULL }, // "Name:" + { MENUITEMTYPE_LABEL, 0, L_AME(16), L_MPWEAPONS(230), (u32)&mpMenuTextSetupName, NULL }, // "Name:" { MENUITEMTYPE_LABEL, 0, 0x00000230, (u32)&func0f108078, 0x00000000, NULL }, { MENUITEMTYPE_LABEL, 0, 0x00000010, L_MPMENU(184), 0x00000000, NULL }, // "Do you want to save over your original game file?" { MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_MPMENU(185), 0x00000000, menuhandlerMpSaveSetupOverwrite }, // "Save Over Original" diff --git a/src/game/game_107fb0.c b/src/game/game_107fb0.c index 98d0aa9ee..7b682b933 100644 --- a/src/game/game_107fb0.c +++ b/src/game/game_107fb0.c @@ -2257,7 +2257,7 @@ void func0f109bb4(char *name) break; case 7: case 13: - strcpy(g_MpSetup.namebuffer, name); + strcpy(g_MpSetup.name, name); break; } } diff --git a/src/game/game_179060.c b/src/game/game_179060.c index faa2e2fe8..44b44f5f4 100644 --- a/src/game/game_179060.c +++ b/src/game/game_179060.c @@ -598,10 +598,10 @@ s32 menuhandlerMpPlayerName(u32 operation, struct menu_item *item, char **value) switch (operation) { case MENUOP_GETTEXT: - strcpy(ptr, g_MpSetup.namebuffer); + strcpy(ptr, g_MpSetup.name); break; case MENUOP_SETTEXT: - strcpy(g_MpSetup.namebuffer, ptr); + strcpy(g_MpSetup.name, ptr); break; case MENUOP_SET: func0f10a51c(7, 1); @@ -631,12 +631,13 @@ s32 menuhandlerMpSaveSetupCopy(u32 operation, struct menu_item *item, s32 *value return 0; } +char *mpMenuTextSetupName(struct menu_item *item) +{ + return g_MpSetup.name; +} + GLOBAL_ASM( -glabel func0f179b58 -/* f179b58: 3c02800b */ lui $v0,%hi(g_MpSetup) -/* f179b5c: afa40000 */ sw $a0,0x0($sp) -/* f179b60: 03e00008 */ jr $ra -/* f179b64: 2442cb88 */ addiu $v0,$v0,%lo(g_MpSetup) +glabel func0f179b68 /* f179b68: 27bdffe8 */ addiu $sp,$sp,-24 /* f179b6c: 24010006 */ addiu $at,$zero,0x6 /* f179b70: afbf0014 */ sw $ra,0x14($sp) diff --git a/src/include/game/game_179060.h b/src/include/game/game_179060.h index e6625262b..3e829f5fc 100644 --- a/src/include/game/game_179060.h +++ b/src/include/game/game_179060.h @@ -7,7 +7,7 @@ char *mpGetCurrentPlayerName(struct menu_item *item); u32 func0f179104(void); s32 menuhandler001791c8(u32, u32, u32 *); char *mpMenuTextWeaponNameForSlot(struct menu_item *item); -u32 func0f179b58(void); +char *mpMenuTextSetupName(struct menu_item *item); s32 func0f179da4(u32 operation, struct menu_item *item, s32 *value, s32 arg3, s32 arg4, s32 arg5); s32 menudialog0017a174(u32, u32, u32 *); s32 menuhandler0017a20c(u32, u32, u32 *); diff --git a/src/include/types.h b/src/include/types.h index 27c092457..471ece26f 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -4417,7 +4417,7 @@ struct missionconfig { }; struct mpsetup { - /*0x8009cb88*/ char namebuffer[12]; + /*0x8009cb88*/ char name[12]; /*0x8009cb94*/ u32 options; /*0x8009cb98*/ u8 scenario; /*0x8009cb99*/ u8 stagenum;