Rename MENUITEMTYPE_CUSTOM to MENUITEMTYPE_LIST

This commit is contained in:
Ryan Dwyer 2020-09-25 21:08:37 +10:00
parent a500954add
commit 14fcaa08b4
11 changed files with 108 additions and 90 deletions

View File

@ -49,7 +49,7 @@ struct menudialog menudialog_gamefiles2 = {
// 1af18
struct menuitem menuitems_fileselect2[] = {
{ MENUITEMTYPE_LABEL, 0, 0x00004010, L_OPTIONS(96), 0x00000000, NULL }, // "Choose Your Reality"
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x000000f5, 0x00000000, menucustomChooseAgent },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x000000f5, 0x00000000, menucustomChooseAgent },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -149,7 +149,7 @@ struct menudialog menudialog_1b1bc = {
// 1b1d4
struct menuitem menuitems_mpcombatchallenges[] = {
{ MENUITEMTYPE_CUSTOM, 1, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017e4d4 },
{ MENUITEMTYPE_LIST, 1, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017e4d4 },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};

View File

@ -485,7 +485,7 @@ struct menudialog g_MpPauseControlMenuDialog = {
// 2a7ac
struct menuitem g_MpInventoryMenuItems[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000000, 0x00000078, 0x00000042, menuhandler00106178 },
{ MENUITEMTYPE_LIST, 0, 0x00000000, 0x00000078, 0x00000042, menuhandler00106178 },
{ MENUITEMTYPE_MARQUEE, 0, 0x00000a00, (u32)&mpMenuTextWeaponDescription, 0x00000000, NULL },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -936,7 +936,7 @@ struct menudialog menudialog_mpcontrol = {
// 2b19c
struct menuitem menuitems_mpcompletedchallenges[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017a20c },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017a20c },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -1041,7 +1041,7 @@ struct menudialog menudialog_mpplayername = {
// 2b518
struct menuitem menuitems_mploadgamesettingstype0[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000000, 0x00000078, 0x00000042, menuhandler0017bab4 },
{ MENUITEMTYPE_LIST, 0, 0x00000000, 0x00000078, 0x00000042, menuhandler0017bab4 },
{ MENUITEMTYPE_MARQUEE, 0, 0x00000a00, (u32)&func0f17be2c, 0x00000000, NULL },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -1058,7 +1058,7 @@ struct menudialog menudialog_mploadgamesettingstype0 = {
// 2b56c
struct menuitem menuitems_mploadgamesettingstype1[] = {
{ MENUITEMTYPE_CUSTOM, 1, 0x00000000, 0x00000078, 0x00000042, menuhandler0017bab4 },
{ MENUITEMTYPE_LIST, 1, 0x00000000, 0x00000078, 0x00000042, menuhandler0017bab4 },
{ MENUITEMTYPE_MARQUEE, 0, 0x00000a00, (u32)&func0f17be2c, 0x00000000, NULL },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -1075,7 +1075,7 @@ struct menudialog menudialog_mploadgamesettingstype1 = {
// 2b5c0
struct menuitem menuitems_mploadplayer[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000000, 0x0000007e, 0x00000042, menuhandler0017bfc0 },
{ MENUITEMTYPE_LIST, 0, 0x00000000, 0x0000007e, 0x00000042, menuhandler0017bfc0 },
{ MENUITEMTYPE_LABEL, 0, 0x00000200, L_MPMENU(138), 0x00000000, NULL }, // "B Button to cancel"
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -1092,7 +1092,7 @@ struct menudialog menudialog_mploadplayer = {
// 2b614
struct menuitem menuitems_mparena[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00020000, 0x00000078, 0x0000004d, menuhandler001791c8 },
{ MENUITEMTYPE_LIST, 0, 0x00020000, 0x00000078, 0x0000004d, menuhandler001791c8 },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -1172,7 +1172,7 @@ u32 var800857dc = 0x50680000; // "Special Simulants"
// 2b800
struct menuitem menuitems_mpaddchangesimulant[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00020000, 0x00000078, 0x00000042, menuhandler0017c6a4 },
{ MENUITEMTYPE_LIST, 0, 0x00020000, 0x00000078, 0x00000042, menuhandler0017c6a4 },
{ MENUITEMTYPE_MARQUEE, 0, 0x00000a00, (u32)&mpMenuTextSimulantDescription, 0x00000000, NULL },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -1332,7 +1332,7 @@ u32 var80085cf4 = L_MISC(169); // "Randomize"
// 2bd18
struct menuitem menuitems_2bd18[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00020000, 0x00000078, 0x0000004d, menuhandler0017dc84 },
{ MENUITEMTYPE_LIST, 0, 0x00020000, 0x00000078, 0x0000004d, menuhandler0017dc84 },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -1430,7 +1430,7 @@ struct menudialog menudialog_2bfa8 = {
// 2bfc0
struct menuitem menuitems_mpchallengedetails[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017e4d4 },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017e4d4 },
{ MENUITEMTYPE_SCROLLABLE, DESCRIPTION_MPCHALLENGE, 0x00000000, 0x0000007c, 0x00000037, menuhandler0017e9d8 },
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x00000000, 0x00000000, menuhandler0017e9d8 },
{ MENUITEMTYPE_SELECTABLE, 0, 0x00000000, L_MPWEAPONS(171), 0x00000000, menuhandlerMpStartChallenge }, // "Start Challenge"
@ -1481,7 +1481,7 @@ struct menudialog menudialog_2c0cc = {
// 2c0e4
struct menuitem menuitems_mpcombatchallenges2[] = {
{ MENUITEMTYPE_CUSTOM, 1, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017e4d4 },
{ MENUITEMTYPE_LIST, 1, 0x00200000, 0x00000078, 0x0000004d, menuhandler0017e4d4 },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -2014,7 +2014,7 @@ u32 var80087178 = 0x50f50000; // "-Teamwork-"
// 2d19c
struct menuitem menuitems_mpscenario[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00020040, 0x00000078, 0x0000004d, menuhandler00185068 },
{ MENUITEMTYPE_LIST, 0, 0x00020040, 0x00000078, 0x0000004d, menuhandler00185068 },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -2030,7 +2030,7 @@ struct menudialog menudialog_mpscenario = {
// 2d1dc
struct menuitem menuitems_mpscenario2[] = {
{ MENUITEMTYPE_CUSTOM, 1, 0x00020040, 0x00000078, 0x0000004d, menuhandler00185068 },
{ MENUITEMTYPE_LIST, 1, 0x00020040, 0x00000078, 0x0000004d, menuhandler00185068 },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};

View File

@ -86,7 +86,7 @@ struct menudialog menudialog_2f950 = {
// 2f968
struct menuitem menuitems_hangarinformation[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000008, 0x000000a0, 0x00000000, ciHangarInformationMenuHandler },
{ MENUITEMTYPE_LIST, 0, 0x00000008, 0x000000a0, 0x00000000, ciHangarInformationMenuHandler },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};

View File

@ -499,7 +499,7 @@ glabel func0f0e6298
);
GLOBAL_ASM(
glabel menuRenderItemCustom
glabel menuRenderItemList
/* f0e6328: 27bdfe90 */ addiu $sp,$sp,-368
/* f0e632c: afbf005c */ sw $ra,0x5c($sp)
/* f0e6330: afbe0058 */ sw $s8,0x58($sp)
@ -1773,7 +1773,7 @@ glabel menuRenderItemCustom
);
GLOBAL_ASM(
glabel menuTickItemCustom
glabel menuTickItemList
.late_rodata
glabel var7f1b1e58
.word 0x3eb33333
@ -2565,7 +2565,7 @@ bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct
if ((arg3 & 2) && item->handler) {
if (frame->unk0c && item == frame->focuseditem) {
menuTickItemCustom(item, arg2, arg3, data);
menuTickItemList(item, arg2, arg3, data);
if (mpIsPlayerLockedOut(g_MpPlayerNum)) {
if ((item->param1 & 0x00040000) || (frame->dialog->unk10 & 0x10)) {
@ -2779,7 +2779,7 @@ glabel func0f0e8290
/* f0e8518: a7a8006e */ sh $t0,0x6e($sp)
.L0f0e851c:
/* f0e851c: 8fa400a0 */ lw $a0,0xa0($sp)
/* f0e8520: 0fc398ca */ jal menuRenderItemCustom
/* f0e8520: 0fc398ca */ jal menuRenderItemList
/* f0e8524: 27a5006c */ addiu $a1,$sp,0x6c
/* f0e8528: afa200a0 */ sw $v0,0xa0($sp)
/* f0e852c: 8fbf003c */ lw $ra,0x3c($sp)
@ -12431,7 +12431,7 @@ void menuInitItemController(union menuitemtickdata *data)
Gfx *menuRenderItem(Gfx *gdl, struct menurenderthing *thing)
{
switch (thing->item->type) {
case MENUITEMTYPE_CUSTOM: return menuRenderItemCustom(gdl);
case MENUITEMTYPE_LIST: return menuRenderItemList(gdl);
case MENUITEMTYPE_SELECTABLE: return menuRenderItemSelectable(gdl, thing);
case MENUITEMTYPE_SLIDER: return menuRenderItemSlider(gdl);
case MENUITEMTYPE_CHECKBOX: return menuRenderItemCheckbox(gdl, thing);
@ -12460,7 +12460,7 @@ Gfx *menuRenderItem(Gfx *gdl, struct menurenderthing *thing)
bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data)
{
switch (item->type) {
case MENUITEMTYPE_CUSTOM: return menuTickItemCustom(item, arg2, arg3, data);
case MENUITEMTYPE_LIST: return menuTickItemList(item, arg2, arg3, data);
case MENUITEMTYPE_SELECTABLE: return menuTickItemSelectable(item, arg2, arg3);
case MENUITEMTYPE_SLIDER: return menuTickItemSlider(item, frame, arg2, arg3, data);
case MENUITEMTYPE_CHECKBOX: return menuTickItemCheckbox(item, arg2, arg3);
@ -12479,7 +12479,7 @@ bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct somemen
void menuInitItem(struct menuitem *item, union menuitemtickdata *data)
{
switch (item->type) {
case MENUITEMTYPE_CUSTOM:
case MENUITEMTYPE_LIST:
case MENUITEMTYPE_DROPDOWN:
menuInitItemDropdown(item, data);
break;
@ -12510,7 +12510,7 @@ void menuInitItem(struct menuitem *item, union menuitemtickdata *data)
Gfx *func0f0f0918(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, u32 arg6, u32 arg7)
{
switch (item->type) {
case MENUITEMTYPE_CUSTOM: return func0f0e6298(gdl, x, y, x2, y2);
case MENUITEMTYPE_LIST: return func0f0e6298(gdl, x, y, x2, y2);
case MENUITEMTYPE_DROPDOWN: return func0f0e8290(gdl, x, y, x2, y2, item, arg6, arg7);
case MENUITEMTYPE_PLAYERSTATS: return func0f0ef2fc(gdl, x, y, x2, y2, item, arg6, arg7);
}

View File

@ -508,7 +508,7 @@ s32 menudialogMpPickTarget(u32 operation, struct menudialog *dialog, union handl
// 17980
struct menuitem menuitems_picktarget[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x0000005a, 0x00000000, menuhandler000fd6f0 },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x0000005a, 0x00000000, menuhandler000fd6f0 },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};

View File

@ -87,29 +87,29 @@ s32 menuhandlerControlStyleImpl(u32 operation, struct menuitem *item, union hand
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
data->custom.value = 8;
data->list.value = 8;
break;
case MENUOP_GETOPTGROUPCOUNT:
data->custom.value = 2;
data->list.value = 2;
break;
case MENUOP_GETOPTIONTEXT:
return (s32) langGet(g_ControlStyleOptions[data->custom.value]);
return (s32) langGet(g_ControlStyleOptions[data->list.value]);
case MENUOP_GETOPTGROUPTEXT:
return (s32) langGet(categories[data->custom.value]);
return (s32) langGet(categories[data->list.value]);
case MENUOP_GETGROUPSTARTINDEX:
data->custom.groupstartindex = data->custom.value == 0 ? 0 : 4;
data->list.groupstartindex = data->list.value == 0 ? 0 : 4;
break;
case MENUOP_SET:
optionsSetControlMode(mpindex, data->custom.value);
optionsSetControlMode(mpindex, data->list.value);
g_Vars.unk000458 |= 1;
break;
case MENUOP_GETOPTIONVALUE:
data->custom.value = optionsGetControlMode(mpindex);
data->list.value = optionsGetControlMode(mpindex);
g_Menus[g_MpPlayerNum].data.main.mpindex = mpindex;
break;
case MENUOP_16:
if (g_MenuData.root == MENUROOT_MAINMENU) {
g_Menus[g_MpPlayerNum].data.main.controlmode = data->custom.value;
g_Menus[g_MpPlayerNum].data.main.controlmode = data->list.value;
}
break;
}
@ -2769,7 +2769,7 @@ s32 menuhandlerChangeAgent(u32 operation, struct menuitem *item, union handlerda
}
struct menuitem menuitems_control[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00800000, 0x00000050, 0x00000000, menuhandler001024dc },
{ MENUITEMTYPE_LIST, 0, 0x00800000, 0x00000050, 0x00000000, menuhandler001024dc },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -2783,7 +2783,7 @@ struct menudialog g_ControlStyleMultiMenuDialog = {
};
struct menuitem menuitems_control2[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00800000, 0x00000028, 0x00000096, menuhandler001024dc },
{ MENUITEMTYPE_LIST, 0, 0x00800000, 0x00000028, 0x00000096, menuhandler001024dc },
{ MENUITEMTYPE_CONTROLLER, 0, 0x00000001, 0x00000000, 0x00000000, NULL },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -2798,7 +2798,7 @@ struct menudialog g_ControlStyleSingleMenuDialog = {
};
struct menuitem menuitems_control3[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00800000, 0x00000028, 0x00000096, menuhandler001024dc },
{ MENUITEMTYPE_LIST, 0, 0x00800000, 0x00000028, 0x00000096, menuhandler001024dc },
{ MENUITEMTYPE_CONTROLLER, 0, 0x00000001, 0x00000000, 0x00000000, NULL },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -2813,7 +2813,7 @@ struct menudialog menudialog_control3 = {
};
struct menuitem menuitems_control4[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00800000, 0x00000028, 0x00000096, menuhandler001024fc },
{ MENUITEMTYPE_LIST, 0, 0x00800000, 0x00000028, 0x00000096, menuhandler001024fc },
{ MENUITEMTYPE_CONTROLLER, 0, 0x00000001, 0x00000000, 0x00000000, NULL },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -3792,7 +3792,7 @@ glabel var7f1b2e84
);
struct menuitem menuitems_inventory[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000000, 0x0000006e, 0x00000063, menuhandler00106178 },
{ MENUITEMTYPE_LIST, 0, 0x00000000, 0x0000006e, 0x00000063, menuhandler00106178 },
{ MENUITEMTYPE_LABEL, 0, 0x00000203, L_OPTIONS(3), (u32)&invMenuTextWeaponManufacturer, NULL }, // ""
{ MENUITEMTYPE_LABEL, 0, 0x00000302, L_OPTIONS(3), (u32)&invMenuTextWeaponName, NULL }, // ""
{ MENUITEMTYPE_MODEL, 0, 0x00000000, 0x0000008c, 0x00000037, NULL },
@ -3803,7 +3803,7 @@ struct menuitem menuitems_inventory[] = {
};
struct menuitem menuitems_weaponsavailable[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000000, 0x0000006e, 0x00000063, menuhandler00106028 },
{ MENUITEMTYPE_LIST, 0, 0x00000000, 0x0000006e, 0x00000063, menuhandler00106028 },
{ MENUITEMTYPE_LABEL, 0, 0x0213, L_OPTIONS(3), (u32)&invMenuTextWeaponManufacturer, NULL }, // ""
{ MENUITEMTYPE_LABEL, 0, 0x0312, L_OPTIONS(3), (u32)&invMenuTextWeaponName, NULL }, // ""
{ MENUITEMTYPE_MODEL, 0, 0x00000000, 0x0000008c, 0x00000037, NULL },
@ -4101,38 +4101,38 @@ s32 menuhandlerCinema(u32 operation, struct menuitem *item, union handlerdata *d
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
data->custom.value = g_CutsceneIndexes[getNumCompletedMissions()] + 1;
data->list.value = g_CutsceneIndexes[getNumCompletedMissions()] + 1;
break;
case MENUOP_GETOPTIONTEXT:
if (data->custom.value == 0) {
if (data->list.value == 0) {
sprintf(g_StringPointer, langGet(L_OPTIONS(448))); // "Play All"
return (s32) g_StringPointer;
}
return (s32) langGet(g_Cutscenes[data->custom.value - 1].name);
return (s32) langGet(g_Cutscenes[data->list.value - 1].name);
case MENUOP_SET:
if (data->custom.value == 0) {
if (data->list.value == 0) {
s32 index = getNumCompletedMissions();
g_Vars.unk0004d4 = 0;
g_Vars.unk0004d5 = g_CutsceneIndexes[index];
menuPopDialog();
func0f01bea0();
} else {
g_Vars.unk0004d4 = data->custom.value - 1;
g_Vars.unk0004d4 = data->list.value - 1;
g_Vars.unk0004d5 = 1;
menuPopDialog();
func0f01bea0();
}
break;
case MENUOP_GETOPTIONVALUE:
data->custom.value = 0xfffff;
data->list.value = 0xfffff;
break;
case MENUOP_GETOPTGROUPCOUNT:
data->custom.value = ARRAYCOUNT(groups);
data->list.value = ARRAYCOUNT(groups);
break;
case MENUOP_GETOPTGROUPTEXT:
return (s32) langGet(groups[data->custom.value].name);
return (s32) langGet(groups[data->list.value].name);
case MENUOP_GETGROUPSTARTINDEX:
data->custom.groupstartindex = groups[data->custom.value].first_cutscene_index;
data->list.groupstartindex = groups[data->list.value].first_cutscene_index;
break;
}
@ -4140,7 +4140,7 @@ s32 menuhandlerCinema(u32 operation, struct menuitem *item, union handlerdata *d
}
struct menuitem g_CinemaMenuItems[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000000, 0x000000eb, 0x00000000, menuhandlerCinema },
{ MENUITEMTYPE_LIST, 0, 0x00000000, 0x000000eb, 0x00000000, menuhandlerCinema },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -4158,7 +4158,7 @@ struct menudialog g_CinemaMenuDialog = {
//----------------------------------------------------------------------------/
struct menuitem g_SelectMissionMenuItems[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x000000eb, 0x00000000, menuhandler0010476c },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x000000eb, 0x00000000, menuhandler0010476c },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};

View File

@ -5266,7 +5266,7 @@ struct menudialog menudialog_1a984 = {
// 1a99c
struct menuitem menuitems_deletefile[] = {
{ MENUITEMTYPE_LABEL, 0, 0x00004010, L_OPTIONS(377), 0x00000000, NULL }, // "Select a file to delete:"
{ MENUITEMTYPE_CUSTOM, 1, 0x00200000, 0x00000000, 0x00000000, menucustomFileToDelete },
{ MENUITEMTYPE_LIST, 1, 0x00200000, 0x00000000, 0x00000000, menucustomFileToDelete },
{ MENUITEMTYPE_LABEL, 0, 0x00004030, L_OPTIONS(378), 0x00000000, NULL }, // "Press B Button to exit."
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -5284,7 +5284,7 @@ struct menudialog menudialog_deletefile = {
// 1aa04
struct menuitem menuitems_copyfile[] = {
{ MENUITEMTYPE_LABEL, 0, 0x00004010, L_OPTIONS(374), 0x00000000, NULL }, // "Select a file to copy:"
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x00000000, 0x00000000, menucustomFileToCopy },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x00000000, 0x00000000, menucustomFileToCopy },
{ MENUITEMTYPE_LABEL, 0, 0x00004030, L_OPTIONS(375), 0x00000000, NULL }, // "Press B Button to exit."
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -5324,7 +5324,7 @@ struct menuitem menuitems_gamenotes[] = {
{ MENUITEMTYPE_LABEL, 0, 0x00000010, L_OPTIONS(388), (u32)&func0f10b924, NULL }, // "Delete Game Notes:"
{ MENUITEMTYPE_SEPARATOR, 0, 0x00000000, 0x0000010e, 0x00000000, NULL },
{ MENUITEMTYPE_LABEL, 0, 0x00000010, L_OPTIONS(389), L_OPTIONS(390), NULL }, // "Note", "Pages"
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x000000c8, 0x0000006e, menucustomDeleteGameNote },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x000000c8, 0x0000006e, menucustomDeleteGameNote },
{ MENUITEMTYPE_LABEL, 0, 0x00000010, (u32)&func0f10b75c, (u32)&func0f10b7cc, NULL },
{ MENUITEMTYPE_LABEL, 0, 0x00000010, (u32)&func0f10b83c, 0x00000000, NULL },
{ MENUITEMTYPE_LABEL, 0, 0x00000030, L_OPTIONS(391), 0x00000000, NULL }, // "Press the B Button to exit."
@ -5410,7 +5410,7 @@ struct menudialog menudialog_enteragentname = {
// 1adb8
struct menuitem menuitems_fileselect[] = {
{ MENUITEMTYPE_LABEL, 0, 0x00004010, L_OPTIONS(96), 0x00000000, NULL }, // "Choose Your Reality"
{ MENUITEMTYPE_CUSTOM, 0, 0x00200000, 0x000000f5, 0x00000000, menucustomChooseAgent },
{ MENUITEMTYPE_LIST, 0, 0x00200000, 0x000000f5, 0x00000000, menucustomChooseAgent },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};

View File

@ -2471,7 +2471,7 @@ struct menudialog menudialog_frdifficulty = {
};
struct menuitem menuitems_frweapon[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00200008, 0x000000aa, 0x00000000, menuhandler001a348c },
{ MENUITEMTYPE_LIST, 0, 0x00200008, 0x000000aa, 0x00000000, menuhandler001a348c },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -2596,19 +2596,19 @@ s32 ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, union h
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
data->custom.value = numunlockedchrbios + numunlockedmiscbios;
data->list.value = numunlockedchrbios + numunlockedmiscbios;
break;
case MENUOP_GETOPTIONTEXT:
if (data->custom.value < numunlockedchrbios) {
chrbio = ciGetChrBioByBodynum(ciGetChrBioBodynumBySlot(data->custom.value));
if (data->list.value < numunlockedchrbios) {
chrbio = ciGetChrBioByBodynum(ciGetChrBioBodynumBySlot(data->list.value));
return (s32) langGet(chrbio->name);
} else {
miscbio = ciGetMiscBio(ciGetMiscBioIndexBySlot(data->custom.value - numunlockedchrbios));
miscbio = ciGetMiscBio(ciGetMiscBioIndexBySlot(data->list.value - numunlockedchrbios));
return (s32) langGet(miscbio->name);
}
break;
case MENUOP_SET:
g_ChrBioSlot = data->custom.value;
g_ChrBioSlot = data->list.value;
if (g_ChrBioSlot < numunlockedchrbios) {
menuPushDialog(&menudialog_characterprofile);
} else {
@ -2616,15 +2616,15 @@ s32 ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, union h
}
break;
case MENUOP_GETOPTIONVALUE:
data->custom.value = g_ChrBioSlot;
data->list.value = g_ChrBioSlot;
break;
case MENUOP_GETOPTGROUPCOUNT:
data->custom.value = 2;
data->list.value = 2;
break;
case MENUOP_GETOPTGROUPTEXT:
return (s32) langGet(groups[data->custom.value].name);
return (s32) langGet(groups[data->list.value].name);
case MENUOP_GETGROUPSTARTINDEX:
data->custom.groupstartindex = data->custom.value == 0 ? 0 : numunlockedchrbios;
data->list.groupstartindex = data->list.value == 0 ? 0 : numunlockedchrbios;
break;
}
@ -2632,7 +2632,7 @@ s32 ciOfficeInformationMenuHandler(u32 operation, struct menuitem *item, union h
}
struct menuitem menuitems_information[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000008, 0x000000c8, 0x00000000, ciOfficeInformationMenuHandler },
{ MENUITEMTYPE_LIST, 0, 0x00000008, 0x000000c8, 0x00000000, ciOfficeInformationMenuHandler },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -2813,24 +2813,24 @@ s32 dtDeviceListMenuHandler(u32 operation, struct menuitem *item, union handlerd
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
data->custom.value = dtGetNumAvailable();
data->list.value = dtGetNumAvailable();
break;
case MENUOP_GETOPTIONTEXT:
return (s32) weaponGetName(dtGetWeaponByDeviceIndex(dtGetIndexBySlot(data->custom.value)));
return (s32) weaponGetName(dtGetWeaponByDeviceIndex(dtGetIndexBySlot(data->list.value)));
case MENUOP_SET:
g_DtSlot = data->custom.value;
g_DtSlot = data->list.value;
menuPushDialog(&g_DeviceTrainingDetailsMenuDialog);
break;
case MENUOP_GETOPTIONVALUE:
data->custom.value = g_DtSlot;
data->list.value = g_DtSlot;
break;
case MENUOP_GETOPTGROUPCOUNT:
data->custom.value = 0;
data->list.value = 0;
break;
case MENUOP_GETOPTGROUPTEXT:
return 0;
case MENUOP_GETGROUPSTARTINDEX:
data->custom.groupstartindex = 0;
data->list.groupstartindex = 0;
break;
}
@ -2903,7 +2903,7 @@ struct menudialog menudialog_2f3c0 = {
};
struct menuitem menuitems_devicelist[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000008, 0x000000a0, 0x00000000, dtDeviceListMenuHandler },
{ MENUITEMTYPE_LIST, 0, 0x00000008, 0x000000a0, 0x00000000, dtDeviceListMenuHandler },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -3018,24 +3018,24 @@ s32 htHoloListMenuHandler(u32 operation, struct menuitem *item, union handlerdat
{
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
data->custom.value = htGetNumUnlocked();
data->list.value = htGetNumUnlocked();
break;
case MENUOP_GETOPTIONTEXT:
return (s32) htGetName(htGetIndexBySlot(data->custom.value));
return (s32) htGetName(htGetIndexBySlot(data->list.value));
case MENUOP_SET:
var80088bb4 = data->custom.value;
var80088bb4 = data->list.value;
menuPushDialog(&g_HoloTrainingDetailsMenuDialog);
break;
case MENUOP_GETOPTIONVALUE:
data->custom.value = var80088bb4;
data->list.value = var80088bb4;
break;
case MENUOP_GETOPTGROUPCOUNT:
data->custom.value = 0;
data->list.value = 0;
break;
case MENUOP_GETOPTGROUPTEXT:
return 0;
case MENUOP_GETGROUPSTARTINDEX:
data->custom.groupstartindex = 0;
data->list.groupstartindex = 0;
break;
}
@ -3213,7 +3213,7 @@ struct menudialog g_DeviceTrainingStatsCompletedMenuDialog = {
};
struct menuitem menuitems_holotraining[] = {
{ MENUITEMTYPE_CUSTOM, 0, 0x00000008, 0x000000a0, 0x00000000, htHoloListMenuHandler },
{ MENUITEMTYPE_LIST, 0, 0x00000008, 0x000000a0, 0x00000000, htHoloListMenuHandler },
{ MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL },
};
@ -3294,13 +3294,13 @@ s32 ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, union h
switch (operation) {
case MENUOP_GETOPTIONCOUNT:
data->custom.value = ciGetNumUnlockedHangarBios();
data->list.value = ciGetNumUnlockedHangarBios();
break;
case MENUOP_GETOPTIONTEXT:
bio = ciGetHangarBio(ciGetHangarBioIndexBySlot(data->custom.value));
bio = ciGetHangarBio(ciGetHangarBioIndexBySlot(data->list.value));
return (s32) langGet(bio->name);
case MENUOP_SET:
g_HangarBioSlot = data->custom.value;
g_HangarBioSlot = data->list.value;
bioindex = ciGetHangarBioIndexBySlot(g_HangarBioSlot);
if (bioindex <= HANGARBIO_SKEDARRUINS) {
@ -3310,15 +3310,15 @@ s32 ciHangarInformationMenuHandler(u32 operation, struct menuitem *item, union h
}
break;
case MENUOP_GETOPTIONVALUE:
data->custom.value = g_HangarBioSlot;
data->list.value = g_HangarBioSlot;
break;
case MENUOP_GETOPTGROUPCOUNT:
data->custom.value = 2;
data->list.value = 2;
break;
case MENUOP_GETOPTGROUPTEXT:
return (s32) langGet(groups[data->custom.value].name);
return (s32) langGet(groups[data->list.value].name);
case MENUOP_GETGROUPSTARTINDEX:
data->custom.groupstartindex = data->custom.value == 0 ? 0 : groups[1].offset;
data->list.groupstartindex = data->list.value == 0 ? 0 : groups[1].offset;
break;
}

View File

@ -1056,7 +1056,7 @@
#define MENUDIALOGTYPE_SUCCESS 3
#define MENUITEMTYPE_LABEL 0x01
#define MENUITEMTYPE_CUSTOM 0x02
#define MENUITEMTYPE_LIST 0x02
#define MENUITEMTYPE_SELECTABLE 0x04
#define MENUITEMTYPE_SCROLLABLE 0x05
#define MENUITEMTYPE_OBJECTIVES 0x06

View File

@ -7,46 +7,63 @@ u32 func0f0e5d2c(void);
s32 func0f0e5ef8(s16 arg0, struct menuitem *item);
u32 func0f0e6038(void);
Gfx *func0f0e6298(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2);
Gfx *menuRenderItemCustom(Gfx *gdl);
bool menuTickItemCustom(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2, union menuitemtickdata *data);
Gfx *menuRenderItemList(Gfx *gdl);
bool menuTickItemList(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2, union menuitemtickdata *data);
void menuInitItemDropdown(struct menuitem *item, union menuitemtickdata *data);
Gfx *menuRenderItemDropdown(Gfx *gdl);
bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
Gfx *func0f0e8290(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, u32 arg6, u32 arg7);
u32 func0f0e855c(void);
Gfx *menuRenderItemKeyboard(Gfx *gdl);
bool menuTickItemKeyboard(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2, union menuitemtickdata *data);
void menuInitItemKeyboard(struct menuitem *item, union menuitemtickdata *data);
Gfx *menuRenderItemSeparator(Gfx *gdl, struct menurenderthing *thing);
Gfx *menuRenderObjective(Gfx *gfx, struct menurenderthing10 *thing10, s32 index, s32 position, s32 x, s32 y, s32 width, s32 height, s32 arg8, s32 arg9);
Gfx *menuRenderItemObjectives(Gfx *gdl, struct menurenderthing *thing);
Gfx *menuRenderItemModel(Gfx *gdl, struct menurenderthing *thing);
Gfx *menuRenderItemLabel(Gfx *gdl, struct menurenderthing *thing);
Gfx *menuRenderItemMeter(Gfx *gdl, struct menurenderthing *thing);
Gfx *menuRenderItemSelectable(Gfx *gdl, struct menurenderthing *thing);
bool menuTickItemSelectable(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2);
Gfx *menuRenderItemSlider(Gfx *gdl);
bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
void menuInitItemSlider(union menuitemtickdata *data);
Gfx *menuRenderItemCarousel(Gfx *gdl, struct menurenderthing *thing);
bool menuTickItemCarousel(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2);
Gfx *menuRenderItemCheckbox(Gfx *gdl, struct menurenderthing *thing);
bool menuTickItemCheckbox(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2);
char *menuItemScrollableGetText(u32 type);
Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurenderthing *thing);
bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
void menuInitItemScrollable(union menuitemtickdata *data);
Gfx *menuRenderItemMarquee(Gfx *gdl, struct menurenderthing *thing);
bool menuTickItemMarquee(struct menuitem *item, union menuitemtickdata *data);
void menuInitItemMarquee(union menuitemtickdata *data);
Gfx *menuRenderItem07(Gfx *gdl);
Gfx *menuRenderItemRanking(Gfx *gdl);
bool menuTickItemRanking(struct somemenuitemtickarg *arg0, u32 arg1, union menuitemtickdata *data);
void menuInitItemRanking(union menuitemtickdata *data);
Gfx *menuRenderItemPlayerStats(Gfx *gdl);
bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
Gfx *func0f0ef2fc(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, u32 arg6, u32 arg7);
void menuInitItemPlayerStats(struct menuitem *item, union menuitemtickdata *data);
u32 func0f0ef394(void);
Gfx *menuRenderControllerTexture(Gfx *gdl, s32 x, s32 y, s32 texturenum, u32 alpha);
Gfx *menuRenderControllerLines(Gfx *gdl, struct menurenderthing *thing, s32 arg2, s32 arg3, s32 x, s32 y, u32 alpha);
@ -55,6 +72,7 @@ Gfx *menuRenderControllerText(Gfx *gdl, s32 curmode, struct menurenderthing *thi
Gfx *menuRenderControllerInfo(Gfx *gdl, struct menurenderthing *thing, s32 x, s32 y, s32 curmode, u32 alpha, u32 colour1, u32 colour2, s8 prevmode);
Gfx *menuRenderItemController(Gfx *gdl, struct menurenderthing *thing);
void menuInitItemController(union menuitemtickdata *data);
Gfx *menuRenderItem(Gfx *gdl, struct menurenderthing *thing);
bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
void menuInitItem(struct menuitem *item, union menuitemtickdata *data);

View File

@ -3318,7 +3318,7 @@ struct handlerdata_checkbox {
u32 value;
};
struct handlerdata_custom {
struct handlerdata_list {
u32 value;
u32 unk04;
u32 groupstartindex;
@ -3369,7 +3369,7 @@ struct handlerdata_dialog2 {
union handlerdata {
struct handlerdata_carousel carousel;
struct handlerdata_checkbox checkbox;
struct handlerdata_custom custom;
struct handlerdata_list list;
struct handlerdata_dropdown dropdown;
struct handlerdata_keyboard keyboard;
struct handlerdata_label label;