Decompile mpMenuTextSetupName

This commit is contained in:
Ryan Dwyer 2020-03-19 08:22:36 +10:00
parent b0853b961c
commit 800f4b045e
5 changed files with 12 additions and 11 deletions

View File

@ -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"

View File

@ -2257,7 +2257,7 @@ void func0f109bb4(char *name)
break;
case 7:
case 13:
strcpy(g_MpSetup.namebuffer, name);
strcpy(g_MpSetup.name, name);
break;
}
}

View File

@ -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)

View File

@ -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 *);

View File

@ -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;