From badc82ab121af0415a381f8c68040e82be95dc45 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 23 Jan 2022 10:59:02 +1000 Subject: [PATCH] Rename menudialog to menudialogdef, menuframe to menudialog --- src/game/activemenu/activemenu.c | 6 +- src/game/activemenu/tick.c | 2 +- src/game/cheats.c | 36 +- src/game/endscreen.c | 70 +- src/game/filemgr.c | 92 +-- src/game/game_01bea0.c | 28 +- src/game/game_0f09f0.c | 323 ++++---- src/game/game_10c9c0.c | 34 +- src/game/mainmenu.c | 157 ++-- src/game/menu/items.c | 746 +++++++++--------- src/game/mplayer/ingame.c | 46 +- src/game/mplayer/mplayer.c | 6 +- src/game/mplayer/scenarios.c | 12 +- src/game/mplayer/scenarios/capturethecase.inc | 2 +- src/game/mplayer/scenarios/combat.inc | 2 +- src/game/mplayer/scenarios/hackthatmac.inc | 2 +- .../mplayer/scenarios/holdthebriefcase.inc | 2 +- src/game/mplayer/scenarios/kingofthehill.inc | 2 +- src/game/mplayer/scenarios/popacap.inc | 2 +- src/game/mplayer/setup.c | 188 ++--- src/game/options.c | 10 +- src/game/training/menus.c | 78 +- src/include/data.h | 140 ++-- src/include/game/activemenu/activemenu.h | 4 +- src/include/game/cheats.h | 4 +- src/include/game/endscreen.h | 12 +- src/include/game/filemgr.h | 10 +- src/include/game/game_0f09f0.h | 38 +- src/include/game/game_10c9c0.h | 2 +- src/include/game/mainmenu.h | 16 +- src/include/game/menu/items.h | 112 +-- src/include/game/mplayer/ingame.h | 2 +- src/include/game/mplayer/scenarios.h | 4 +- src/include/game/mplayer/setup.h | 30 +- src/include/game/training/menus.h | 18 +- src/include/types.h | 22 +- 36 files changed, 1118 insertions(+), 1142 deletions(-) diff --git a/src/game/activemenu/activemenu.c b/src/game/activemenu/activemenu.c index 52b2e1353..adcb9a45f 100644 --- a/src/game/activemenu/activemenu.c +++ b/src/game/activemenu/activemenu.c @@ -30,7 +30,7 @@ struct fontchar *g_AmFont1; struct font *g_AmFont2; s32 g_AmIndex; -struct menudialog g_AmPickTargetMenuDialog; +struct menudialogdef g_AmPickTargetMenuDialog; /** * This is a map of weapon numbers (as per the weapon set) to active menu slots. @@ -199,7 +199,7 @@ s32 amPickTargetMenuList(s32 operation, struct menuitem *item, union handlerdata return 0; } -s32 amPickTargetMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 amPickTargetMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -221,7 +221,7 @@ struct menuitem g_AmPickTargetMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_AmPickTargetMenuDialog = { +struct menudialogdef g_AmPickTargetMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_492, // "Pick Target" g_AmPickTargetMenuItems, diff --git a/src/game/activemenu/tick.c b/src/game/activemenu/tick.c index 3b7ad2790..9373cfa04 100644 --- a/src/game/activemenu/tick.c +++ b/src/game/activemenu/tick.c @@ -240,7 +240,7 @@ void amTick(void) } if (!stayopen && - (g_Vars.currentplayer->activemenumode != AMMODE_EDIT || g_Menus[g_MpPlayerNum].curframe == NULL)) { + (g_Vars.currentplayer->activemenumode != AMMODE_EDIT || g_Menus[g_MpPlayerNum].curdialog == NULL)) { amClose(); break; } diff --git a/src/game/cheats.c b/src/game/cheats.c index 26a199de2..c113b41b2 100644 --- a/src/game/cheats.c +++ b/src/game/cheats.c @@ -19,7 +19,7 @@ u32 g_CheatsEnabledBank0; u32 g_CheatsEnabledBank1; struct menuitem g_CheatsBuddiesMenuItems[]; -struct menudialog g_CheatsBuddiesMenuDialog; +struct menudialogdef g_CheatsBuddiesMenuDialog; #define TIME(mins, secs) (mins * 60 + secs) #define m @@ -387,7 +387,7 @@ char *cheatGetNameIfUnlocked(struct menuitem *item) return langGet(L_MPWEAPONS_074); // "----------" } -s32 cheatMenuHandleDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { func0f14a52c(); @@ -742,13 +742,13 @@ char *cheatGetMarquee(struct menuitem *arg0) char difficultyname[256]; char cheatname[256]; - if (g_Menus[g_MpPlayerNum].curframe - && g_Menus[g_MpPlayerNum].curframe->focuseditem - && g_Menus[g_MpPlayerNum].curframe->focuseditem->type == MENUITEMTYPE_CHECKBOX) { - cheat_id = g_Menus[g_MpPlayerNum].curframe->focuseditem->param; + if (g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->focuseditem + && g_Menus[g_MpPlayerNum].curdialog->focuseditem->type == MENUITEMTYPE_CHECKBOX) { + cheat_id = g_Menus[g_MpPlayerNum].curdialog->focuseditem->param; - if (g_Menus[g_MpPlayerNum].curframe->dialog == &g_CheatsBuddiesMenuDialog - && g_Menus[g_MpPlayerNum].curframe->focuseditem == &g_CheatsBuddiesMenuItems[0]) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == &g_CheatsBuddiesMenuDialog + && g_Menus[g_MpPlayerNum].curdialog->focuseditem == &g_CheatsBuddiesMenuItems[0]) { // Velvet #if VERSION >= VERSION_NTSC_1_0 sprintf(g_CheatMarqueeString, "%s: %s", langGet(L_MPWEAPONS_143), langGet(L_MPWEAPONS_117)); // "Buddy Available", "Velvet Dark" @@ -763,13 +763,13 @@ char *cheatGetMarquee(struct menuitem *arg0) // Show cheat name #if VERSION >= VERSION_NTSC_1_0 sprintf(g_CheatMarqueeString, "%s: %s\n", - g_Menus[g_MpPlayerNum].curframe->dialog == &g_CheatsBuddiesMenuDialog ? langGet(L_MPWEAPONS_143) : langGet(L_MPWEAPONS_136), // "Buddy Available", "Cheat available" + g_Menus[g_MpPlayerNum].curdialog->definition == &g_CheatsBuddiesMenuDialog ? langGet(L_MPWEAPONS_143) : langGet(L_MPWEAPONS_136), // "Buddy Available", "Cheat available" langGet(g_Cheats[cheat_id].nametextid) ); return g_CheatMarqueeString; #else sprintf(g_StringPointer, "%s: %s\n", - g_Menus[g_MpPlayerNum].curframe->dialog == &g_CheatsBuddiesMenuDialog ? langGet(L_MPWEAPONS_143) : langGet(L_MPWEAPONS_136), // "Buddy Available", "Cheat available" + g_Menus[g_MpPlayerNum].curdialog->definition == &g_CheatsBuddiesMenuDialog ? langGet(L_MPWEAPONS_143) : langGet(L_MPWEAPONS_136), // "Buddy Available", "Cheat available" langGet(g_Cheats[cheat_id].nametextid) ); return g_StringPointer; @@ -932,7 +932,7 @@ struct menuitem g_CheatsWarningMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsWarningMenuDialog = { +struct menudialogdef g_CheatsWarningMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_MPMENU_478, // "Warning" g_CheatsWarningMenuItems, @@ -960,7 +960,7 @@ struct menuitem g_CheatsFunMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsFunMenuDialog = { +struct menudialogdef g_CheatsFunMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_118, // "Fun" g_CheatsFunMenuItems, @@ -985,7 +985,7 @@ struct menuitem g_CheatsGameplayMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsGameplayMenuDialog = { +struct menudialogdef g_CheatsGameplayMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_119, // "Gameplay" g_CheatsGameplayMenuItems, @@ -1010,7 +1010,7 @@ struct menuitem g_CheatsSoloWeaponsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsSoloWeaponsMenuDialog = { +struct menudialogdef g_CheatsSoloWeaponsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_122, // "Weapons for Jo in Solo" g_CheatsSoloWeaponsMenuItems, @@ -1035,7 +1035,7 @@ struct menuitem g_CheatsClassicWeaponsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsClassicWeaponsMenuDialog = { +struct menudialogdef g_CheatsClassicWeaponsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_123, // "Classic Weapons for Jo in Solo" g_CheatsClassicWeaponsMenuItems, @@ -1060,7 +1060,7 @@ struct menuitem g_CheatsWeaponsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsWeaponsMenuDialog = { +struct menudialogdef g_CheatsWeaponsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_120, // "Weapons" g_CheatsWeaponsMenuItems, @@ -1082,7 +1082,7 @@ struct menuitem g_CheatsBuddiesMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsBuddiesMenuDialog = { +struct menudialogdef g_CheatsBuddiesMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_121, // "Buddies" g_CheatsBuddiesMenuItems, @@ -1105,7 +1105,7 @@ struct menuitem g_CheatsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CheatsMenuDialog = { +struct menudialogdef g_CheatsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_476, // "Cheats" g_CheatsMenuItems, diff --git a/src/game/endscreen.c b/src/game/endscreen.c index 602a61520..8e92f38ed 100644 --- a/src/game/endscreen.c +++ b/src/game/endscreen.c @@ -38,7 +38,7 @@ s32 menuhandlerDeclineMission(s32 operation, struct menuitem *item, union handle return 0; } -s32 menudialogRetryMission(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogRetryMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_TICK: @@ -50,9 +50,9 @@ s32 menudialogRetryMission(s32 operation, struct menudialog *dialog, union handl * when the dialog is not on screen? */ #if VERSION >= VERSION_NTSC_FINAL - if (g_Menus[g_MpPlayerNum].curframe) { - if (dialog == g_Menus[g_MpPlayerNum].curframe->dialog - || (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) { + if (g_Menus[g_MpPlayerNum].curdialog) { + if (dialogdef == g_Menus[g_MpPlayerNum].curdialog->definition + || (dialogdef->nextsibling && dialogdef->nextsibling == g_Menus[g_MpPlayerNum].curdialog->definition)) { #endif struct menuinputs *inputs = data->dialog2.inputs; bool accept = false; @@ -71,16 +71,16 @@ s32 menudialogRetryMission(s32 operation, struct menudialog *dialog, union handl inputs->start = false; if (inputs->select - && g_Menus[g_MpPlayerNum].curframe - && dialog->nextsibling - && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog) { + && g_Menus[g_MpPlayerNum].curdialog + && dialogdef->nextsibling + && dialogdef->nextsibling == g_Menus[g_MpPlayerNum].curdialog->definition) { accept = true; inputs->select = false; } if (accept) { union handlerdata data2; - menuhandlerAcceptMission(MENUOP_SET, &dialog->items[1], &data2); + menuhandlerAcceptMission(MENUOP_SET, &dialogdef->items[1], &data2); } #if VERSION >= VERSION_NTSC_FINAL } @@ -89,15 +89,15 @@ s32 menudialogRetryMission(s32 operation, struct menudialog *dialog, union handl } } - menudialog00103608(operation, dialog, data); + menudialog00103608(operation, dialogdef, data); } -char *menuDialogTitleRetryStageName(struct menudialog *dialog) +char *menuDialogTitleRetryStageName(struct menudialogdef *dialogdef) { char *name; char *prefix; - if (g_Menus[g_MpPlayerNum].curframe->dialog != dialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition != dialogdef) { return langGet(L_OPTIONS_300); // "Objectives" } @@ -109,12 +109,12 @@ char *menuDialogTitleRetryStageName(struct menudialog *dialog) return g_StringPointer; } -char *menuDialogTitleNextMissionStageName(struct menudialog *dialog) +char *menuDialogTitleNextMissionStageName(struct menudialogdef *dialogdef) { char *name; char *prefix; - if (g_Menus[g_MpPlayerNum].curframe->dialog != dialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition != dialogdef) { return langGet(L_OPTIONS_300); // "Objectives" } @@ -143,7 +143,7 @@ struct menuitem g_RetryMissionMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_RetryMissionMenuDialog = { +struct menudialogdef g_RetryMissionMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&menuDialogTitleRetryStageName, g_RetryMissionMenuItems, @@ -161,7 +161,7 @@ struct menuitem g_NextMissionMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_NextMissionMenuDialog = { +struct menudialogdef g_NextMissionMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&menuDialogTitleNextMissionStageName, g_NextMissionMenuItems, @@ -354,7 +354,7 @@ char *soloMenuTextMissionTime(struct menuitem *item) } #if VERSION >= VERSION_NTSC_1_0 -struct menudialog *func0f10d730(void) +struct menudialogdef *func0f10d730(void) { g_MissionConfig.stageindex++; g_MissionConfig.stagenum = g_StageNames[g_MissionConfig.stageindex].stagenum; @@ -450,7 +450,7 @@ struct menuitem g_SoloEndscreenObjectivesMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SoloEndscreenObjectivesFailedMenuDialog = { +struct menudialogdef g_SoloEndscreenObjectivesFailedMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_300, // "Objectives" g_SoloEndscreenObjectivesMenuItems, @@ -459,7 +459,7 @@ struct menudialog g_SoloEndscreenObjectivesFailedMenuDialog = { NULL, }; -struct menudialog g_SoloEndscreenObjectivesCompletedMenuDialog = { +struct menudialogdef g_SoloEndscreenObjectivesCompletedMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_OPTIONS_300, // "Objectives" g_SoloEndscreenObjectivesMenuItems, @@ -468,7 +468,7 @@ struct menudialog g_SoloEndscreenObjectivesCompletedMenuDialog = { NULL, }; -struct menudialog g_2PMissionEndscreenObjectivesFailedVMenuDialog = { +struct menudialogdef g_2PMissionEndscreenObjectivesFailedVMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_300, // "Objectives" g_2PMissionEndscreenObjectivesVMenuItems, @@ -477,7 +477,7 @@ struct menudialog g_2PMissionEndscreenObjectivesFailedVMenuDialog = { NULL, }; -struct menudialog g_2PMissionEndscreenObjectivesCompletedVMenuDialog = { +struct menudialogdef g_2PMissionEndscreenObjectivesCompletedVMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_OPTIONS_300, // "Objectives" g_2PMissionEndscreenObjectivesVMenuItems, @@ -507,7 +507,7 @@ struct menuitem g_MissionContinueOrReplyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MissionContinueOrReplyMenuDialog = { +struct menudialogdef g_MissionContinueOrReplyMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&menuTextCurrentStageName3, g_MissionContinueOrReplyMenuItems, @@ -622,16 +622,16 @@ void endscreenHandleContinue(s32 context) #endif #if VERSION >= VERSION_NTSC_1_0 -s32 menudialogSolo2PEndscreenCompleted(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogSolo2PEndscreenCompleted(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { g_Menus[g_MpPlayerNum].endscreen.unke1c = 0; } if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe) { - if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog - || (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) { + if (g_Menus[g_MpPlayerNum].curdialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef + || (dialogdef->nextsibling && dialogdef->nextsibling == g_Menus[g_MpPlayerNum].curdialog->definition)) { struct menuinputs *inputs = data->dialog2.inputs; if (inputs->select || inputs->back || inputs->start) { @@ -908,16 +908,16 @@ glabel menudialogSolo2PEndscreenCompleted ); #endif -s32 menudialogSolo2PEndscreenFailed(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogSolo2PEndscreenFailed(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { g_Menus[g_MpPlayerNum].endscreen.unke1c = 0; } if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe) { - if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog - || (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) { + if (g_Menus[g_MpPlayerNum].curdialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef + || (dialogdef->nextsibling && dialogdef->nextsibling == g_Menus[g_MpPlayerNum].curdialog->definition)) { struct menuinputs *inputs = data->dialog2.inputs; if (inputs->select || inputs->back || inputs->start) { @@ -1153,7 +1153,7 @@ void endscreenSetCoopCompleted(void) } } -struct menudialog g_SoloMissionEndscreenCompletedMenuDialog = { +struct menudialogdef g_SoloMissionEndscreenCompletedMenuDialog = { MENUDIALOGTYPE_SUCCESS, (u32)&menuTitleStageCompleted, g_MissionEndscreenMenuItems, @@ -1162,7 +1162,7 @@ struct menudialog g_SoloMissionEndscreenCompletedMenuDialog = { &g_SoloEndscreenObjectivesCompletedMenuDialog, }; -struct menudialog g_SoloMissionEndscreenFailedMenuDialog = { +struct menudialogdef g_SoloMissionEndscreenFailedMenuDialog = { MENUDIALOGTYPE_DANGER, (u32)&menuTitleStageFailed, g_MissionEndscreenMenuItems, @@ -1554,7 +1554,7 @@ glabel endscreenPrepare ); #endif -struct menudialog g_2PMissionEndscreenCompletedHMenuDialog = { +struct menudialogdef g_2PMissionEndscreenCompletedHMenuDialog = { MENUDIALOGTYPE_SUCCESS, (u32)&menuTitleStageCompleted, g_MissionEndscreenMenuItems, @@ -1563,7 +1563,7 @@ struct menudialog g_2PMissionEndscreenCompletedHMenuDialog = { &g_SoloEndscreenObjectivesCompletedMenuDialog, }; -struct menudialog g_2PMissionEndscreenFailedHMenuDialog = { +struct menudialogdef g_2PMissionEndscreenFailedHMenuDialog = { MENUDIALOGTYPE_DANGER, (u32)&menuTitleStageFailed, g_MissionEndscreenMenuItems, @@ -1572,7 +1572,7 @@ struct menudialog g_2PMissionEndscreenFailedHMenuDialog = { &g_SoloEndscreenObjectivesFailedMenuDialog, }; -struct menudialog g_2PMissionEndscreenCompletedVMenuDialog = { +struct menudialogdef g_2PMissionEndscreenCompletedVMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_OPTIONS_276, // "Completed" g_2PMissionEndscreenVMenuItems, @@ -1581,7 +1581,7 @@ struct menudialog g_2PMissionEndscreenCompletedVMenuDialog = { &g_2PMissionEndscreenObjectivesCompletedVMenuDialog, }; -struct menudialog g_2PMissionEndscreenFailedVMenuDialog = { +struct menudialogdef g_2PMissionEndscreenFailedVMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_277, // "Failed" g_2PMissionEndscreenVMenuItems, diff --git a/src/game/filemgr.c b/src/game/filemgr.c index 24dbe0cec..36cf02e28 100644 --- a/src/game/filemgr.c +++ b/src/game/filemgr.c @@ -29,26 +29,26 @@ u32 var800a22bc; struct fileguid g_GameFileGuid; // These might be able to be removed by relocating their symbols -struct menudialog g_FilemgrCopyMenuDialog; -struct menudialog g_FilemgrConfirmDeleteMenuDialog; -struct menudialog g_FilemgrDeleteMenuDialog; -struct menudialog g_FilemgrEnterNameMenuDialog; -struct menudialog g_FilemgrErrorMenuDialog; -struct menudialog g_FilemgrFileInUseMenuDialog; -struct menudialog g_FilemgrFileLostMenuDialog; -struct menudialog g_FilemgrFileSavedMenuDialog; -struct menudialog g_FilemgrFileSelectMenuDialog; -struct menudialog g_FilemgrSaveElsewhereMenuDialog; -struct menudialog g_FilemgrSaveErrorMenuDialog; -struct menudialog g_FilemgrSelectLocationMenuDialog; -struct menudialog g_PakDeleteNoteMenuDialog; -struct menudialog g_PakGameNotesMenuDialog; -struct menudialog g_PakNotOriginalMenuDialog; +struct menudialogdef g_FilemgrCopyMenuDialog; +struct menudialogdef g_FilemgrConfirmDeleteMenuDialog; +struct menudialogdef g_FilemgrDeleteMenuDialog; +struct menudialogdef g_FilemgrEnterNameMenuDialog; +struct menudialogdef g_FilemgrErrorMenuDialog; +struct menudialogdef g_FilemgrFileInUseMenuDialog; +struct menudialogdef g_FilemgrFileLostMenuDialog; +struct menudialogdef g_FilemgrFileSavedMenuDialog; +struct menudialogdef g_FilemgrFileSelectMenuDialog; +struct menudialogdef g_FilemgrSaveElsewhereMenuDialog; +struct menudialogdef g_FilemgrSaveErrorMenuDialog; +struct menudialogdef g_FilemgrSelectLocationMenuDialog; +struct menudialogdef g_PakDeleteNoteMenuDialog; +struct menudialogdef g_PakGameNotesMenuDialog; +struct menudialogdef g_PakNotOriginalMenuDialog; struct pakdata *g_EditingPak; #if VERSION >= VERSION_NTSC_1_0 -struct menudialog g_FilemgrDuplicateNameMenuDialog; -struct menudialog g_FilemgrRenameMenuDialog; +struct menudialogdef g_FilemgrDuplicateNameMenuDialog; +struct menudialogdef g_FilemgrRenameMenuDialog; #endif #if VERSION >= VERSION_PAL_FINAL @@ -88,7 +88,7 @@ struct menuitem g_ChooseLanguageMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, }; -struct menudialog g_ChooseLanguageMenuDialog = { +struct menudialogdef g_ChooseLanguageMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_095, g_ChooseLanguageMenuItems, @@ -332,7 +332,7 @@ struct menuitem g_FilemgrErrorMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrErrorMenuDialog = { +struct menudialogdef g_FilemgrErrorMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_320, // "Error" g_FilemgrErrorMenuItems, @@ -613,11 +613,11 @@ void filemgrEraseCorruptFile(void) } #endif -s32 filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe && - g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog && + g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { filemgrRetrySave(0); } } @@ -1157,7 +1157,7 @@ struct menuitem g_FilemgrFileSavedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrFileSavedMenuDialog = { +struct menudialogdef g_FilemgrFileSavedMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_OPTIONS_345, // "Cool!" g_FilemgrFileSavedMenuItems, @@ -1175,7 +1175,7 @@ struct menuitem g_FilemgrSaveErrorMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrSaveErrorMenuDialog = { +struct menudialogdef g_FilemgrSaveErrorMenuDialog = { MENUDIALOGTYPE_DANGER, (u32)&filemgrMenuTextErrorTitle, g_FilemgrSaveErrorMenuItems, @@ -1196,7 +1196,7 @@ struct menuitem g_FilemgrFileLostMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrFileLostMenuDialog = { +struct menudialogdef g_FilemgrFileLostMenuDialog = { MENUDIALOGTYPE_DANGER, (u32)&filemgrMenuTextErrorTitle, g_FilemgrFileLostMenuItems, @@ -1212,7 +1212,7 @@ struct menuitem g_FilemgrSaveElsewhereMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrSaveElsewhereMenuDialog = { +struct menudialogdef g_FilemgrSaveElsewhereMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_359, // "Save" g_FilemgrSaveElsewhereMenuItems, @@ -1232,7 +1232,7 @@ struct menuitem g_PakNotOriginalMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakNotOriginalMenuDialog = { +struct menudialogdef g_PakNotOriginalMenuDialog = { MENUDIALOGTYPE_DANGER, (u32)&filemgrMenuTextErrorTitle, g_PakNotOriginalMenuItems, @@ -1586,7 +1586,7 @@ struct menuitem g_FilemgrRenameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrRenameMenuDialog = { +struct menudialogdef g_FilemgrRenameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_238, // "Change File Name" g_FilemgrRenameMenuItems, @@ -1608,7 +1608,7 @@ struct menuitem g_FilemgrDuplicateMenuMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrDuplicateNameMenuDialog = { +struct menudialogdef g_FilemgrDuplicateNameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_232, // "Duplicate File Name" g_FilemgrDuplicateMenuMenuItems, @@ -2195,7 +2195,7 @@ s32 filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union return filemgrFileToCopyOrDeleteListMenuHandler(operation, item, data, false); } -s32 filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_CLOSE) { if (g_Menus[g_MpPlayerNum].fm.isdeletingforsave == true) { @@ -2357,11 +2357,11 @@ const char var7f1b34e8[] = "Try to find last opened file...\n"; /** * Controller pak note listing dialog. */ -s32 pakGameNotesMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 pakGameNotesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe - && g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { s32 value = pak0f1168c4(g_Menus[g_MpPlayerNum].fm.device, &g_EditingPak); if (value) { @@ -2470,7 +2470,7 @@ s32 pakSelectionMenuHandler(s32 operation, struct menuitem *item, union handlerd * * Lists the connected controller paks. */ -s32 pakChoosePakMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 pakChoosePakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -2872,7 +2872,7 @@ s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, unio return 0; } -s32 filemgrMainMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 filemgrMainMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { s32 i; @@ -2981,7 +2981,7 @@ struct menuitem g_FilemgrSelectLocationMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrSelectLocationMenuDialog = { +struct menudialogdef g_FilemgrSelectLocationMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_367, // "Select Location" g_FilemgrSelectLocationMenuItems, @@ -2999,7 +2999,7 @@ struct menuitem g_FilemgrConfirmDeleteMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrConfirmDeleteMenuDialog = { +struct menudialogdef g_FilemgrConfirmDeleteMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_379, // "Warning" g_FilemgrConfirmDeleteMenuItems, @@ -3020,7 +3020,7 @@ struct menuitem g_FilemgrFileInUseMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrFileInUseMenuDialog = { +struct menudialogdef g_FilemgrFileInUseMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_159, // "Error" g_FilemgrFileInUseMenuItems, @@ -3036,7 +3036,7 @@ struct menuitem g_FilemgrDeleteMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrDeleteMenuDialog = { +struct menudialogdef g_FilemgrDeleteMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_376, // "Delete File" g_FilemgrDeleteMenuItems, @@ -3052,7 +3052,7 @@ struct menuitem g_FilemgrCopyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrCopyMenuDialog = { +struct menudialogdef g_FilemgrCopyMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_373, // "Copy File" g_FilemgrCopyMenuItems, @@ -3070,7 +3070,7 @@ struct menuitem g_PakDeleteNoteMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakDeleteNoteMenuDialog = { +struct menudialogdef g_PakDeleteNoteMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_383, // "Delete Game Note" g_PakDeleteNoteMenuItems, @@ -3090,7 +3090,7 @@ struct menuitem g_PakGameNotesMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakGameNotesMenuDialog = { +struct menudialogdef g_PakGameNotesMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_387, // "Game Notes" g_PakGameNotesMenuItems, @@ -3112,7 +3112,7 @@ struct menuitem g_PakChoosePakMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakChoosePakMenuDialog = { +struct menudialogdef g_PakChoosePakMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_107, // "Controller Pak Menu" g_PakChoosePakMenuItems, @@ -3136,7 +3136,7 @@ struct menuitem g_FilemgrOperationsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrOperationsMenuDialog = { +struct menudialogdef g_FilemgrOperationsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_099, // "Game Files" g_FilemgrOperationsMenuItems, @@ -3150,7 +3150,7 @@ struct menuitem g_FilemgrEnterNameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrEnterNameMenuDialog = { +struct menudialogdef g_FilemgrEnterNameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_401, // "Enter Agent Name" g_FilemgrEnterNameMenuItems, @@ -3165,7 +3165,7 @@ struct menuitem g_FilemgrFileSelectMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrFileSelectMenuDialog = { +struct menudialogdef g_FilemgrFileSelectMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_095, // "Perfect Dark" g_FilemgrFileSelectMenuItems, diff --git a/src/game/game_01bea0.c b/src/game/game_01bea0.c index dd297b82e..4f6e6fe76 100644 --- a/src/game/game_01bea0.c +++ b/src/game/game_01bea0.c @@ -53,7 +53,7 @@ void menuCountDialogs(void) g_MenuData.count = 0; for (i = 0; i < 4; i++) { - if (g_Menus[i].curframe) { + if (g_Menus[i].curdialog) { g_MenuData.count++; } } @@ -89,7 +89,7 @@ void menuTick(void) g_Menus[i].unk83c--; } - if (g_Menus[i].curframe) { + if (g_Menus[i].curdialog) { anyopen = true; } } @@ -103,10 +103,10 @@ void menuTick(void) s32 bVar11 = false; for (j = 0; j < 4; j++) { - if (g_Menus[j].curframe) { - if (g_Menus[j].curframe->unk60 == 1 - || g_Menus[j].curframe->unk60 == 2 - || g_Menus[j].curframe->unk60 == 0) { + if (g_Menus[j].curdialog) { + if (g_Menus[j].curdialog->unk60 == 1 + || g_Menus[j].curdialog->unk60 == 2 + || g_Menus[j].curdialog->unk60 == 0) { bVar11 = true; } } @@ -297,7 +297,7 @@ void menuTick(void) g_MpNumJoined = 0; for (i = 0; i < 4; i++) { - if (g_Menus[i].curframe) { + if (g_Menus[i].curdialog) { g_Menus[i].playernum = g_MpNumJoined++; if (g_MenuData.unk008 == -1) { @@ -313,8 +313,8 @@ void menuTick(void) for (i = 0; i < 4; i++) { g_MpPlayerNum = i; - if (g_Menus[g_MpPlayerNum].curframe) { - if (g_Menus[g_MpPlayerNum].curframe->dialog == &g_MpReadyMenuDialog) { + if (g_Menus[g_MpPlayerNum].curdialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == &g_MpReadyMenuDialog) { g_Vars.unk000498 = 1; } else { sp340 = false; @@ -325,7 +325,7 @@ void menuTick(void) for (i = 0; i < 4; i++) { g_MpPlayerNum = i; - if (g_Menus[g_MpPlayerNum].curframe) { + if (g_Menus[g_MpPlayerNum].curdialog) { // Player has a dialog open - tick it s32 prevplayernum = g_Vars.currentplayernum; @@ -494,7 +494,7 @@ void menuTick(void) sp344 = false; for (i = 0; i < 4; i++) { - if (g_Menus[i].curframe) { + if (g_Menus[i].curdialog) { sp344 = true; } } @@ -718,7 +718,7 @@ void menuTick(void) || g_MenuData.unk014 || g_MenuData.unk5d5_05 || g_MenuData.unk5d4 - || g_Menus[mpindex].curframe + || g_Menus[mpindex].curdialog || g_MenuData.unk01b != -1) { g_Vars.players[i]->menuisactive = true; } else { @@ -735,7 +735,7 @@ void menuTick(void) case MENUROOT_4MBFILEMGR: case MENUROOT_4MBMAINMENU: case MENUROOT_TRAINING: - if (g_Menus[mpindex].curframe) { + if (g_Menus[mpindex].curdialog) { g_Vars.paksconnected = 0x1f; } break; @@ -745,7 +745,7 @@ void menuTick(void) if ((g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) && PLAYERCOUNT() >= 2 - && g_Menus[mpindex].curframe) { + && g_Menus[mpindex].curdialog) { g_Vars.players[i]->devicesinhibit = 0 | DEVICE_NIGHTVISION | DEVICE_XRAYSCANNER diff --git a/src/game/game_0f09f0.c b/src/game/game_0f09f0.c index 41ea16a37..1a2d8f8d6 100644 --- a/src/game/game_0f09f0.c +++ b/src/game/game_0f09f0.c @@ -99,17 +99,17 @@ u32 var800a20c8; u32 var800a20cc; #if VERSION >= VERSION_NTSC_1_0 -struct menudialog g_PakCannotReadGameBoyMenuDialog; -struct menudialog g_PakDamagedMenuDialog; -struct menudialog g_PakDataLostMenuDialog; +struct menudialogdef g_PakCannotReadGameBoyMenuDialog; +struct menudialogdef g_PakDamagedMenuDialog; +struct menudialogdef g_PakDataLostMenuDialog; #else -struct menudialog g_PakDamagedMenuDialog; +struct menudialogdef g_PakDamagedMenuDialog; #endif -struct menudialog g_PakFullMenuDialog; -struct menudialog g_PakRemovedMenuDialog; -struct menudialog g_PakRepairFailedMenuDialog; -struct menudialog g_PakRepairSuccessMenuDialog; +struct menudialogdef g_PakFullMenuDialog; +struct menudialogdef g_PakRemovedMenuDialog; +struct menudialogdef g_PakRepairFailedMenuDialog; +struct menudialogdef g_PakRepairSuccessMenuDialog; const struct menucolourpalette g_MenuColourPalettes[] = { { 0x20202000, 0x20202000, 0x20202000, 0x4f4f4f00, 0x00000000, 0x00000000, 0x4f4f4f00, 0x4f4f4f00, 0x4f4f4f00, 0x4f4f4f00, 0x00000000, 0x00000000, 0x4f4f4f00, 0x00000000, 0x00000000 }, @@ -246,7 +246,7 @@ bool currentPlayerIsMenuOpenInSoloOrMp(void) mpindex -= 4; } - if (g_Menus[mpindex].curframe) { + if (g_Menus[mpindex].curdialog) { return true; } } @@ -1622,9 +1622,9 @@ char *menuResolveParam2Text(struct menuitem *item) return menuResolveText(item->param2, item); } -char *menuResolveDialogTitle(struct menudialog *dialog) +char *menuResolveDialogTitle(struct menudialogdef *dialogdef) { - return menuResolveText(dialog->title, dialog); + return menuResolveText(dialogdef->title, dialogdef); } void func0f0f15a4(struct menuitem *item, s32 *arg1) @@ -3588,7 +3588,7 @@ glabel func0f0f1d6c // instruction. Removing the + 1 from the assign to frame->unk04 or // menu->unk6d8 causes the below to use v0 only, which is a closer // match but is functionally incorrect. -//void func0f0f1d6c(struct menudialog *dialog, struct menuframe *frame, struct menu *menu) +//void func0f0f1d6c(struct menudialogdef *dialogdef, struct menudialog *dialog, struct menu *menu) //{ // s32 index660 = menu->unk6d8 - 1; // 64 // s32 index4fc = menu->unk65c; @@ -4552,7 +4552,7 @@ bool menuIsScrollableUnscrollable(struct menuitem *item) return false; } -bool menuIsItemDisabled(struct menuitem *item, struct menuframe *frame) +bool menuIsItemDisabled(struct menuitem *item, struct menudialog *dialog) { union handlerdata sp30; s16 sp2e; @@ -4577,7 +4577,7 @@ bool menuIsItemDisabled(struct menuitem *item, struct menuframe *frame) return true; } - func0f0f1618(item, &sp2e, &sp2c, frame); + func0f0f1618(item, &sp2e, &sp2c, dialog); if (sp2c == 0) { return true; @@ -4586,7 +4586,7 @@ bool menuIsItemDisabled(struct menuitem *item, struct menuframe *frame) return false; } -bool func0f0f2674(struct menuitem *item, struct menuframe *frame, u32 arg2) +bool func0f0f2674(struct menuitem *item, struct menudialog *dialog, u32 arg2) { u32 thing1; u32 thing2; @@ -4606,17 +4606,17 @@ bool func0f0f2674(struct menuitem *item, struct menuframe *frame, u32 arg2) case MENUITEMTYPE_14: case MENUITEMTYPE_16: case MENUITEMTYPE_18: - func0f0f2354(frame, item, &thing1, &thing2); + func0f0f2354(dialog, item, &thing1, &thing2); } - if (menuIsItemDisabled(item, frame)) { + if (menuIsItemDisabled(item, dialog)) { return false; } return true; } -struct menuitem *func0f0f26fc(s32 arg0, s32 arg1, struct menudialog *dialog, s32 *arg3, struct menuframe *frame) +struct menuitem *func0f0f26fc(s32 arg0, s32 arg1, struct menudialogdef *dialogdef, s32 *arg3, struct menudialog *dialog) { struct menuitem *result = NULL; bool done = false; @@ -4625,9 +4625,9 @@ struct menuitem *func0f0f26fc(s32 arg0, s32 arg1, struct menudialog *dialog, s32 s32 i; for (i = 0, sum = 0; !done && i < g_Menus[g_MpPlayerNum].unk660[arg1].unk08; index++, i++) { - struct menuitem *item = &dialog->items[g_Menus[g_MpPlayerNum].unk4fc[index].itemindex]; + struct menuitem *item = &dialogdef->items[g_Menus[g_MpPlayerNum].unk4fc[index].itemindex]; - if (func0f0f2674(item, frame, 1)) { + if (func0f0f2674(item, dialog, 1)) { result = item; if (sum >= arg0) { @@ -4643,14 +4643,14 @@ struct menuitem *func0f0f26fc(s32 arg0, s32 arg1, struct menudialog *dialog, s32 return result; } -struct menuitem *func0f0f288c(struct menuframe *frame) +struct menuitem *func0f0f288c(struct menudialog *dialog) { - s32 s0 = frame->unk04; + s32 s0 = dialog->unk04; s32 i; s32 sp34; - for (i = 0; i < frame->unk05; i++) { - struct menuitem *item = func0f0f26fc(0, s0, frame->dialog, &sp34, frame); + for (i = 0; i < dialog->unk05; i++) { + struct menuitem *item = func0f0f26fc(0, s0, dialog->definition, &sp34, dialog); if (item != NULL) { return item; @@ -4659,9 +4659,9 @@ struct menuitem *func0f0f288c(struct menuframe *frame) s0++; } - menuResolveDialogTitle(frame->dialog); + menuResolveDialogTitle(dialog->definition); - return frame->dialog->items; + return dialog->definition->items; } GLOBAL_ASM( @@ -5041,79 +5041,79 @@ glabel func0f0f2c44 /* f0f2cf0: 00000000 */ nop ); -void menuOpenDialog(struct menudialog *dialog, struct menuframe *frame, struct menu *menu) +void menuOpenDialog(struct menudialogdef *dialogdef, struct menudialog *dialog, struct menu *menu) { union handlerdata data3; struct menuitem *item; union handlerdata data1; union handlerdata data2; - frame->dialog = dialog; + dialog->definition = dialogdef; switch (g_MenuData.root) { case MENUROOT_MPSETUP: case MENUROOT_4MBMAINMENU: - frame->unk6e = 1; + dialog->unk6e = 1; break; case MENUROOT_MAINMENU: case MENUROOT_TRAINING: default: - frame->unk6e = 0; + dialog->unk6e = 0; break; } - func0f0f1d6c(dialog, frame, menu); - func0f0fa574(frame); + func0f0f1d6c(dialogdef, dialog, menu); + func0f0fa574(dialog); - frame->type = dialog->type; - frame->transitiontimer = -1; - frame->unk48 = 0; - frame->unk4c = random() * (1.0f / U32_MAX) * M_TAU; + dialog->type = dialogdef->type; + dialog->transitiontimer = -1; + dialog->unk48 = 0; + dialog->unk4c = random() * (1.0f / U32_MAX) * M_TAU; - g_Menus[g_MpPlayerNum].curframe->unk60 = 0; - g_Menus[g_MpPlayerNum].curframe->unk50 = 0; + g_Menus[g_MpPlayerNum].curdialog->unk60 = 0; + g_Menus[g_MpPlayerNum].curdialog->unk50 = 0; - frame->unk54 = 0; - frame->unk58 = 0; - frame->unk5c = 0; + dialog->unk54 = 0; + dialog->unk58 = 0; + dialog->unk5c = 0; - frame->focuseditem = func0f0f288c(frame); + dialog->focuseditem = func0f0f288c(dialog); // Check if any items should be focused automatically - item = frame->dialog->items; + item = dialog->definition->items; while (item->type != MENUITEMTYPE_END) { if (item->handler && (item->flags & MENUITEMFLAG_00000004) == 0 && item->handler(MENUOP_CHECKPREFOCUSED, item, &data1)) { - frame->focuseditem = item; + dialog->focuseditem = item; } item++; } // Run focus handler - if (frame->focuseditem - && frame->focuseditem->handler - && (frame->focuseditem->flags & MENUITEMFLAG_00000004) == 0) { - frame->focuseditem->handler(MENUOP_FOCUS, frame->focuseditem, &data2); + if (dialog->focuseditem + && dialog->focuseditem->handler + && (dialog->focuseditem->flags & MENUITEMFLAG_00000004) == 0) { + dialog->focuseditem->handler(MENUOP_FOCUS, dialog->focuseditem, &data2); } - frame->dimmed = false; - frame->unk64 = 0; - frame->unk68 = 0; + dialog->dimmed = false; + dialog->unk64 = 0; + dialog->unk68 = 0; - if (dialog->handler) { - dialog->handler(MENUOP_OPEN, dialog, &data3); + if (dialogdef->handler) { + dialogdef->handler(MENUOP_OPEN, dialogdef, &data3); } - func0f0f2134(dialog, frame, menu); - func0f0f7e98(frame); + func0f0f2134(dialogdef, dialog, menu); + func0f0f7e98(dialog); - frame->unk14 = frame->unk2c; - frame->y = frame->unk30; - frame->unk1c = frame->unk34; - frame->height = frame->unk38; + dialog->unk14 = dialog->unk2c; + dialog->y = dialog->unk30; + dialog->unk1c = dialog->unk34; + dialog->height = dialog->unk38; } #if VERSION >= VERSION_NTSC_1_0 @@ -5507,31 +5507,31 @@ glabel menuPushDialog #endif // regalloc: s1 (layer) and s2 (sibling) are swapped -//void menuPushDialog(struct menudialog *dialog) +//void menuPushDialog(struct menudialogdef *dialogdef) //{ // if (dialog) { // func0f0f37a4(&g_Menus[g_MpPlayerNum].unk840); // -// if (g_Menus[g_MpPlayerNum].depth < 6 && g_Menus[g_MpPlayerNum].numframes < 10) { +// if (g_Menus[g_MpPlayerNum].depth < 6 && g_Menus[g_MpPlayerNum].numdialogs < 10) { // struct menulayer *layer = &g_Menus[g_MpPlayerNum].layers[g_Menus[g_MpPlayerNum].depth]; -// struct menudialog *sibling; -// struct menuframe *frame; +// struct menudialogdef *sibling; +// struct menudialog *dialog; // // g_Menus[g_MpPlayerNum].depth++; // // layer->numsiblings = 1; // layer->cursibling = 0; // -// frame = &g_Menus[g_MpPlayerNum].frames[g_Menus[g_MpPlayerNum].numframes]; -// g_Menus[g_MpPlayerNum].numframes++; -// layer->siblings[0] = frame; -// g_Menus[g_MpPlayerNum].curframe = frame; -// frame->unk6d = 0; +// dialog = &g_Menus[g_MpPlayerNum].dialogs[g_Menus[g_MpPlayerNum].numdialogs]; +// g_Menus[g_MpPlayerNum].numdialogs++; +// layer->siblings[0] = dialog; +// g_Menus[g_MpPlayerNum].curdialog = dialog; +// dialog->unk6d = 0; // -// menuOpenDialog(dialog, frame, &g_Menus[g_MpPlayerNum]); +// menuOpenDialog(dialog, dialog, &g_Menus[g_MpPlayerNum]); // -// frame->unk2c = (viGetWidth() - frame->unk1c) / 2; -// frame->unk30 = (viGetHeight() - frame->unk20) / 2; +// dialog->unk2c = (viGetWidth() - dialog->unk1c) / 2; +// dialog->unk30 = (viGetHeight() - dialog->unk20) / 2; // // g_Menus[g_MpPlayerNum].unke40 |= 0x80; // sibling = dialog->nextsibling; @@ -5539,22 +5539,22 @@ glabel menuPushDialog // while (sibling && layer->numsiblings < 5) { // // If this limit were to be reached, the game would soft lock // // because sibling is incremented inside the if-statement block. -// if (g_Menus[g_MpPlayerNum].numframes < 10) { -// frame = &g_Menus[g_MpPlayerNum].frames[g_Menus[g_MpPlayerNum].numframes]; -// g_Menus[g_MpPlayerNum].numframes++; +// if (g_Menus[g_MpPlayerNum].numdialogs < 10) { +// dialog = &g_Menus[g_MpPlayerNum].dialogs[g_Menus[g_MpPlayerNum].numdialogs]; +// g_Menus[g_MpPlayerNum].numdialogs++; // -// layer->siblings[layer->numsiblings] = frame; +// layer->siblings[layer->numsiblings] = dialog; // layer->numsiblings++; // -// frame->unk6d = -1; +// dialog->unk6d = -1; // -// menuOpenDialog(sibling, frame, &g_Menus[g_MpPlayerNum]); +// menuOpenDialog(sibling, dialog, &g_Menus[g_MpPlayerNum]); // -// frame->unk14 = -320; -// frame->unk2c = -320; -// frame->unk18 = (viGetHeight() - frame->unk20) / 2; -// frame->unk30 = frame->unk18; -// frame->unk3c = 0; +// dialog->unk14 = -320; +// dialog->unk2c = -320; +// dialog->unk18 = (viGetHeight() - dialog->unk20) / 2; +// dialog->unk30 = dialog->unk18; +// dialog->unk3c = 0; // // sibling = sibling->nextsibling; // } @@ -5583,7 +5583,7 @@ bool func0f0f3220(s32 arg0) s32 prevplayernum = g_MpPlayerNum; for (i = 3; i >= 0; i--) { - if (g_Menus[i].curframe) { + if (g_Menus[i].curdialog) { g_MpPlayerNum = i; } } @@ -5592,11 +5592,12 @@ bool func0f0f3220(s32 arg0) save = false; } - if (g_Menus[g_MpPlayerNum].curframe && g_Menus[g_MpPlayerNum].curframe->dialog->type == 2) { + if (g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->definition->type == MENUDIALOGTYPE_DANGER) { save = false; - if (g_Menus[g_MpPlayerNum].curframe->dialog == &g_MpEndscreenChallengeCheatedMenuDialog - || g_Menus[g_MpPlayerNum].curframe->dialog == &g_MpEndscreenChallengeFailedMenuDialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == &g_MpEndscreenChallengeCheatedMenuDialog + || g_Menus[g_MpPlayerNum].curdialog->definition == &g_MpEndscreenChallengeFailedMenuDialog) { save = true; } } @@ -5629,7 +5630,7 @@ void func0f0f3220(s32 arg0) s32 prevplayernum = g_MpPlayerNum; for (i = 3; i >= 0; i--) { - if (g_Menus[i].curframe) { + if (g_Menus[i].curdialog) { g_MpPlayerNum = i; } } @@ -5659,8 +5660,8 @@ void menuCloseDialog(void) for (i = 0; i < layer->numsiblings; i++) { data.dialog1.preventclose = false; - if (layer->siblings[i]->dialog->handler) { - layer->siblings[i]->dialog->handler(MENUOP_CLOSE, layer->siblings[i]->dialog, &data); + if (layer->siblings[i]->definition->handler) { + layer->siblings[i]->definition->handler(MENUOP_CLOSE, layer->siblings[i]->definition, &data); } if (value_prevent == data.dialog1.preventclose) { @@ -5669,7 +5670,7 @@ void menuCloseDialog(void) } for (i = 0; i < layer->numsiblings; i++) { - g_Menus[g_MpPlayerNum].numframes--; + g_Menus[g_MpPlayerNum].numdialogs--; } g_Menus[g_MpPlayerNum].unk65c = g_Menus[g_MpPlayerNum].unk660[layer->siblings[0]->unk04].unk06; @@ -5695,10 +5696,10 @@ void menuCloseDialog(void) } if (g_Menus[g_MpPlayerNum].depth == 0) { - g_Menus[g_MpPlayerNum].curframe = NULL; + g_Menus[g_MpPlayerNum].curdialog = NULL; } else { struct menulayer *layer = &g_Menus[g_MpPlayerNum].layers[g_Menus[g_MpPlayerNum].depth - 1]; - g_Menus[g_MpPlayerNum].curframe = layer->siblings[layer->cursibling]; + g_Menus[g_MpPlayerNum].curdialog = layer->siblings[layer->cursibling]; } } @@ -5710,11 +5711,11 @@ void menuUpdateCurFrame(void) // No more parent menus - return control to the player g_Vars.currentplayer->joybutinhibit = 0xffffffff; menuClose(); - g_Menus[g_MpPlayerNum].curframe = NULL; + g_Menus[g_MpPlayerNum].curdialog = NULL; } else { // Set up parent menu struct menulayer *layer = &g_Menus[g_MpPlayerNum].layers[depth - 1]; - g_Menus[g_MpPlayerNum].curframe = layer->siblings[layer->cursibling]; + g_Menus[g_MpPlayerNum].curdialog = layer->siblings[layer->cursibling]; } } @@ -5724,10 +5725,10 @@ void menuPopDialog(void) menuUpdateCurFrame(); } -void func0f0f3704(struct menudialog *dialog) +void func0f0f3704(struct menudialogdef *dialogdef) { menuCloseDialog(); - menuPushDialog(dialog); + menuPushDialog(dialogdef); } GLOBAL_ASM( @@ -12528,7 +12529,7 @@ glabel func0f0f5360 .L0f0f6bc4: /* f0f6bc4: 8fa401e8 */ lw $a0,0x1e8($sp) .L0f0f6bc8: -/* f0f6bc8: 0fc3c167 */ jal menuRenderItem +/* f0f6bc8: 0fc3c167 */ jal menuitemRender /* f0f6bcc: 27a50198 */ addiu $a1,$sp,0x198 /* f0f6bd0: 8fab0118 */ lw $t3,0x118($sp) /* f0f6bd4: afa201e8 */ sw $v0,0x1e8($sp) @@ -12645,7 +12646,7 @@ glabel func0f0f5360 /* f0f6d74: afa90014 */ sw $t1,0x14($sp) /* f0f6d78: 8fa401e8 */ lw $a0,0x1e8($sp) /* f0f6d7c: afaf0018 */ sw $t7,0x18($sp) -/* f0f6d80: 0fc3c246 */ jal menuRenderOverlay +/* f0f6d80: 0fc3c246 */ jal menuitemOverlay /* f0f6d84: afad0010 */ sw $t5,0x10($sp) /* f0f6d88: 8fac01c0 */ lw $t4,0x1c0($sp) /* f0f6d8c: 8fae007c */ lw $t6,0x7c($sp) @@ -14725,7 +14726,7 @@ glabel func0f0f5360 .NB0f0f353c: /* f0f353c: 8fa401e8 */ lw $a0,0x1e8($sp) .NB0f0f3540: -/* f0f3540: 0fc3b4b3 */ jal menuRenderItem +/* f0f3540: 0fc3b4b3 */ jal menuitemRender /* f0f3544: 27a50198 */ addiu $a1,$sp,0x198 /* f0f3548: 8fae0118 */ lw $t6,0x118($sp) /* f0f354c: afa201e8 */ sw $v0,0x1e8($sp) @@ -14842,7 +14843,7 @@ glabel func0f0f5360 /* f0f36ec: afa90014 */ sw $t1,0x14($sp) /* f0f36f0: 8fa401e8 */ lw $a0,0x1e8($sp) /* f0f36f4: afab0018 */ sw $t3,0x18($sp) -/* f0f36f8: 0fc3b592 */ jal menuRenderOverlay +/* f0f36f8: 0fc3b592 */ jal menuitemOverlay /* f0f36fc: afae0010 */ sw $t6,0x10($sp) /* f0f3700: 8fad01c0 */ lw $t5,0x1c0($sp) /* f0f3704: 8faf007c */ lw $t7,0x7c($sp) @@ -16884,11 +16885,11 @@ glabel func0f0f7e98 void menuClose(void) { g_Menus[g_MpPlayerNum].depth = 0; - g_Menus[g_MpPlayerNum].numframes = 0; + g_Menus[g_MpPlayerNum].numdialogs = 0; g_Menus[g_MpPlayerNum].unk65c = 0; g_Menus[g_MpPlayerNum].unk6d8 = 0; g_Menus[g_MpPlayerNum].unk81c = 0; - g_Menus[g_MpPlayerNum].curframe = NULL; + g_Menus[g_MpPlayerNum].curdialog = NULL; g_Menus[g_MpPlayerNum].unk83c = 10; if (g_MenuData.root == MENUROOT_MPPAUSE) { @@ -16908,7 +16909,7 @@ void menuClose(void) void func0f0f8120(void) { - struct menuframe *prev = g_Menus[g_MpPlayerNum].curframe; + struct menudialog *prev = g_Menus[g_MpPlayerNum].curdialog; s32 i; if (g_MenuData.unk66e > 0) { @@ -16917,20 +16918,20 @@ void func0f0f8120(void) } } - if (g_Menus[g_MpPlayerNum].curframe == prev) { + if (g_Menus[g_MpPlayerNum].curdialog == prev) { while (g_Menus[g_MpPlayerNum].depth > 0) { menuPopDialog(); } } } -void func0f0f820c(struct menudialog *dialog, s32 root) +void func0f0f820c(struct menudialogdef *dialogdef, s32 root) { s32 i; s32 prevplayernum = g_MpPlayerNum; for (i = 0; i < 4; i++) { - if (g_Menus[i].curframe) { + if (g_Menus[i].curdialog) { g_MpPlayerNum = i; func0f0f8120(); } @@ -16939,7 +16940,7 @@ void func0f0f820c(struct menudialog *dialog, s32 root) g_MpPlayerNum = prevplayernum; g_MenuData.unk008 = root; - g_MenuData.unk00c = dialog; + g_MenuData.unk00c = dialogdef; } bool func0f0f82a8(s32 arg0) @@ -17450,13 +17451,13 @@ glabel var7f1b29f8 ); #endif -void func0f0f85e0(struct menudialog *dialog, s32 root) +void func0f0f85e0(struct menudialogdef *dialogdef, s32 root) { - if (dialog == &g_CiMenuViaPcMenuDialog) { + if (dialogdef == &g_CiMenuViaPcMenuDialog) { musicStartMenu(); } - menuPushRootDialog(dialog, root); + menuPushRootDialog(dialogdef, root); lvSetPaused(true); g_Vars.currentplayer->pausemode = PAUSEMODE_PAUSED; } @@ -20098,14 +20099,14 @@ glabel var7f1b3d5cpf /* f0fa774: 03c02825 */ move $a1,$s8 /* f0fa778: 02203025 */ move $a2,$s1 /* f0fa77c: 36070004 */ ori $a3,$s0,0x4 -/* f0fa780: 0fc3c389 */ jal menuTickItem +/* f0fa780: 0fc3c389 */ jal menuitemTick /* f0fa784: afb30010 */ sw $s3,0x10($sp) /* f0fa788: 1000000c */ b .PF0f0fa7bc /* f0fa78c: afa2011c */ sw $v0,0x11c($sp) .PF0f0fa790: /* f0fa790: 02203025 */ move $a2,$s1 /* f0fa794: 02003825 */ move $a3,$s0 -/* f0fa798: 0fc3c389 */ jal menuTickItem +/* f0fa798: 0fc3c389 */ jal menuitemTick /* f0fa79c: afb30010 */ sw $s3,0x10($sp) /* f0fa7a0: 10000006 */ b .PF0f0fa7bc /* f0fa7a4: afa2011c */ sw $v0,0x11c($sp) @@ -20114,7 +20115,7 @@ glabel var7f1b3d5cpf .PF0f0fa7ac: /* f0fa7ac: 02203025 */ move $a2,$s1 /* f0fa7b0: 02803825 */ move $a3,$s4 -/* f0fa7b4: 0fc3c389 */ jal menuTickItem +/* f0fa7b4: 0fc3c389 */ jal menuitemTick /* f0fa7b8: afb30010 */ sw $s3,0x10($sp) .PF0f0fa7bc: /* f0fa7bc: 92f80668 */ lbu $t8,0x668($s7) @@ -21412,14 +21413,14 @@ glabel var7f1b2a64 /* f0fa044: 03c02825 */ or $a1,$s8,$zero /* f0fa048: 02203025 */ or $a2,$s1,$zero /* f0fa04c: 36070004 */ ori $a3,$s0,0x4 -/* f0fa050: 0fc3c1c1 */ jal menuTickItem +/* f0fa050: 0fc3c1c1 */ jal menuitemTick /* f0fa054: afb30010 */ sw $s3,0x10($sp) /* f0fa058: 1000000c */ b .L0f0fa08c /* f0fa05c: afa2011c */ sw $v0,0x11c($sp) .L0f0fa060: /* f0fa060: 02203025 */ or $a2,$s1,$zero /* f0fa064: 02003825 */ or $a3,$s0,$zero -/* f0fa068: 0fc3c1c1 */ jal menuTickItem +/* f0fa068: 0fc3c1c1 */ jal menuitemTick /* f0fa06c: afb30010 */ sw $s3,0x10($sp) /* f0fa070: 10000006 */ b .L0f0fa08c /* f0fa074: afa2011c */ sw $v0,0x11c($sp) @@ -21428,7 +21429,7 @@ glabel var7f1b2a64 .L0f0fa07c: /* f0fa07c: 02203025 */ or $a2,$s1,$zero /* f0fa080: 02803825 */ or $a3,$s4,$zero -/* f0fa084: 0fc3c1c1 */ jal menuTickItem +/* f0fa084: 0fc3c1c1 */ jal menuitemTick /* f0fa088: afb30010 */ sw $s3,0x10($sp) .L0f0fa08c: /* f0fa08c: 92e90668 */ lbu $t1,0x668($s7) @@ -22644,14 +22645,14 @@ glabel var7f1b2a64 /* f0f6788: 03c02825 */ or $a1,$s8,$zero /* f0f678c: 02203025 */ or $a2,$s1,$zero /* f0f6790: 36070004 */ ori $a3,$s0,0x4 -/* f0f6794: 0fc3b50d */ jal menuTickItem +/* f0f6794: 0fc3b50d */ jal menuitemTick /* f0f6798: afb30010 */ sw $s3,0x10($sp) /* f0f679c: 1000000c */ beqz $zero,.NB0f0f67d0 /* f0f67a0: afa2011c */ sw $v0,0x11c($sp) .NB0f0f67a4: /* f0f67a4: 02203025 */ or $a2,$s1,$zero /* f0f67a8: 02003825 */ or $a3,$s0,$zero -/* f0f67ac: 0fc3b50d */ jal menuTickItem +/* f0f67ac: 0fc3b50d */ jal menuitemTick /* f0f67b0: afb30010 */ sw $s3,0x10($sp) /* f0f67b4: 10000006 */ beqz $zero,.NB0f0f67d0 /* f0f67b8: afa2011c */ sw $v0,0x11c($sp) @@ -22660,7 +22661,7 @@ glabel var7f1b2a64 .NB0f0f67c0: /* f0f67c0: 02203025 */ or $a2,$s1,$zero /* f0f67c4: 02803825 */ or $a3,$s4,$zero -/* f0f67c8: 0fc3b50d */ jal menuTickItem +/* f0f67c8: 0fc3b50d */ jal menuitemTick /* f0f67cc: afb30010 */ sw $s3,0x10($sp) .NB0f0f67d0: /* f0f67d0: 92eb05d8 */ lbu $t3,0x5d8($s7) @@ -23012,25 +23013,25 @@ glabel var7f1b2a64 ); #endif -void func0f0fa574(struct menuframe *frame) +void func0f0fa574(struct menudialog *dialog) { struct menu *menu = &g_Menus[g_MpPlayerNum]; s32 i; s32 j; - for (i = 0; i < frame->unk05; i++) { - s32 index1 = frame->unk04 + i; + for (i = 0; i < dialog->unk05; i++) { + s32 index1 = dialog->unk04 + i; for (j = 0; j < menu->unk660[index1].unk08; j++) { s32 index2 = menu->unk660[index1].unk06 + j; - struct menuitem *item = &frame->dialog->items[menu->unk4fc[index2].itemindex]; + struct menuitem *item = &dialog->definition->items[menu->unk4fc[index2].itemindex]; union menuitemdata *data = NULL; if (menu->unk4fc[index2].blockindex != -1) { data = (union menuitemdata *)&menu->blocks[menu->unk4fc[index2].blockindex]; } - menuInitItem(item, data); + menuitemInit(item, data); } } } @@ -29709,7 +29710,7 @@ u32 menuGetRoot(void) } #if VERSION >= VERSION_NTSC_1_0 -struct menudialog g_PakAttemptRepairMenuDialog; +struct menudialogdef g_PakAttemptRepairMenuDialog; s32 menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata *data) { @@ -29719,13 +29720,13 @@ s32 menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata while (!done) { done = true; - if (g_Menus[g_MpPlayerNum].curframe) { - if (g_Menus[g_MpPlayerNum].curframe->dialog == &g_PakRepairSuccessMenuDialog - || g_Menus[g_MpPlayerNum].curframe->dialog == &g_PakRemovedMenuDialog - || g_Menus[g_MpPlayerNum].curframe->dialog == &g_PakRepairFailedMenuDialog - || g_Menus[g_MpPlayerNum].curframe->dialog == &g_PakAttemptRepairMenuDialog - || g_Menus[g_MpPlayerNum].curframe->dialog == &g_PakDamagedMenuDialog - || g_Menus[g_MpPlayerNum].curframe->dialog == &g_PakFullMenuDialog) { + if (g_Menus[g_MpPlayerNum].curdialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == &g_PakRepairSuccessMenuDialog + || g_Menus[g_MpPlayerNum].curdialog->definition == &g_PakRemovedMenuDialog + || g_Menus[g_MpPlayerNum].curdialog->definition == &g_PakRepairFailedMenuDialog + || g_Menus[g_MpPlayerNum].curdialog->definition == &g_PakAttemptRepairMenuDialog + || g_Menus[g_MpPlayerNum].curdialog->definition == &g_PakDamagedMenuDialog + || g_Menus[g_MpPlayerNum].curdialog->definition == &g_PakFullMenuDialog) { done = false; menuPopDialog(); } @@ -29737,11 +29738,11 @@ s32 menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata } #endif -s32 menudialog000fcd48(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe - && g_Menus[g_MpPlayerNum].curframe->dialog == dialog + if (g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef && joy000155b4(g_Menus[g_MpPlayerNum].fm.device3) == 0) { func0f0f3704(&g_PakRemovedMenuDialog); } @@ -29774,23 +29775,23 @@ s32 menuhandlerRepairPak(s32 operation, struct menuitem *item, union handlerdata return 0; } -void func0f0fce8c(struct menudialog *dialog, s32 playernum, s32 arg2) +void func0f0fce8c(struct menudialogdef *dialogdef, s32 playernum, s32 arg2) { s32 prevplayernum = g_MpPlayerNum; g_MpPlayerNum = playernum; g_Menus[g_MpPlayerNum].fm.device3 = arg2; - if (g_Menus[g_MpPlayerNum].curframe == NULL) { + if (g_Menus[g_MpPlayerNum].curdialog == NULL) { if (PLAYERCOUNT() == 1) { - menuPushRootDialog(dialog, MENUROOT_MAINMENU); + menuPushRootDialog(dialogdef, MENUROOT_MAINMENU); lvSetPaused(true); g_Vars.currentplayer->pausemode = PAUSEMODE_PAUSED; } else { - menuPushRootDialog(dialog, MENUROOT_MPPAUSE); + menuPushRootDialog(dialogdef, MENUROOT_MPPAUSE); } } else { - menuPushDialog(dialog); + menuPushDialog(dialogdef); } g_MpPlayerNum = prevplayernum; @@ -29807,7 +29808,7 @@ struct menuitem g_PakRemovedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakRemovedMenuDialog = { +struct menudialogdef g_PakRemovedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_173, // "Error" g_PakRemovedMenuItems, @@ -29827,7 +29828,7 @@ struct menuitem g_PakRepairSuccessMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakRepairSuccessMenuDialog = { +struct menudialogdef g_PakRepairSuccessMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_MPWEAPONS_180, // "Repair Successful" g_PakRepairSuccessMenuItems, @@ -29843,7 +29844,7 @@ struct menuitem g_PakRepairFailedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakRepairFailedMenuDialog = { +struct menudialogdef g_PakRepairFailedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_182, // "Repair Failed" g_PakRepairFailedMenuItems, @@ -29861,7 +29862,7 @@ struct menuitem g_PakAttemptRepairMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakAttemptRepairMenuDialog = { +struct menudialogdef g_PakAttemptRepairMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_175, // "Attempt Repair" g_PakAttemptRepairMenuItems, @@ -29955,17 +29956,17 @@ bool func0f0fd1f4(s32 arg0, s32 arg1) result = true; } - if (g_Menus[playernum].curframe) { - if (g_Menus[playernum].curframe->dialog == &g_PakDamagedMenuDialog + if (g_Menus[playernum].curdialog) { + if (g_Menus[playernum].curdialog->definition == &g_PakDamagedMenuDialog #if VERSION >= VERSION_NTSC_1_0 - || g_Menus[playernum].curframe->dialog == &g_PakCannotReadGameBoyMenuDialog - || g_Menus[playernum].curframe->dialog == &g_PakDataLostMenuDialog + || g_Menus[playernum].curdialog->definition == &g_PakCannotReadGameBoyMenuDialog + || g_Menus[playernum].curdialog->definition == &g_PakDataLostMenuDialog #endif - || g_Menus[playernum].curframe->dialog == &g_PakFullMenuDialog - || g_Menus[playernum].curframe->dialog == &g_PakAttemptRepairMenuDialog - || g_Menus[playernum].curframe->dialog == &g_PakRemovedMenuDialog - || g_Menus[playernum].curframe->dialog == &g_PakRepairSuccessMenuDialog - || g_Menus[playernum].curframe->dialog == &g_PakRepairFailedMenuDialog + || g_Menus[playernum].curdialog->definition == &g_PakFullMenuDialog + || g_Menus[playernum].curdialog->definition == &g_PakAttemptRepairMenuDialog + || g_Menus[playernum].curdialog->definition == &g_PakRemovedMenuDialog + || g_Menus[playernum].curdialog->definition == &g_PakRepairSuccessMenuDialog + || g_Menus[playernum].curdialog->definition == &g_PakRepairFailedMenuDialog ) { result = false; } @@ -29995,7 +29996,7 @@ void func0f0fd320(s32 arg0, s32 arg1) for (i = 0; i < g_Menus[g_MpPlayerNum].depth; i++) { if (g_Menus[g_MpPlayerNum].layers[i].siblings[0] - && g_Menus[g_MpPlayerNum].layers[i].siblings[0]->dialog == &g_PakChoosePakMenuDialog) { + && g_Menus[g_MpPlayerNum].layers[i].siblings[0]->definition == &g_PakChoosePakMenuDialog) { found = true; } } @@ -30042,16 +30043,16 @@ void func0f0fd548(s32 arg0) g_MenuData.unk66f = 0; } -struct menuframe *menuIsDialogOpen(struct menudialog *dialog) +struct menudialog *menuIsDialogOpen(struct menudialogdef *dialogdef) { s32 i; s32 j; - if (g_Menus[g_MpPlayerNum].curframe) { + if (g_Menus[g_MpPlayerNum].curdialog) { for (i = 0; i < g_Menus[g_MpPlayerNum].depth; i++) { for (j = 0; j < g_Menus[g_MpPlayerNum].layers[i].numsiblings; j++) { if (g_Menus[g_MpPlayerNum].layers[i].siblings[j] - && g_Menus[g_MpPlayerNum].layers[i].siblings[j]->dialog == dialog) { + && g_Menus[g_MpPlayerNum].layers[i].siblings[j]->definition == dialogdef) { return g_Menus[g_MpPlayerNum].layers[i].siblings[j]; } } @@ -30072,7 +30073,7 @@ struct menuitem g_PakDamagedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakDamagedMenuDialog = { +struct menudialogdef g_PakDamagedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_064, // "Damaged Controller Pak" g_PakDamagedMenuItems, @@ -30095,7 +30096,7 @@ struct menuitem g_PakFullMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakFullMenuDialog = { +struct menudialogdef g_PakFullMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_070, // "Full Controller Pak" g_PakFullMenuItems, @@ -30116,7 +30117,7 @@ struct menuitem g_PakCannotReadGameBoyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakCannotReadGameBoyMenuDialog = { +struct menudialogdef g_PakCannotReadGameBoyMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_253, // "Error" g_PakCannotReadGameBoyMenuItems, @@ -30135,7 +30136,7 @@ struct menuitem g_PakDataLostMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PakDataLostMenuDialog = { +struct menudialogdef g_PakDataLostMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_256, // "Error" g_PakDataLostMenuItems, diff --git a/src/game/game_10c9c0.c b/src/game/game_10c9c0.c index b18400cd8..a14698b04 100644 --- a/src/game/game_10c9c0.c +++ b/src/game/game_10c9c0.c @@ -160,7 +160,7 @@ void func0f10cb2c(void) } #endif -s32 menudialog4MbMainMenu(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog4MbMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { g_Vars.waitingtojoin[0] = false; @@ -169,9 +169,9 @@ s32 menudialog4MbMainMenu(s32 operation, struct menudialog *dialog, union handle g_Vars.waitingtojoin[3] = false; } - if (g_Menus[g_MpPlayerNum].curframe && - g_Menus[g_MpPlayerNum].curframe->dialog == &g_MainMenu4MbMenuDialog && - operation == MENUOP_TICK) { + if (g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->definition == &g_MainMenu4MbMenuDialog + && operation == MENUOP_TICK) { g_Vars.mpsetupmenu = MPSETUPMENU_GENERAL; g_Vars.mpquickteam = MPQUICKTEAM_NONE; g_Vars.usingadvsetup = false; @@ -197,7 +197,7 @@ struct menuitem g_GameFiles4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_GameFiles4MbMenuDialog = { +struct menudialogdef g_GameFiles4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_099, // "Game Files" g_GameFiles4MbMenuItems, @@ -212,7 +212,7 @@ struct menuitem g_FilemgrFileSelect4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FilemgrFileSelect4MbMenuDialog = { +struct menudialogdef g_FilemgrFileSelect4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_095, // "Perfect Dark" g_FilemgrFileSelect4MbMenuItems, @@ -240,7 +240,7 @@ struct menuitem g_AudioVideo4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_AudioVideo4MbMenuDialog = { +struct menudialogdef g_AudioVideo4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_307, // "Audio/Visual" g_AudioVideo4MbMenuItems, @@ -260,7 +260,7 @@ struct menuitem g_MpPlayerSetup4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPlayerSetup4MbMenuDialog = { +struct menudialogdef g_MpPlayerSetup4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_028, // "Player Setup" g_MpPlayerSetup4MbMenuItems, @@ -269,7 +269,7 @@ struct menudialog g_MpPlayerSetup4MbMenuDialog = { &g_MpChallengeListOrDetailsMenuDialog, }; -struct menudialog g_MpDropOut4MbMenuDialog; +struct menudialogdef g_MpDropOut4MbMenuDialog; struct menuitem g_MpQuickGo4MbMenuItems[] = { { MENUITEMTYPE_SELECTABLE, 0, 0x00000004, L_MISC_456, 0x00000000, (void *)&g_MpReadyMenuDialog }, // "Start Game" @@ -281,7 +281,7 @@ struct menuitem g_MpQuickGo4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpQuickGo4MbMenuDialog = { +struct menudialogdef g_MpQuickGo4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MISC_460, // "Quick Go" g_MpQuickGo4MbMenuItems, @@ -298,7 +298,7 @@ struct menuitem g_MpConfirmChallenge4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpConfirmChallenge4MbMenuDialog = { +struct menudialogdef g_MpConfirmChallenge4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&func0f17e318, g_MpConfirmChallenge4MbMenuItems, @@ -312,7 +312,7 @@ struct menuitem g_MpChallenges4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpChallenges4MbMenuDialog = { +struct menudialogdef g_MpChallenges4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_050, // "Combat Challenges" g_MpChallenges4MbMenuItems, @@ -332,7 +332,7 @@ struct menuitem g_MainMenu4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MainMenu4MbMenuDialog = { +struct menudialogdef g_MainMenu4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_302, // "Small but Perfect Menu" g_MainMenu4MbMenuItems, @@ -348,7 +348,7 @@ struct menuitem g_MpDropOut4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpDropOut4MbMenuDialog = { +struct menudialogdef g_MpDropOut4MbMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_195, // "Drop Out" g_MpDropOut4MbMenuItems, @@ -364,7 +364,7 @@ struct menuitem g_UnusedAbortMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_UnusedAbortMenuDialog = { +struct menudialogdef g_UnusedAbortMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_052, // "Abort" g_UnusedAbortMenuItems, @@ -382,7 +382,7 @@ struct menuitem g_MpEditSimulant4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpEditSimulant4MbMenuDialog = { +struct menudialogdef g_MpEditSimulant4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&mpMenuTitleEditSimulant, g_MpEditSimulant4MbMenuItems, @@ -409,7 +409,7 @@ struct menuitem g_AdvancedSetup4MbMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_AdvancedSetup4MbMenuDialog = { +struct menudialogdef g_AdvancedSetup4MbMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_017, // "Game Setup" g_AdvancedSetup4MbMenuItems, diff --git a/src/game/mainmenu.c b/src/game/mainmenu.c index 0bec936f7..65d9c74df 100644 --- a/src/game/mainmenu.c +++ b/src/game/mainmenu.c @@ -32,9 +32,9 @@ u8 g_InventoryWeapon; -struct menudialog g_2PMissionControlStyleMenuDialog; -struct menudialog g_CiControlPlayer2MenuDialog; -struct menudialog g_CinemaMenuDialog; +struct menudialogdef g_2PMissionControlStyleMenuDialog; +struct menudialogdef g_CiControlPlayer2MenuDialog; +struct menudialogdef g_CinemaMenuDialog; char *menuTextCurrentStageName(struct menuitem *item) { @@ -693,11 +693,11 @@ s32 menuhandlerSfxVolume(s32 operation, struct menuitem *item, union handlerdata return 0; } -s32 menudialogBriefing(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogBriefing(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe - && g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { struct menuinputs *inputs = data->dialog2.inputs; if (inputs->start) { @@ -716,7 +716,7 @@ struct menuitem g_PreAndPostMissionBriefingMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PreAndPostMissionBriefingMenuDialog = { +struct menudialogdef g_PreAndPostMissionBriefingMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_247, // "Briefing" g_PreAndPostMissionBriefingMenuItems, @@ -781,9 +781,9 @@ s32 menuhandlerAcceptMission(s32 operation, struct menuitem *item, union handler return 0; } -char *soloMenuTitleStageOverview(struct menudialog *dialog) +char *soloMenuTitleStageOverview(struct menudialogdef *dialogdef) { - if (dialog != g_Menus[g_MpPlayerNum].curframe->dialog) { + if (dialogdef != g_Menus[g_MpPlayerNum].curdialog->definition) { return langGet(L_OPTIONS_273); // "Overview" } @@ -794,7 +794,7 @@ char *soloMenuTitleStageOverview(struct menudialog *dialog) return g_StringPointer; } -s32 menudialog00103608(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog00103608(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -819,7 +819,7 @@ struct menuitem g_AcceptMissionMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_AcceptMissionMenuDialog = { +struct menudialogdef g_AcceptMissionMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&soloMenuTitleStageOverview, g_AcceptMissionMenuItems, @@ -897,7 +897,7 @@ struct menuitem g_PdModeSettingsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PdModeSettingsMenuDialog = { +struct menudialogdef g_PdModeSettingsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_221, // "Perfect Dark" g_PdModeSettingsMenuItems, @@ -1576,7 +1576,7 @@ struct menuitem g_SoloMissionDifficultyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SoloMissionDifficultyMenuDialog = { +struct menudialogdef g_SoloMissionDifficultyMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_248, // "Select Difficulty" g_SoloMissionDifficultyMenuItems, @@ -1630,7 +1630,7 @@ s32 getMaxAiBuddies(void) } #endif -s32 menudialogCoopAntiOptions(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogCoopAntiOptions(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { #if VERSION >= VERSION_NTSC_1_0 if (operation == MENUOP_OPEN) { @@ -1643,8 +1643,7 @@ s32 menudialogCoopAntiOptions(s32 operation, struct menudialog *dialog, union ha #endif if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe && - g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { struct menuinputs *inputs = data->dialog2.inputs; if (inputs->start) { @@ -1961,7 +1960,7 @@ struct menuitem g_CoopOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, // "" }; -struct menudialog g_CoopOptionsMenuDialog = { +struct menudialogdef g_CoopOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_255, // "Co-Operative Options" g_CoopOptionsMenuItems, @@ -2014,7 +2013,7 @@ struct menuitem g_AntiOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_AntiOptionsMenuDialog = { +struct menudialogdef g_AntiOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_266, // "Counter-Operative Options" g_AntiOptionsMenuItems, @@ -2053,7 +2052,7 @@ struct menuitem g_CoopMissionDifficultyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CoopMissionDifficultyMenuDialog = { +struct menudialogdef g_CoopMissionDifficultyMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_248, // "Select Difficulty" g_CoopMissionDifficultyMenuItems, @@ -2085,7 +2084,7 @@ struct menuitem g_AntiMissionDifficultyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_AntiMissionDifficultyMenuDialog = { +struct menudialogdef g_AntiMissionDifficultyMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_248, // "Select Difficulty" g_AntiMissionDifficultyMenuItems, @@ -4140,7 +4139,7 @@ glabel var7f1ad0fcnb ); #endif -s32 menudialog0010559c(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog0010559c(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -4174,7 +4173,7 @@ struct menuitem g_2PMissionBreifingVMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SoloMissionBriefingMenuDialog = { +struct menudialogdef g_SoloMissionBriefingMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_247, // "Briefing" g_MissionBriefingMenuItems, @@ -4183,7 +4182,7 @@ struct menudialog g_SoloMissionBriefingMenuDialog = { NULL, }; -struct menudialog g_2PMissionBriefingHMenuDialog = { +struct menudialogdef g_2PMissionBriefingHMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_247, // "Briefing" g_MissionBriefingMenuItems, @@ -4192,7 +4191,7 @@ struct menudialog g_2PMissionBriefingHMenuDialog = { NULL, }; -struct menudialog g_2PMissionBriefingVMenuDialog = { +struct menudialogdef g_2PMissionBriefingVMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_247, // "Briefing" g_2PMissionBreifingVMenuItems, @@ -4268,7 +4267,7 @@ struct menuitem g_2PMissionControlStyleMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_2PMissionControlStyleMenuDialog = { +struct menudialogdef g_2PMissionControlStyleMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_236, // "Control" g_2PMissionControlStyleMenuItems, @@ -4283,7 +4282,7 @@ struct menuitem g_SoloMissionControlStyleMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SoloMissionControlStyleMenuDialog = { +struct menudialogdef g_SoloMissionControlStyleMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_236, // "Control" g_SoloMissionControlStyleMenuItems, @@ -4298,7 +4297,7 @@ struct menuitem g_CiControlStyleMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiControlStyleMenuDialog = { +struct menudialogdef g_CiControlStyleMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_236, // "Control" g_CiControlStyleMenuItems, @@ -4313,7 +4312,7 @@ struct menuitem g_CiControlStylePlayer2MenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiControlStylePlayer2MenuDialog = { +struct menudialogdef g_CiControlStylePlayer2MenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_236, // "Control" g_CiControlStylePlayer2MenuItems, @@ -4337,7 +4336,7 @@ struct menuitem g_AudioOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_AudioOptionsMenuDialog = { +struct menudialogdef g_AudioOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_227, // "Audio Options" g_AudioOptionsMenuItems, @@ -4361,7 +4360,7 @@ struct menuitem g_2PMissionAudioOptionsVMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_2PMissionAudioOptionsVMenuDialog = { +struct menudialogdef g_2PMissionAudioOptionsVMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_227, // "Audio Options" g_2PMissionAudioOptionsVMenuItems, @@ -4396,7 +4395,7 @@ struct menuitem g_2PMissionVideoOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_VideoOptionsMenuDialog = { +struct menudialogdef g_VideoOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_214, // "Video Options" g_VideoOptionsMenuItems, @@ -4405,7 +4404,7 @@ struct menudialog g_VideoOptionsMenuDialog = { NULL, }; -struct menudialog g_2PMissionVideoOptionsMenuDialog = { +struct menudialogdef g_2PMissionVideoOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_214, // "Video Options" g_2PMissionVideoOptionsMenuItems, @@ -4429,7 +4428,7 @@ struct menuitem g_MissionDisplayOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MissionDisplayOptionsMenuDialog = { +struct menudialogdef g_MissionDisplayOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_203, // "Display Options" g_MissionDisplayOptionsMenuItems, @@ -4458,7 +4457,7 @@ struct menuitem g_2PMissionDisplayOptionsVMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_2PMissionDisplayOptionsVMenuDialog = { +struct menudialogdef g_2PMissionDisplayOptionsVMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_203, // "Display Options" g_2PMissionDisplayOptionsVMenuItems, @@ -4482,9 +4481,9 @@ struct menuitem g_CiDisplayMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiDisplayPlayer2MenuDialog; +struct menudialogdef g_CiDisplayPlayer2MenuDialog; -struct menudialog g_CiDisplayMenuDialog = { +struct menudialogdef g_CiDisplayMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_203, // "Display Options" g_CiDisplayMenuItems, @@ -4508,7 +4507,7 @@ struct menuitem g_CiDisplayPlayer2MenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiDisplayPlayer2MenuDialog = { +struct menudialogdef g_CiDisplayPlayer2MenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_204, // "Display Player 2" g_CiDisplayPlayer2MenuItems, @@ -4529,7 +4528,7 @@ struct menuitem g_MissionControlOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MissionControlOptionsMenuDialog = { +struct menudialogdef g_MissionControlOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_192, // "Control Options" g_MissionControlOptionsMenuItems, @@ -4551,7 +4550,7 @@ struct menuitem g_CiControlOptionsMenuItems2[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiControlOptionsMenuDialog2 = { +struct menudialogdef g_CiControlOptionsMenuDialog2 = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_192, // "Control Options" g_CiControlOptionsMenuItems2, @@ -4573,7 +4572,7 @@ struct menuitem g_CiControlOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiControlOptionsMenuDialog = { +struct menudialogdef g_CiControlOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_192, // "Control Options" g_CiControlOptionsMenuItems, @@ -4594,7 +4593,7 @@ struct menuitem g_CiControlPlayer2MenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiControlPlayer2MenuDialog = { +struct menudialogdef g_CiControlPlayer2MenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_193, // "Control Player 2" g_CiControlPlayer2MenuItems, @@ -4610,7 +4609,7 @@ struct menuitem g_ChangeAgentMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_ChangeAgentMenuDialog = { +struct menudialogdef g_ChangeAgentMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_188, // "Warning" g_ChangeAgentMenuItems, @@ -4661,7 +4660,7 @@ struct menuitem g_CiOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SoloMissionOptionsMenuDialog = { +struct menudialogdef g_SoloMissionOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_180, // "Options" g_SoloMissionOptionsMenuItems, @@ -4670,7 +4669,7 @@ struct menudialog g_SoloMissionOptionsMenuDialog = { &g_SoloMissionBriefingMenuDialog, }; -struct menudialog g_CiOptionsViaPcMenuDialog = { +struct menudialogdef g_CiOptionsViaPcMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_180, // "Options" g_CiOptionsMenuItems, @@ -4679,7 +4678,7 @@ struct menudialog g_CiOptionsViaPcMenuDialog = { NULL, }; -struct menudialog g_CiOptionsViaPauseMenuDialog = { +struct menudialogdef g_CiOptionsViaPauseMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_180, // "Options" g_CiOptionsMenuItems, @@ -4688,7 +4687,7 @@ struct menudialog g_CiOptionsViaPauseMenuDialog = { NULL, }; -struct menudialog g_2PMissionOptionsHMenuDialog = { +struct menudialogdef g_2PMissionOptionsHMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_180, // "Options" g_2PMissionOptionsHMenuItems, @@ -4697,7 +4696,7 @@ struct menudialog g_2PMissionOptionsHMenuDialog = { &g_2PMissionBriefingHMenuDialog, }; -struct menudialog g_2PMissionOptionsVMenuDialog = { +struct menudialogdef g_2PMissionOptionsVMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_180, // "Options" g_2PMissionOptionsVMenuItems, @@ -4708,10 +4707,6 @@ struct menudialog g_2PMissionOptionsVMenuDialog = { u8 var80072d88 = 255; -//-----------------------------------------------------------------------------\ -// @dialog Inventory ----------------------------------------------------------/ -//----------------------------------------------------------------------------/ - char *invMenuTextPrimaryFunction(struct menuitem *item) { struct weaponfunc *primaryfunc = weaponGetFunctionById(g_InventoryWeapon, 0); @@ -4890,10 +4885,10 @@ void func0f105948(s32 weaponnum) } } -s32 inventoryMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 inventoryMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe && g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { g_Menus[g_MpPlayerNum].unkdb4 -= g_Vars.diffframe60; g_Menus[g_MpPlayerNum].unkd8c = 18.849555969238f * var80061630; g_Menus[g_MpPlayerNum].unkd64 = 18.849555969238f * var80061630; @@ -5676,7 +5671,7 @@ struct menuitem g_FrWeaponsAvailableMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SoloMissionInventoryMenuDialog = { +struct menudialogdef g_SoloMissionInventoryMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_178, // "Inventory" g_SoloMissionInventoryMenuItems, @@ -5685,7 +5680,7 @@ struct menudialog g_SoloMissionInventoryMenuDialog = { &g_SoloMissionOptionsMenuDialog, }; -struct menudialog g_FrWeaponsAvailableMenuDialog = { +struct menudialogdef g_FrWeaponsAvailableMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_179, // "Weapons Available" g_FrWeaponsAvailableMenuItems, @@ -5696,10 +5691,6 @@ struct menudialog g_FrWeaponsAvailableMenuDialog = { u32 var80073544 = 0; -//-----------------------------------------------------------------------------\ -// @dialog SoloAbort ----------------------------------------------------------/ -//----------------------------------------------------------------------------/ - s32 menuhandlerAbortMission(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_SET) { @@ -5710,7 +5701,7 @@ s32 menuhandlerAbortMission(s32 operation, struct menuitem *item, union handlerd return 0; } -s32 menudialogAbortMission(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogAbortMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { // empty @@ -5726,7 +5717,7 @@ struct menuitem g_MissionAbortMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MissionAbortMenuDialog = { +struct menudialogdef g_MissionAbortMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_174, // "Warning" g_MissionAbortMenuItems, @@ -5742,7 +5733,7 @@ struct menuitem g_2PMissionAbortVMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_2PMissionAbortVMenuDialog = { +struct menudialogdef g_2PMissionAbortVMenuDialog = { MENUDIALOGTYPE_DANGER, L_OPTIONS_174, // "Warning" g_2PMissionAbortVMenuItems, @@ -5751,11 +5742,7 @@ struct menudialog g_2PMissionAbortVMenuDialog = { NULL, }; -//-----------------------------------------------------------------------------\ -// @dialog SoloPauseStatus ----------------------------------------------------/ -//----------------------------------------------------------------------------/ - -s32 soloMenuDialogPauseStatus(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 soloMenuDialogPauseStatus(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { struct briefingobj *briefing = g_BriefingObjs; @@ -5797,9 +5784,9 @@ s32 soloMenuDialogPauseStatus(s32 operation, struct menudialog *dialog, union ha return 0; } -char *soloMenuTitlePauseStatus(struct menudialog *dialog) +char *soloMenuTitlePauseStatus(struct menudialogdef *dialogdef) { - if (dialog != g_Menus[g_MpPlayerNum].curframe->dialog) { + if (dialogdef != g_Menus[g_MpPlayerNum].curdialog->definition) { return langGet(L_OPTIONS_172); // "Status" } @@ -5822,7 +5809,7 @@ struct menuitem g_MissionPauseMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SoloMissionPauseMenuDialog = { +struct menudialogdef g_SoloMissionPauseMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&soloMenuTitlePauseStatus, g_MissionPauseMenuItems, @@ -5831,7 +5818,7 @@ struct menudialog g_SoloMissionPauseMenuDialog = { &g_SoloMissionInventoryMenuDialog, }; -struct menudialog g_2PMissionPauseHMenuDialog = { +struct menudialogdef g_2PMissionPauseHMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&soloMenuTitlePauseStatus, g_MissionPauseMenuItems, @@ -5840,7 +5827,7 @@ struct menudialog g_2PMissionPauseHMenuDialog = { &g_2PMissionInventoryHMenuDialog, }; -struct menudialog g_2PMissionPauseVMenuDialog = { +struct menudialogdef g_2PMissionPauseVMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_172, // "Status" g_2PMissionPauseVMenuItems, @@ -5849,10 +5836,6 @@ struct menudialog g_2PMissionPauseVMenuDialog = { &g_2PMissionInventoryVMenuDialog, }; -//-----------------------------------------------------------------------------\ -// @dialog Cinema -------------------------------------------------------------/ -//----------------------------------------------------------------------------/ - struct cutscene g_Cutscenes[] = { // stage ID, mission, scene, name { /* 0*/ STAGE_DEFECTION, 0, 0, L_OPTIONS_450 }, @@ -6043,7 +6026,7 @@ struct menuitem g_CinemaMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CinemaMenuDialog = { +struct menudialogdef g_CinemaMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_490, // "Cinema" g_CinemaMenuItems, @@ -6052,16 +6035,12 @@ struct menudialog g_CinemaMenuDialog = { NULL, }; -//-----------------------------------------------------------------------------\ -// @dialog SelectMission ------------------------------------------------------/ -//----------------------------------------------------------------------------/ - struct menuitem g_SelectMissionMenuItems[] = { { MENUITEMTYPE_LIST, 0, 0x00200000, 0x000000eb, 0x00000000, menuhandler0010476c }, { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_SelectMissionMenuDialog = { +struct menudialogdef g_SelectMissionMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_122, // "Mission Select" g_SelectMissionMenuItems, @@ -6070,10 +6049,6 @@ struct menudialog g_SelectMissionMenuDialog = { NULL, }; -//-----------------------------------------------------------------------------\ -// @dialog MainMenu -----------------------------------------------------------/ -//----------------------------------------------------------------------------/ - s32 menuhandlerMainMenuSoloMissions(s32 operation, struct menuitem *item, union handlerdata *data) { if (operation == MENUOP_SET) { @@ -6134,15 +6109,15 @@ s32 menuhandlerMainMenuCounterOperative(s32 operation, struct menuitem *item, un return 0; } -s32 menudialogMainMenu(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: g_Menus[g_MpPlayerNum].main.unke2c = 0; break; case MENUOP_TICK: - if (g_Menus[g_MpPlayerNum].curframe && - g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog && + g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { g_MissionConfig.iscoop = false; g_MissionConfig.isanti = false; } @@ -6185,7 +6160,7 @@ struct menuitem g_MainMenuMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CiMenuViaPcMenuDialog = { +struct menudialogdef g_CiMenuViaPcMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_116, // "Perfect Menu" g_MainMenuMenuItems, @@ -6194,7 +6169,7 @@ struct menudialog g_CiMenuViaPcMenuDialog = { &g_CiOptionsViaPcMenuDialog, }; -struct menudialog g_CiMenuViaPauseMenuDialog = { +struct menudialogdef g_CiMenuViaPauseMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_OPTIONS_116, // "Perfect Menu" g_MainMenuMenuItems, diff --git a/src/game/menu/items.c b/src/game/menu/items.c index f4dbc5cbe..25d0853d9 100644 --- a/src/game/menu/items.c +++ b/src/game/menu/items.c @@ -62,7 +62,7 @@ s32 func0f0e5ce0(s32 value) } GLOBAL_ASM( -glabel func0f0e5d2c +glabel menuitem0f0e5d2c /* f0e5d2c: 27bdffa0 */ addiu $sp,$sp,-96 /* f0e5d30: afbf002c */ sw $ra,0x2c($sp) /* f0e5d34: afb50028 */ sw $s5,0x28($sp) @@ -196,7 +196,7 @@ glabel func0f0e5d2c ); GLOBAL_ASM( -glabel func0f0e5ef8 +glabel menuitem0f0e5ef8 /* f0e5ef8: 27bdffb0 */ addiu $sp,$sp,-80 /* f0e5efc: afbf002c */ sw $ra,0x2c($sp) /* f0e5f00: afb50028 */ sw $s5,0x28($sp) @@ -288,7 +288,7 @@ glabel func0f0e5ef8 #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel func0f0e6038 +glabel menuitem0f0e6038 /* f0e6038: 27bdffb0 */ addiu $sp,$sp,-80 /* f0e603c: afb10038 */ sw $s1,0x38($sp) /* f0e6040: 8fb1006c */ lw $s1,0x6c($sp) @@ -450,7 +450,7 @@ glabel func0f0e6038 ); #else GLOBAL_ASM( -glabel func0f0e6038 +glabel menuitem0f0e6038 /* f0e34c8: 27bdffb0 */ addiu $sp,$sp,-80 /* f0e34cc: afb10038 */ sw $s1,0x38($sp) /* f0e34d0: 8fb1006c */ lw $s1,0x6c($sp) @@ -606,7 +606,7 @@ glabel func0f0e6038 ); #endif -Gfx *menuRenderOverlayList(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2) +Gfx *menuitemListOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2) { gDPFillRectangleScaled(gdl++, x, y, x + x2, y + y2); return gdl; @@ -614,7 +614,7 @@ Gfx *menuRenderOverlayList(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2) #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel menuRenderItemList +glabel menuitemListRender /* f0e6328: 27bdfe90 */ addiu $sp,$sp,-368 /* f0e632c: afbf005c */ sw $ra,0x5c($sp) /* f0e6330: afbe0058 */ sw $s8,0x58($sp) @@ -964,7 +964,7 @@ glabel menuRenderItemList /* f0e6840: 870b0000 */ lh $t3,0x0($t8) /* f0e6844: 8e250008 */ lw $a1,0x8($s1) /* f0e6848: 01762023 */ subu $a0,$t3,$s6 -/* f0e684c: 0fc3974b */ jal func0f0e5d2c +/* f0e684c: 0fc3974b */ jal menuitem0f0e5d2c /* f0e6850: 00808025 */ or $s0,$a0,$zero /* f0e6854: 862a0002 */ lh $t2,0x2($s1) /* f0e6858: 0040a825 */ or $s5,$v0,$zero @@ -978,7 +978,7 @@ glabel menuRenderItemList /* f0e6878: 00409025 */ or $s2,$v0,$zero /* f0e687c: 02a09825 */ or $s3,$s5,$zero /* f0e6880: 01802025 */ or $a0,$t4,$zero -/* f0e6884: 0fc397be */ jal func0f0e5ef8 +/* f0e6884: 0fc397be */ jal menuitem0f0e5ef8 /* f0e6888: 8e250008 */ lw $a1,0x8($s1) /* f0e688c: 8fb9016c */ lw $t9,0x16c($sp) /* f0e6890: 00567021 */ addu $t6,$v0,$s6 @@ -1065,7 +1065,7 @@ glabel menuRenderItemList /* f0e69c4: afad0010 */ sw $t5,0x10($sp) /* f0e69c8: 8e2e0010 */ lw $t6,0x10($s1) /* f0e69cc: 02402025 */ or $a0,$s2,$zero -/* f0e69d0: 0fc3980e */ jal func0f0e6038 +/* f0e69d0: 0fc3980e */ jal menuitem0f0e6038 /* f0e69d4: afae001c */ sw $t6,0x1c($sp) /* f0e69d8: 240f0001 */ addiu $t7,$zero,0x1 /* f0e69dc: 00409025 */ or $s2,$v0,$zero @@ -1202,7 +1202,7 @@ glabel menuRenderItemList /* f0e6bbc: 01f43021 */ addu $a2,$t7,$s4 /* f0e6bc0: 0006c400 */ sll $t8,$a2,0x10 /* f0e6bc4: 00183403 */ sra $a2,$t8,0x10 -/* f0e6bc8: 0fc3980e */ jal func0f0e6038 +/* f0e6bc8: 0fc3980e */ jal menuitem0f0e6038 /* f0e6bcc: afb9001c */ sw $t9,0x1c($sp) /* f0e6bd0: 8fad014c */ lw $t5,0x14c($sp) /* f0e6bd4: 8fac0100 */ lw $t4,0x100($sp) @@ -1888,7 +1888,7 @@ glabel menuRenderItemList ); #else GLOBAL_ASM( -glabel menuRenderItemList +glabel menuitemListRender /* f0e37a0: 27bdfe90 */ addiu $sp,$sp,-368 /* f0e37a4: afbf0064 */ sw $ra,0x64($sp) /* f0e37a8: afbe0060 */ sw $s8,0x60($sp) @@ -2157,7 +2157,7 @@ glabel menuRenderItemList /* f0e3b9c: 85ae0000 */ lh $t6,0x0($t5) /* f0e3ba0: 8e250008 */ lw $a1,0x8($s1) /* f0e3ba4: 01d22023 */ subu $a0,$t6,$s2 -/* f0e3ba8: 0fc38c6f */ jal func0f0e5d2c +/* f0e3ba8: 0fc38c6f */ jal menuitem0f0e5d2c /* f0e3bac: 00808025 */ or $s0,$a0,$zero /* f0e3bb0: 862f0002 */ lh $t7,0x2($s1) /* f0e3bb4: 00409825 */ or $s3,$v0,$zero @@ -2171,7 +2171,7 @@ glabel menuRenderItemList /* f0e3bd4: 0040a025 */ or $s4,$v0,$zero /* f0e3bd8: 0260a825 */ or $s5,$s3,$zero /* f0e3bdc: 01802025 */ or $a0,$t4,$zero -/* f0e3be0: 0fc38ce2 */ jal func0f0e5ef8 +/* f0e3be0: 0fc38ce2 */ jal menuitem0f0e5ef8 /* f0e3be4: 8e250008 */ lw $a1,0x8($s1) /* f0e3be8: 8fb9016c */ lw $t9,0x16c($sp) /* f0e3bec: 00525021 */ addu $t2,$v0,$s2 @@ -2256,7 +2256,7 @@ glabel menuRenderItemList /* f0e3d18: afb80010 */ sw $t8,0x10($sp) /* f0e3d1c: 8e2a0010 */ lw $t2,0x10($s1) /* f0e3d20: 02802025 */ or $a0,$s4,$zero -/* f0e3d24: 0fc38d32 */ jal func0f0e6038 +/* f0e3d24: 0fc38d32 */ jal menuitem0f0e6038 /* f0e3d28: afaa001c */ sw $t2,0x1c($sp) /* f0e3d2c: 240b0001 */ addiu $t3,$zero,0x1 /* f0e3d30: 0040a025 */ or $s4,$v0,$zero @@ -2392,7 +2392,7 @@ glabel menuRenderItemList /* f0e3f0c: 01763021 */ addu $a2,$t3,$s6 /* f0e3f10: 00066c00 */ sll $t5,$a2,0x10 /* f0e3f14: 000d3403 */ sra $a2,$t5,0x10 -/* f0e3f18: 0fc38d32 */ jal func0f0e6038 +/* f0e3f18: 0fc38d32 */ jal menuitem0f0e6038 /* f0e3f1c: afb9001c */ sw $t9,0x1c($sp) /* f0e3f20: 8fb8014c */ lw $t8,0x14c($sp) /* f0e3f24: 8fac0100 */ lw $t4,0x100($sp) @@ -2956,7 +2956,7 @@ glabel menuRenderItemList ); #endif -bool menuTickItemList(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data) +bool menuitemListTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data) { f32 f0; union handlerdata handlerdata; @@ -2985,7 +2985,7 @@ bool menuTickItemList(struct menuitem *item, struct menuinputs *inputs, u32 arg2 min = min / (s32)g_LineHeight; min *= (s32)g_LineHeight; - data->list.unk04 = func0f0e5ef8(data->list.unk02, item); + data->list.unk04 = menuitem0f0e5ef8(data->list.unk02, item); if (data->list.unk04 < min) { data->list.unk04 = min; @@ -3027,7 +3027,7 @@ bool menuTickItemList(struct menuitem *item, struct menuinputs *inputs, u32 arg2 if (data->list.unk02 > last) { data->list.unk02 = last; - data->list.unk04 = func0f0e5ef8(data->list.unk02, item); + data->list.unk04 = menuitem0f0e5ef8(data->list.unk02, item); } if (inputs->updown) { @@ -3042,7 +3042,7 @@ bool menuTickItemList(struct menuitem *item, struct menuinputs *inputs, u32 arg2 data->list.unk02 = 0; } - data->list.unk04 = func0f0e5ef8(data->list.unk02, item); + data->list.unk04 = menuitem0f0e5ef8(data->list.unk02, item); if (prev2 != data->list.unk02) { handlerdata.list.value = data->list.unk02; @@ -3083,13 +3083,13 @@ bool menuTickItemList(struct menuitem *item, struct menuinputs *inputs, u32 arg2 if (handlerdata.list.unk0c != handlerdata.list.value) { data->list.unk02 = handlerdata.list.value; - data->list.unk04 = func0f0e5ef8(data->list.unk02, item); + data->list.unk04 = menuitem0f0e5ef8(data->list.unk02, item); } return true; } -void menuInitItemDropdown(struct menuitem *item, union menuitemdata *data) +void menuitemDropdownInit(struct menuitem *item, union menuitemdata *data) { s32 (*handler)(s32 operation, struct menuitem *item, union handlerdata *data); union handlerdata handlerdata; @@ -3126,13 +3126,13 @@ void menuInitItemDropdown(struct menuitem *item, union menuitemdata *data) data->dropdown.unk02 = handlerdata.dropdown.value; } - data->dropdown.unk04 = func0f0e5ef8(data->dropdown.unk02, item); + data->dropdown.unk04 = menuitem0f0e5ef8(data->dropdown.unk02, item); item->handler(MENUOP_LISTITEMFOCUS, item, &handlerdata); } GLOBAL_ASM( -glabel menuRenderItemDropdown +glabel menuitemDropdownRender /* f0e7a8c: 27bdff80 */ addiu $sp,$sp,-128 /* f0e7a90: afbf003c */ sw $ra,0x3c($sp) /* f0e7a94: afb10038 */ sw $s1,0x38($sp) @@ -3587,35 +3587,35 @@ glabel menuRenderItemDropdown /* f0e8134: 27bd0080 */ addiu $sp,$sp,0x80 ); -bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) +bool menuitemDropdownTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) { u32 stack; if ((arg3 & 2) && item->handler) { - if (frame->dimmed && item == frame->focuseditem) { - menuTickItemList(item, inputs, arg3, data); + if (dialog->dimmed && item == dialog->focuseditem) { + menuitemListTick(item, inputs, arg3, data); if (mpIsPlayerLockedOut(g_MpPlayerNum)) { - if ((item->flags & MENUITEMFLAG_00040000) || (frame->dialog->unk10 & 0x10)) { - frame->dimmed = false; + if ((item->flags & MENUITEMFLAG_00040000) || (dialog->definition->unk10 & 0x10)) { + dialog->dimmed = false; } } } - if (inputs->back && frame->dimmed) { - frame->dimmed = false; + if (inputs->back && dialog->dimmed) { + dialog->dimmed = false; inputs->back = false; menuPlaySound(MENUSOUND_TOGGLEOFF); } if (inputs->select) { - if (frame->dimmed) { - frame->dimmed = false; + if (dialog->dimmed) { + dialog->dimmed = false; } else { union handlerdata handlerdata; - frame->dimmed = true; - menuInitItemDropdown(item, data); + dialog->dimmed = true; + menuitemDropdownInit(item, data); handlerdata.dropdown.value = 0; item->handler(MENUOP_GETOPTIONVALUE, item, &handlerdata); @@ -3630,7 +3630,7 @@ bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel menuRenderOverlayDropdown +glabel menuitemDropdownOverlay /* f0e8290: 27bdff60 */ addiu $sp,$sp,-160 /* f0e8294: afb0001c */ sw $s0,0x1c($sp) /* f0e8298: 8fb000b8 */ lw $s0,0xb8($sp) @@ -3808,7 +3808,7 @@ glabel menuRenderOverlayDropdown /* f0e8518: a7a8006e */ sh $t0,0x6e($sp) .L0f0e851c: /* f0e851c: 8fa400a0 */ lw $a0,0xa0($sp) -/* f0e8520: 0fc398ca */ jal menuRenderItemList +/* f0e8520: 0fc398ca */ jal menuitemListRender /* f0e8524: 27a5006c */ addiu $a1,$sp,0x6c /* f0e8528: afa200a0 */ sw $v0,0xa0($sp) /* f0e852c: 8fbf003c */ lw $ra,0x3c($sp) @@ -3827,7 +3827,7 @@ glabel menuRenderOverlayDropdown ); #else GLOBAL_ASM( -glabel menuRenderOverlayDropdown +glabel menuitemDropdownOverlay /* f0e5428: 27bdff60 */ addiu $sp,$sp,-160 /* f0e542c: afb0001c */ sw $s0,0x1c($sp) /* f0e5430: 8fb000b8 */ lw $s0,0xb8($sp) @@ -3994,7 +3994,7 @@ glabel menuRenderOverlayDropdown /* f0e568c: a7af006e */ sh $t7,0x6e($sp) .NB0f0e5690: /* f0e5690: 8fa400a0 */ lw $a0,0xa0($sp) -/* f0e5694: 0fc38de8 */ jal menuRenderItemList +/* f0e5694: 0fc38de8 */ jal menuitemListRender /* f0e5698: 27a5006c */ addiu $a1,$sp,0x6c /* f0e569c: afa200a0 */ sw $v0,0xa0($sp) /* f0e56a0: 8fbf003c */ lw $ra,0x3c($sp) @@ -4015,7 +4015,7 @@ glabel menuRenderOverlayDropdown // Mismatch due to register initialisation order near 380. // 0x14 (MENUOP_GETOPTIONHEIGHT) is loaded into a0 earlier than it should be. -//Gfx *menuRenderOverlayDropdown(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menuframe *frame, union menuitemdata *data) +//Gfx *menuitemDropdownOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menudialog *dialog, union menuitemdata *data) //{ // s32 stack; // s32 textwidth; // 98 @@ -4027,7 +4027,7 @@ glabel menuRenderOverlayDropdown // struct menurendercontext context; // 6c // // // 2e0 -// if (frame->unk6e) { +// if (dialog->unk6e) { // context.x = x + 78; // } else if (x2 < 0) { // context.x = x + 2; @@ -4045,11 +4045,11 @@ glabel menuRenderOverlayDropdown // context.width = 56; // context.item = item; // context.focused = true; -// context.frame = frame; +// context.dialog = dialog; // context.data = data; // // // 360 -// if (frame->dimmed && item->handler && frame->focuseditem == item) { +// if (dialog->dimmed && item->handler && dialog->focuseditem == item) { // // 380 // union handlerdata handlerdata; // 5c // @@ -4086,27 +4086,27 @@ glabel menuRenderOverlayDropdown // } // // // 4a4 -// if (context.y + context.height > frame->y + frame->height + 2) { +// if (context.y + context.height > dialog->y + dialog->height + 2) { // // 4d0 -// if (context.height > frame->height) { -// i = frame->height; +// if (context.height > dialog->height) { +// i = dialog->height; // i = i / g_LineHeight; // i = i * g_LineHeight; // context.height = i; // } // // // 50c -// context.y = frame->y + frame->height - context.height + 2; +// context.y = dialog->y + dialog->height - context.height + 2; // } // // // 51c -// gdl = menuRenderItemList(gdl, &context); +// gdl = menuitemListRender(gdl, &context); // } // // return gdl; //} -bool menuIsStringEmptyOrSpaces(char *text) +bool menuitemKeyboardIsStringEmptyOrSpaces(char *text) { s32 i; @@ -4141,7 +4141,7 @@ bool menuIsStringEmptyOrSpaces(char *text) * | DEL | CAPS | CANCEL | OK | * +-------+-----------+-----------+-------+ */ -Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemKeyboardRender(Gfx *gdl, struct menurendercontext *context) { char label[8]; s32 x; @@ -4162,8 +4162,8 @@ Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *context) label[2] = '\0'; func0f153e38( - g_MenuColourPalettes3[context->frame->type].unfocused, - g_MenuColourPalettes2[context->frame->type].unfocused); + g_MenuColourPalettes3[context->dialog->type].unfocused, + g_MenuColourPalettes2[context->dialog->type].unfocused); // Draw input field background gdl = gfxSetPrimColour(gdl, 0x0000ff7f); @@ -4193,13 +4193,13 @@ Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *context) // Render cursor alpha = func0f006b08(40) * 255; - if (context->frame->transitiontimer < 0) { - cursorcolour = g_MenuColourPalettes[context->frame->type].focused; + if (context->dialog->transitiontimer < 0) { + cursorcolour = g_MenuColourPalettes[context->dialog->type].focused; } else { cursorcolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].focused, - g_MenuColourPalettes[context->frame->type].focused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].focused, + g_MenuColourPalettes[context->dialog->type].focused, + context->dialog->colourweight); } cursorcolour = colourBlend(colourBlend(0x0000ffff, 0x000000ff, 127), cursorcolour, alpha); @@ -4235,16 +4235,16 @@ Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *context) for (col = 0; col < 10; col++) { for (row = 0; row < 5; row++) { - if (context->frame->transitiontimer < 0) { - textcolour = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + textcolour = g_MenuColourPalettes[context->dialog->type].unfocused; } else { textcolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { textcolour = colourBlend(textcolour, 0x00000000, 127) & 0xffffff00 | textcolour & 0xff; } @@ -4257,13 +4257,13 @@ Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *context) if (col == data->col && row == data->row) { alpha = func0f006b08(40) * 255; - if (context->frame->transitiontimer < 0) { - tmpcolour = g_MenuColourPalettes[context->frame->type].focused; + if (context->dialog->transitiontimer < 0) { + tmpcolour = g_MenuColourPalettes[context->dialog->type].focused; } else { tmpcolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].focused, - g_MenuColourPalettes[context->frame->type].focused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].focused, + g_MenuColourPalettes[context->dialog->type].focused, + context->dialog->colourweight); } textcolour = colourBlend(colourBlend(textcolour, textcolour & 0xff, 127), tmpcolour, alpha); @@ -4310,31 +4310,31 @@ Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *context) x = (buttonwidth - textwidth) / 2 + x; // Dim the OK button if string is empty - if (index == 3 && menuIsStringEmptyOrSpaces(data->string)) { - if (context->frame->transitiontimer < 0) { - textcolour = g_MenuColourPalettes[context->frame->type].disabled; + if (index == 3 && menuitemKeyboardIsStringEmptyOrSpaces(data->string)) { + if (context->dialog->transitiontimer < 0) { + textcolour = g_MenuColourPalettes[context->dialog->type].disabled; } else { textcolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].disabled, - g_MenuColourPalettes[context->frame->type].disabled, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].disabled, + g_MenuColourPalettes[context->dialog->type].disabled, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { textcolour = colourBlend(textcolour, 0, 127) & 0xffffff00 | textcolour & 0xff; } func0f153e38( - g_MenuColourPalettes3[context->frame->type].disabled, - g_MenuColourPalettes2[context->frame->type].disabled); + g_MenuColourPalettes3[context->dialog->type].disabled, + g_MenuColourPalettes2[context->dialog->type].disabled); } gdl = textRenderProjected(gdl, &x, &y, langGet(labels[index]), g_CharsHandelGothicXs, g_FontHandelGothicXs, textcolour, context->width, context->height, 0, 0); - if (index == 3 && menuIsStringEmptyOrSpaces(data->string)) { + if (index == 3 && menuitemKeyboardIsStringEmptyOrSpaces(data->string)) { func0f153e38( - g_MenuColourPalettes3[context->frame->type].unfocused, - g_MenuColourPalettes2[context->frame->type].unfocused); + g_MenuColourPalettes3[context->dialog->type].unfocused, + g_MenuColourPalettes2[context->dialog->type].unfocused); } } } else { @@ -4403,7 +4403,7 @@ Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *context) * | DEL | CAPS | CANCEL | OK | * +-------+-----------+-----------+-------+ */ -bool menuTickItemKeyboard(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data) +bool menuitemKeyboardTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data) { struct menuitemdata_keyboard *kb = &data->keyboard; union handlerdata handlerdata; @@ -4472,7 +4472,7 @@ bool menuTickItemKeyboard(struct menuitem *item, struct menuinputs *inputs, u32 } if (inputs->start) { - if (item->handler && !menuIsStringEmptyOrSpaces(kb->string)) { + if (item->handler && !menuitemKeyboardIsStringEmptyOrSpaces(kb->string)) { menuPlaySound(MENUSOUND_SELECT); handlerdata.keyboard.string = kb->string; @@ -4500,7 +4500,7 @@ bool menuTickItemKeyboard(struct menuitem *item, struct menuinputs *inputs, u32 // OK if (kb->col == 8) { - if (item->handler && !menuIsStringEmptyOrSpaces(kb->string)) { + if (item->handler && !menuitemKeyboardIsStringEmptyOrSpaces(kb->string)) { handlerdata.keyboard.string = kb->string; item->handler(MENUOP_SETTEXT, item, &handlerdata); } @@ -4510,7 +4510,7 @@ bool menuTickItemKeyboard(struct menuitem *item, struct menuinputs *inputs, u32 if (kb->col == 8 || kb->col == 5) { s32 ok = (kb->col == 8); - if (kb->col == 5 || !menuIsStringEmptyOrSpaces(kb->string)) { + if (kb->col == 5 || !menuitemKeyboardIsStringEmptyOrSpaces(kb->string)) { menuPopDialog(); if (ok) { @@ -4603,7 +4603,7 @@ bool menuTickItemKeyboard(struct menuitem *item, struct menuinputs *inputs, u32 return true; } -void menuInitItemKeyboard(struct menuitem *item, union menuitemdata *data) +void menuitemKeyboardInit(struct menuitem *item, union menuitemdata *data) { u32 stack; s32 i; @@ -4624,17 +4624,17 @@ void menuInitItemKeyboard(struct menuitem *item, union menuitemdata *data) data->keyboard.capslock = 0; } -Gfx *menuRenderItemSeparator(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemSeparatorRender(Gfx *gdl, struct menurendercontext *context) { u32 colour; - if (context->frame->transitiontimer < 0) { - colour = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + colour = g_MenuColourPalettes[context->dialog->type].unfocused; } else { colour = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } colour = (colour & 0xffffff00) | 0x3f; @@ -4648,7 +4648,7 @@ u32 var800711e8 = 0; #if PAL GLOBAL_ASM( -glabel menuRenderObjective +glabel menuitemObjectiveRender /* f0e98ac: 27bdfed0 */ addiu $sp,$sp,-304 /* f0e98b0: 8fae0154 */ lw $t6,0x154($sp) /* f0e98b4: afbf003c */ sw $ra,0x3c($sp) @@ -5301,7 +5301,7 @@ glabel menuRenderObjective ); #elif VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel menuRenderObjective +glabel menuitemObjectiveRender /* f0e98ac: 27bdfed0 */ addiu $sp,$sp,-304 /* f0e98b0: 8fae0154 */ lw $t6,0x154($sp) /* f0e98b4: afbf003c */ sw $ra,0x3c($sp) @@ -5954,7 +5954,7 @@ glabel menuRenderObjective ); #else GLOBAL_ASM( -glabel menuRenderObjective +glabel menuitemObjectiveRender /* f0e6a20: 27bdfed0 */ addiu $sp,$sp,-304 /* f0e6a24: 8fae0154 */ lw $t6,0x154($sp) /* f0e6a28: afbf003c */ sw $ra,0x3c($sp) @@ -6607,7 +6607,7 @@ glabel menuRenderObjective ); #endif -Gfx *menuRenderItemObjectives(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemObjectivesRender(Gfx *gdl, struct menurendercontext *context) { s32 y = context->y + 5; s32 position = 1; @@ -6616,8 +6616,8 @@ Gfx *menuRenderItemObjectives(Gfx *gdl, struct menurendercontext *context) for (i = 0; i < 6; i++) { if (g_Briefing.objectivenames[i] && g_Briefing.objectivedifficulties[i] & (1 << lvGetDifficulty())) { - gdl = menuRenderObjective(gdl, - context->frame, + gdl = menuitemObjectiveRender(gdl, + context->dialog, i, position, context->x, y, context->width, context->height, context->item->param != 1, context->item->param == 2); @@ -6637,7 +6637,7 @@ Gfx *menuRenderItemObjectives(Gfx *gdl, struct menurendercontext *context) return gdl; } -Gfx *menuRenderItemModel(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemModelRender(Gfx *gdl, struct menurendercontext *context) { if (context->item->flags & MENUITEMFLAG_00200000) { struct menuitemrenderdata renderdata; @@ -6647,16 +6647,16 @@ Gfx *menuRenderItemModel(Gfx *gdl, struct menurendercontext *context) renderdata.y = context->y; renderdata.width = context->width; - if (context->frame->transitiontimer < 0) { - renderdata.colour = g_MenuColourPalettes[context->frame->type].focused; + if (context->dialog->transitiontimer < 0) { + renderdata.colour = g_MenuColourPalettes[context->dialog->type].focused; } else { renderdata.colour = colourBlend( - g_MenuColourPalettes[context->frame->type2].focused, - g_MenuColourPalettes[context->frame->type].focused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].focused, + g_MenuColourPalettes[context->dialog->type].focused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { renderdata.colour = (colourBlend(renderdata.colour, 0, 127) & 0xffffff00) | (renderdata.colour & 0xff); } @@ -6672,7 +6672,7 @@ Gfx *menuRenderItemModel(Gfx *gdl, struct menurendercontext *context) return gdl; } -Gfx *menuRenderItemLabel(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemLabelRender(Gfx *gdl, struct menurendercontext *context) { u32 colour1; u32 colour2; @@ -6712,58 +6712,58 @@ Gfx *menuRenderItemLabel(Gfx *gdl, struct menurendercontext *context) } if (context->item->flags & MENUITEMFLAG_00000100) { - if (context->frame->transitiontimer < 0) { - colour1 = g_MenuColourPalettes[context->frame->type].checkedunfocused; + if (context->dialog->transitiontimer < 0) { + colour1 = g_MenuColourPalettes[context->dialog->type].checkedunfocused; } else { colour1 = colourBlend( - g_MenuColourPalettes[context->frame->type2].checkedunfocused, - g_MenuColourPalettes[context->frame->type].checkedunfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].checkedunfocused, + g_MenuColourPalettes[context->dialog->type].checkedunfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { colour1 = (colourBlend(colour1, 0, 127) & 0xffffff00) | (colour1 & 0xff); } func0f153e38( - g_MenuColourPalettes3[context->frame->type].checkedunfocused, - g_MenuColourPalettes2[context->frame->type].checkedunfocused); + g_MenuColourPalettes3[context->dialog->type].checkedunfocused, + g_MenuColourPalettes2[context->dialog->type].checkedunfocused); } else { - if (context->frame->transitiontimer < 0) { - colour1 = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + colour1 = g_MenuColourPalettes[context->dialog->type].unfocused; } else { colour1 = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { colour1 = (colourBlend(colour1, 0, 127) & 0xffffff00) | (colour1 & 0xff); } func0f153e38( - g_MenuColourPalettes3[context->frame->type].unfocused, - g_MenuColourPalettes2[context->frame->type].unfocused); + g_MenuColourPalettes3[context->dialog->type].unfocused, + g_MenuColourPalettes2[context->dialog->type].unfocused); } - if (menuIsItemDisabled(context->item, context->frame)) { - if (context->frame->transitiontimer < 0) { - colour1 = g_MenuColourPalettes[context->frame->type].disabled; + if (menuIsItemDisabled(context->item, context->dialog)) { + if (context->dialog->transitiontimer < 0) { + colour1 = g_MenuColourPalettes[context->dialog->type].disabled; } else { colour1 = colourBlend( - g_MenuColourPalettes[context->frame->type2].disabled, - g_MenuColourPalettes[context->frame->type].disabled, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].disabled, + g_MenuColourPalettes[context->dialog->type].disabled, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { colour1 = (colourBlend(colour1, 0, 127) & 0xffffff00) | (colour1 & 0xff); } func0f153e38( - g_MenuColourPalettes3[context->frame->type].disabled, - g_MenuColourPalettes2[context->frame->type].disabled); + g_MenuColourPalettes3[context->dialog->type].disabled, + g_MenuColourPalettes2[context->dialog->type].disabled); } menudfc = func0f0f1338(context->item); @@ -6830,7 +6830,7 @@ Gfx *menuRenderItemLabel(Gfx *gdl, struct menurendercontext *context) gdl = func0f153780(gdl); if (menudfc) { - if (context->width + 200 < menudfc->unk04 * 300 && context->frame->unk48 < 0) { + if (context->width + 200 < menudfc->unk04 * 300 && context->dialog->unk48 < 0) { func0f0f13ec(context->item); } @@ -6863,7 +6863,7 @@ Gfx *menuRenderItemLabel(Gfx *gdl, struct menurendercontext *context) * Renders two yellow bars and an optional label. Suspected to be a resource * meter but with the calculations ifdeffed out, so the widths are static. */ -Gfx *menuRenderItemMeter(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemMeterRender(Gfx *gdl, struct menurendercontext *context) { u32 a = 9; char *text; @@ -6876,16 +6876,16 @@ Gfx *menuRenderItemMeter(Gfx *gdl, struct menurendercontext *context) s32 x2; s32 x3; - if (context->frame->transitiontimer < 0) { - colour = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + colour = g_MenuColourPalettes[context->dialog->type].unfocused; } else { colour = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { colour = (colourBlend(colour, 0, 127) & 0xffffff00) | (colour & 0xff); } @@ -6919,7 +6919,7 @@ Gfx *menuRenderItemMeter(Gfx *gdl, struct menurendercontext *context) } GLOBAL_ASM( -glabel menuRenderItemSelectable +glabel menuitemSelectableRender /* f0eaec0: 27bdff80 */ addiu $sp,$sp,-128 /* f0eaec4: afbf003c */ sw $ra,0x3c($sp) /* f0eaec8: afb10038 */ sw $s1,0x38($sp) @@ -7307,7 +7307,7 @@ glabel menuRenderItemSelectable const char var7f1adfb8[] = ""; -//Gfx *menuRenderItemSelectable(Gfx *gdl, struct menurendercontext *context) +//Gfx *menuitemSelectableRender(Gfx *gdl, struct menurendercontext *context) //{ // u32 leftcolour; // u32 rightcolour; @@ -7328,16 +7328,16 @@ const char var7f1adfb8[] = ""; // // text = menuResolveParam2Text(context->item); // -// if (context->frame->transitiontimer < 0) { -// leftcolour = g_MenuColourPalettes[context->frame->type].unfocused; +// if (context->dialog->transitiontimer < 0) { +// leftcolour = g_MenuColourPalettes[context->dialog->type].unfocused; // } else { // leftcolour = colourBlend( -// g_MenuColourPalettes[context->frame->type2].unfocused, -// g_MenuColourPalettes[context->frame->type].unfocused, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].unfocused, +// g_MenuColourPalettes[context->dialog->type].unfocused, +// context->dialog->colourweight); // } // -// if (context->frame->dimmed) { +// if (context->dialog->dimmed) { // leftcolour = colourBlend(leftcolour, 0, 127) & 0xffffff00 | leftcolour & 0xff; // } // @@ -7351,45 +7351,45 @@ const char var7f1adfb8[] = ""; // u32 colour2; // u32 weight = func0f006b08(40) * 255; // -// if (context->frame->transitiontimer < 0) { -// colour2 = g_MenuColourPalettes[context->frame->type].focused; +// if (context->dialog->transitiontimer < 0) { +// colour2 = g_MenuColourPalettes[context->dialog->type].focused; // } else { // colour2 = colourBlend( -// g_MenuColourPalettes[context->frame->type2].focused, -// g_MenuColourPalettes[context->frame->type].focused, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].focused, +// g_MenuColourPalettes[context->dialog->type].focused, +// context->dialog->colourweight); // } // // leftcolour = colourBlend(colourBlend(leftcolour, leftcolour & 0x000000ff, 127), colour2, weight); // // func0f153e38( -// g_MenuColourPalettes3[context->frame->type].focused, -// g_MenuColourPalettes2[context->frame->type].focused); +// g_MenuColourPalettes3[context->dialog->type].focused, +// g_MenuColourPalettes2[context->dialog->type].focused); // } else { // func0f153e38( -// g_MenuColourPalettes3[context->frame->type].unfocused, -// g_MenuColourPalettes2[context->frame->type].unfocused); +// g_MenuColourPalettes3[context->dialog->type].unfocused, +// g_MenuColourPalettes2[context->dialog->type].unfocused); // } // -// if (menuIsItemDisabled(context->item, context->frame)) { -// if (context->frame->transitiontimer < 0) { -// leftcolour = g_MenuColourPalettes[context->frame->type].disabled; +// if (menuIsItemDisabled(context->item, context->dialog)) { +// if (context->dialog->transitiontimer < 0) { +// leftcolour = g_MenuColourPalettes[context->dialog->type].disabled; // } else { // leftcolour = colourBlend( -// g_MenuColourPalettes[context->frame->type2].disabled, -// g_MenuColourPalettes[context->frame->type].disabled, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].disabled, +// g_MenuColourPalettes[context->dialog->type].disabled, +// context->dialog->colourweight); // } // -// if (context->frame->dimmed) { +// if (context->dialog->dimmed) { // leftcolour = colourBlend(leftcolour, 0x00000000, 127) & 0xffffff00 | leftcolour & 0xff; // } // // rightcolour = leftcolour; // // func0f153e38( -// g_MenuColourPalettes3[context->frame->type].disabled, -// g_MenuColourPalettes2[context->frame->type].disabled); +// g_MenuColourPalettes3[context->dialog->type].disabled, +// g_MenuColourPalettes2[context->dialog->type].disabled); // } // // if (context->item->flags & MENUITEMFLAG_00000020) { @@ -7430,7 +7430,7 @@ const char var7f1adfb8[] = ""; // return func0f153780(gdl); //} -bool menuTickItemSelectable(struct menuitem *item, struct menuinputs *inputs, u32 arg2) +bool menuitemSelectableTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2) { if ((arg2 & 2) && inputs->select) { menuPlaySound(MENUSOUND_SELECT); @@ -7440,7 +7440,7 @@ bool menuTickItemSelectable(struct menuitem *item, struct menuinputs *inputs, u3 } if (item->flags & MENUITEMFLAG_00000004) { - menuPushDialog((struct menudialog *)item->handler); + menuPushDialog((struct menudialogdef *)item->handler); } else if (item->handler) { union handlerdata data; item->handler(MENUOP_SET, item, &data); @@ -7454,7 +7454,7 @@ const char var7f1adfbc[] = ""; const char var7f1adfc0[] = "%d\n"; GLOBAL_ASM( -glabel menuRenderItemSlider +glabel menuitemSliderRender /* f0eb508: 27bdff50 */ addiu $sp,$sp,-176 /* f0eb50c: afbf0044 */ sw $ra,0x44($sp) /* f0eb510: afb20040 */ sw $s2,0x40($sp) @@ -8121,7 +8121,7 @@ glabel menuRenderItemSlider /* f0ebec4: 27bd00b0 */ addiu $sp,$sp,0xb0 ); -bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) +bool menuitemSliderTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) { s32 index; union handlerdata handlerdata; @@ -8218,11 +8218,11 @@ bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct m } if (inputs->select) { - frame->dimmed = false; + dialog->dimmed = false; } } else { if (inputs->select) { - frame->dimmed = true; + dialog->dimmed = true; } } } @@ -8230,12 +8230,12 @@ bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct m return true; } -void menuInitItemSlider(union menuitemdata *data) +void menuitemSliderInit(union menuitemdata *data) { data->slider.unk00 = 0; } -Gfx *menuRenderItemCarousel(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemCarouselRender(Gfx *gdl, struct menurendercontext *context) { u32 colour = 0xff0000ff; @@ -8243,13 +8243,13 @@ Gfx *menuRenderItemCarousel(Gfx *gdl, struct menurendercontext *context) u32 colour1; u32 weight = func0f006b08(40) * 255; - if (context->frame->transitiontimer < 0) { - colour1 = g_MenuColourPalettes[context->frame->type].focused; + if (context->dialog->transitiontimer < 0) { + colour1 = g_MenuColourPalettes[context->dialog->type].focused; } else { colour1 = colourBlend( - g_MenuColourPalettes[context->frame->type2].focused, - g_MenuColourPalettes[context->frame->type].focused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].focused, + g_MenuColourPalettes[context->dialog->type].focused, + context->dialog->colourweight); } colour = colourBlend(colourBlend(colour, 0x000000ff, 127), colour1, weight); @@ -8283,7 +8283,7 @@ Gfx *menuRenderItemCarousel(Gfx *gdl, struct menurendercontext *context) return gdl; } -bool menuTickItemCarousel(struct menuitem *item, struct menuinputs *inputs, u32 arg2) +bool menuitemCarouselTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2) { union handlerdata data; s32 index; @@ -8340,7 +8340,7 @@ bool menuTickItemCarousel(struct menuitem *item, struct menuinputs *inputs, u32 } GLOBAL_ASM( -glabel menuRenderItemCheckbox +glabel menuitemCheckboxRender /* f0ec64c: 27bdff88 */ addiu $sp,$sp,-120 /* f0ec650: 3c0eff00 */ lui $t6,0xff00 /* f0ec654: 35ce2faf */ ori $t6,$t6,0x2faf @@ -8727,7 +8727,7 @@ glabel menuRenderItemCheckbox /* f0ecbf8: 27bd0078 */ addiu $sp,$sp,0x78 ); -//Gfx *menuRenderItemCheckbox(Gfx *gdl, struct menurendercontext *context) +//Gfx *menuitemCheckboxRender(Gfx *gdl, struct menurendercontext *context) //{ // u32 maincolour = 0x00000000; // char *text; @@ -8753,39 +8753,39 @@ glabel menuRenderItemCheckbox // && context->item->handler(MENUOP_GET, context->item, (union handlerdata *)data) == true) { // checked = true; // -// if (context->frame->transitiontimer < 0) { -// maincolour = g_MenuColourPalettes[context->frame->type].checkedunfocused; +// if (context->dialog->transitiontimer < 0) { +// maincolour = g_MenuColourPalettes[context->dialog->type].checkedunfocused; // } else { // maincolour = colourBlend( -// g_MenuColourPalettes[context->frame->type2].checkedunfocused, -// g_MenuColourPalettes[context->frame->type].checkedunfocused, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].checkedunfocused, +// g_MenuColourPalettes[context->dialog->type].checkedunfocused, +// context->dialog->colourweight); // } // -// if (context->frame->dimmed) { +// if (context->dialog->dimmed) { // maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff; // } // // func0f153e38( -// g_MenuColourPalettes3[context->frame->type].checkedunfocused, -// g_MenuColourPalettes2[context->frame->type].checkedunfocused); +// g_MenuColourPalettes3[context->dialog->type].checkedunfocused, +// g_MenuColourPalettes2[context->dialog->type].checkedunfocused); // } else { -// if (context->frame->transitiontimer < 0) { -// maincolour = g_MenuColourPalettes[context->frame->type].unfocused; +// if (context->dialog->transitiontimer < 0) { +// maincolour = g_MenuColourPalettes[context->dialog->type].unfocused; // } else { // maincolour = colourBlend( -// g_MenuColourPalettes[context->frame->type2].unfocused, -// g_MenuColourPalettes[context->frame->type].unfocused, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].unfocused, +// g_MenuColourPalettes[context->dialog->type].unfocused, +// context->dialog->colourweight); // } // -// if (context->frame->dimmed) { +// if (context->dialog->dimmed) { // maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff; // } // // func0f153e38( -// g_MenuColourPalettes3[context->frame->type].unfocused, -// g_MenuColourPalettes2[context->frame->type].unfocused); +// g_MenuColourPalettes3[context->dialog->type].unfocused, +// g_MenuColourPalettes2[context->dialog->type].unfocused); // } // // gdl = func0f153628(gdl); @@ -8798,39 +8798,39 @@ glabel menuRenderItemCheckbox // u32 focuscolour; // u32 weight = func0f006b08(40) * 255; // -// if (context->frame->transitiontimer < 0) { -// focuscolour = g_MenuColourPalettes[context->frame->type].focused; +// if (context->dialog->transitiontimer < 0) { +// focuscolour = g_MenuColourPalettes[context->dialog->type].focused; // } else { // focuscolour = colourBlend( -// g_MenuColourPalettes[context->frame->type2].focused, -// g_MenuColourPalettes[context->frame->type].focused, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].focused, +// g_MenuColourPalettes[context->dialog->type].focused, +// context->dialog->colourweight); // } // // maincolour = colourBlend(colourBlend(maincolour, maincolour & 0xff, 127), focuscolour, weight); // // func0f153e38( -// g_MenuColourPalettes3[context->frame->type].focused, -// g_MenuColourPalettes2[context->frame->type].focused); +// g_MenuColourPalettes3[context->dialog->type].focused, +// g_MenuColourPalettes2[context->dialog->type].focused); // } // -// if (menuIsItemDisabled(context->item, context->frame)) { -// if (context->frame->transitiontimer < 0) { -// maincolour = g_MenuColourPalettes[context->frame->type].disabled; +// if (menuIsItemDisabled(context->item, context->dialog)) { +// if (context->dialog->transitiontimer < 0) { +// maincolour = g_MenuColourPalettes[context->dialog->type].disabled; // } else { // maincolour = colourBlend( -// g_MenuColourPalettes[context->frame->type2].disabled, -// g_MenuColourPalettes[context->frame->type].disabled, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].disabled, +// g_MenuColourPalettes[context->dialog->type].disabled, +// context->dialog->colourweight); // } // -// if (context->frame->dimmed) { +// if (context->dialog->dimmed) { // maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff; // } // // func0f153e38( -// g_MenuColourPalettes3[context->frame->type].disabled, -// g_MenuColourPalettes2[context->frame->type].disabled); +// g_MenuColourPalettes3[context->dialog->type].disabled, +// g_MenuColourPalettes2[context->dialog->type].disabled); // // fillcolour = 0x7f002faf; // } @@ -8846,7 +8846,7 @@ glabel menuRenderItemCheckbox // return func0f153780(gdl); //} -bool menuTickItemCheckbox(struct menuitem *item, struct menuinputs *inputs, u32 arg2) +bool menuitemCheckboxTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2) { union handlerdata data; @@ -8867,7 +8867,7 @@ bool menuTickItemCheckbox(struct menuitem *item, struct menuinputs *inputs, u32 return true; } -char *menuItemScrollableGetText(u32 type) +char *menuitemScrollableGetText(u32 type) { switch (type) { case DESCRIPTION_MPCONFIG: @@ -8897,7 +8897,7 @@ char *menuItemScrollableGetText(u32 type) * Render a scrollable menu item, such as briefing paragraphs and challenge * descriptions. * - * The text returned from menuItemScrollableGetText is first wrapped to fit the + * The text returned from menuitemScrollableGetText is first wrapped to fit the * width of the dialog. It is then separated into two strings: * * headings - which are started with the pipe character and ended with a @@ -8906,7 +8906,7 @@ char *menuItemScrollableGetText(u32 type) * * Headings are rendered in red, with a dropshadow and are outdented. */ -Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemScrollableRender(Gfx *gdl, struct menurendercontext *context) { char alltext[8000] = ""; char headingtext[8000]; @@ -8922,7 +8922,7 @@ Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurendercontext *context) char *rawtext; s32 paddingright = 24; - rawtext = menuItemScrollableGetText(context->item->param); + rawtext = menuitemScrollableGetText(context->item->param); if (menuIsScrollableUnscrollable(context->item)) { paddingright = 10; @@ -8973,22 +8973,22 @@ Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurendercontext *context) x = context->x + 2; y = context->y + 2; - if (context->frame->transitiontimer < 0) { - colour = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + colour = g_MenuColourPalettes[context->dialog->type].unfocused; } else { colour = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { colour = colourBlend(colour, 0, 0x7f) & 0xffffff00 | colour & 0xff; } func0f153e38( - g_MenuColourPalettes3[context->frame->type].unfocused, - g_MenuColourPalettes2[context->frame->type].unfocused); + g_MenuColourPalettes3[context->dialog->type].unfocused, + g_MenuColourPalettes2[context->dialog->type].unfocused); gdl = func0f153628(gdl); @@ -9014,14 +9014,14 @@ Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurendercontext *context) return func0f153780(gdl); } -bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) +bool menuitemScrollableTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) { u32 stack; #if PAL - if ((s16)frame->height != data->scrollable.unk06 || data->scrollable.unk08 != g_LanguageId) { + if ((s16)dialog->height != data->scrollable.unk06 || data->scrollable.unk08 != g_LanguageId) { #else - if ((s16)frame->height != data->scrollable.unk06) { + if ((s16)dialog->height != data->scrollable.unk06) { #endif char wrapped[8000] = ""; char *rawtext; @@ -9036,7 +9036,7 @@ bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, stru data->scrollable.unk08 = g_LanguageId; #endif - func0f0f2354(frame, item, &index1, &index2); + func0f0f2354(dialog, item, &index1, &index2); wvalue = g_Menus[g_MpPlayerNum].unk660[index2].unk00; hvalue = g_Menus[g_MpPlayerNum].unk4fc[index1].unk00; @@ -9047,7 +9047,7 @@ bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, stru width = wvalue - 24; } - rawtext = menuItemScrollableGetText(item->param); + rawtext = menuitemScrollableGetText(item->param); if (rawtext) { textWrap(width, rawtext, wrapped, g_CharsHandelGothicSm, g_FontHandelGothicSm); @@ -9061,7 +9061,7 @@ bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, stru data->scrollable.unk04 = -10; } - data->scrollable.unk06 = frame->height; + data->scrollable.unk06 = dialog->height; } if (menuIsScrollableUnscrollable(item)) { @@ -9110,7 +9110,7 @@ bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, stru return true; } -void menuInitItemScrollable(union menuitemdata *data) +void menuitemScrollableInit(union menuitemdata *data) { data->scrollable.unk06 = -1; data->scrollable.unk00 = -10; @@ -9118,7 +9118,7 @@ void menuInitItemScrollable(union menuitemdata *data) #if VERSION >= VERSION_NTSC_1_0 GLOBAL_ASM( -glabel menuRenderItemMarquee +glabel menuitemMarqueeRender /* f0ed528: 27bdff78 */ addiu $sp,$sp,-136 /* f0ed52c: afbf003c */ sw $ra,0x3c($sp) /* f0ed530: afb10038 */ sw $s1,0x38($sp) @@ -9467,7 +9467,7 @@ glabel menuRenderItemMarquee ); #else GLOBAL_ASM( -glabel menuRenderItemMarquee +glabel menuitemMarqueeRender /* f0ea690: 27bdff68 */ addiu $sp,$sp,-152 /* f0ea694: afbf0054 */ sw $ra,0x54($sp) /* f0ea698: afb70050 */ sw $s7,0x50($sp) @@ -9730,7 +9730,7 @@ glabel menuRenderItemMarquee u32 var800711ec = 0x20000000; // Mismatch at 718 -//Gfx *menuRenderItemMarquee(Gfx *gdl, struct menurendercontext *context) +//Gfx *menuitemMarqueeRender(Gfx *gdl, struct menurendercontext *context) //{ // u16 *unk14 = context->unk14.u16; // 84 // char *text = menuResolveParam2Text(context->item); // 80 @@ -9755,17 +9755,17 @@ u32 var800711ec = 0x20000000; // } // // // 5b8 -// if (context->frame->transitiontimer < 0) { -// colour = g_MenuColourPalettes[context->frame->type].unfocused; +// if (context->dialog->transitiontimer < 0) { +// colour = g_MenuColourPalettes[context->dialog->type].unfocused; // } else { // colour = colourBlend( -// g_MenuColourPalettes[context->frame->type2].unfocused, -// g_MenuColourPalettes[context->frame->type].unfocused, -// context->frame->colourweight); +// g_MenuColourPalettes[context->dialog->type2].unfocused, +// g_MenuColourPalettes[context->dialog->type].unfocused, +// context->dialog->colourweight); // } // // // 644 -// if (context->frame->dimmed) { +// if (context->dialog->dimmed) { // colour = colourBlend(colour, 0, 127) & 0xffffff00 | colour & 0xff; // } // @@ -9952,7 +9952,7 @@ u32 var80071348 = PAL ? 63 : 59; u32 var8007134c = 0x0000004b; u32 var80071350 = 0xffffffff; -bool menuTickItemMarquee(struct menuitem *item, union menuitemdata *data) +bool menuitemMarqueeTick(struct menuitem *item, union menuitemdata *data) { s32 i; s32 textheight; @@ -10005,20 +10005,20 @@ bool menuTickItemMarquee(struct menuitem *item, union menuitemdata *data) return true; } -void menuInitItemMarquee(union menuitemdata *data) +void menuitemMarqueeInit(union menuitemdata *data) { data->marquee.totalmoved = 0; data->marquee.unk04 = 50; data->marquee.unk06 = 0; } -Gfx *menuRenderItem07(Gfx *gdl) +Gfx *menuitem07Render(Gfx *gdl) { return gdl; } #if VERSION >= VERSION_NTSC_1_0 -Gfx *menuRenderItemRanking(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemRankingRender(Gfx *gdl, struct menurendercontext *context) { struct ranking rankings[12]; s32 numrows; @@ -10031,7 +10031,7 @@ Gfx *menuRenderItemRanking(Gfx *gdl, struct menurendercontext *context) s32 team = false; u32 linecolour1; struct menuitemdata_ranking *data = &context->data->ranking; - struct menuframe *frame; + struct menudialog *dialog; s32 gap; s32 i; @@ -10055,16 +10055,16 @@ Gfx *menuRenderItemRanking(Gfx *gdl, struct menurendercontext *context) data->scrolloffset = gap; } - if (context->frame->transitiontimer < 0) { - textcolour = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + textcolour = g_MenuColourPalettes[context->dialog->type].unfocused; } else { textcolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { textcolour = colourBlend(textcolour, 0, 127) & 0xffffff00 | textcolour & 0xff; } @@ -10085,31 +10085,31 @@ Gfx *menuRenderItemRanking(Gfx *gdl, struct menurendercontext *context) textcolour, context->width, context->height, 0, 0); gdl = func0f153780(gdl); - frame = context->frame; + dialog = context->dialog; - if (frame->transitiontimer < 0) { - linecolour1 = g_MenuColourPalettes[frame->type].unk00; + if (dialog->transitiontimer < 0) { + linecolour1 = g_MenuColourPalettes[dialog->type].unk00; } else { linecolour1 = colourBlend( - g_MenuColourPalettes[frame->type2].unk00, - g_MenuColourPalettes[frame->type].unk00, - frame->colourweight); + g_MenuColourPalettes[dialog->type2].unk00, + g_MenuColourPalettes[dialog->type].unk00, + dialog->colourweight); } - if (frame->dimmed) { + if (dialog->dimmed) { linecolour1 = colourBlend(linecolour1, 0, 44) & 0xffffff00 | linecolour1 & 0xff; } - if (frame->transitiontimer < 0) { - linecolour2 = g_MenuColourPalettes[frame->type].unk08; + if (dialog->transitiontimer < 0) { + linecolour2 = g_MenuColourPalettes[dialog->type].unk08; } else { linecolour2 = colourBlend( - g_MenuColourPalettes[frame->type2].unk08, - g_MenuColourPalettes[frame->type].unk08, - frame->colourweight); + g_MenuColourPalettes[dialog->type2].unk08, + g_MenuColourPalettes[dialog->type].unk08, + dialog->colourweight); } - if (frame->dimmed) { + if (dialog->dimmed) { linecolour2 = colourBlend(linecolour2, 0, 44) & 0xffffff00 | linecolour2 & 0xff; } @@ -10225,7 +10225,7 @@ const char var7f1ac180nb[] = "%d\n"; const char var7f1ac184nb[] = "%d\n"; GLOBAL_ASM( -glabel menuRenderItemRanking +glabel menuitemRankingRender /* f0eab98: 27bdfe50 */ addiu $sp,$sp,-432 /* f0eab9c: afbf005c */ sw $ra,0x5c($sp) /* f0eaba0: afbe0058 */ sw $s8,0x58($sp) @@ -10820,7 +10820,7 @@ glabel menuRenderItemRanking ); #endif -bool menuTickItemRanking(struct menuinputs *inputs, u32 arg1, union menuitemdata *data) +bool menuitemRankingTick(struct menuinputs *inputs, u32 arg1, union menuitemdata *data) { f32 floatval; s32 intval; @@ -10855,13 +10855,13 @@ bool menuTickItemRanking(struct menuinputs *inputs, u32 arg1, union menuitemdata return true; } -void menuInitItemRanking(union menuitemdata *data) +void menuitemRankingInit(union menuitemdata *data) { data->ranking.scrolloffset = 0; } #if VERSION >= VERSION_NTSC_1_0 -Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemPlayerStatsRender(Gfx *gdl, struct menurendercontext *context) { struct menuitemdata_dropdown *data = &context->data->dropdown; s32 x; @@ -10886,13 +10886,13 @@ Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) // Write selected player's name weight = func0f006b08(40) * 255; - if (context->frame->transitiontimer < 0) { - selectioncolour = g_MenuColourPalettes[context->frame->type].focused; + if (context->dialog->transitiontimer < 0) { + selectioncolour = g_MenuColourPalettes[context->dialog->type].focused; } else { selectioncolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].focused, - g_MenuColourPalettes[context->frame->type].focused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].focused, + g_MenuColourPalettes[context->dialog->type].focused, + context->dialog->colourweight); } selectioncolour = colourBlend(colourBlend(0xffffffff, 0x000000ff, 127), selectioncolour, weight); @@ -10903,16 +10903,16 @@ Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) selectioncolour, context->width, context->height, 0, 0); // "Suicides" heading - if (context->frame->transitiontimer < 0) { - maincolour = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + maincolour = g_MenuColourPalettes[context->dialog->type].unfocused; } else { maincolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { maincolour = colourBlend(maincolour, 0x00000000, 127) & 0xffffff00 | maincolour & 0xff; } @@ -10936,16 +10936,16 @@ Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) ypos += 12; if (mpGetNumChrs() >= 2) { - if (context->frame->transitiontimer < 0) { - maincolour = g_MenuColourPalettes[context->frame->type].unfocused; + if (context->dialog->transitiontimer < 0) { + maincolour = g_MenuColourPalettes[context->dialog->type].unfocused; } else { maincolour = colourBlend( - g_MenuColourPalettes[context->frame->type2].unfocused, - g_MenuColourPalettes[context->frame->type].unfocused, - context->frame->colourweight); + g_MenuColourPalettes[context->dialog->type2].unfocused, + g_MenuColourPalettes[context->dialog->type].unfocused, + context->dialog->colourweight); } - if (context->frame->dimmed) { + if (context->dialog->dimmed) { maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff; } @@ -11066,7 +11066,7 @@ Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context) } #else GLOBAL_ASM( -glabel menuRenderItemPlayerStats +glabel menuitemPlayerStatsRender /* f0eb54c: 27bdff40 */ addiu $sp,$sp,-192 /* f0eb550: 3c0f8007 */ lui $t7,0x8007 /* f0eb554: 8def3af0 */ lw $t7,0x3af0($t7) @@ -11728,12 +11728,12 @@ glabel menuRenderItemPlayerStats ); #endif -bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) +bool menuitemPlayerStatsTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) { f32 floatval; s32 intval; - if ((arg3 & 2) && !frame->dimmed) { + if ((arg3 & 2) && !dialog->dimmed) { intval = 0; floatval = inputs->yaxis < 0 ? -(f32)inputs->yaxis : inputs->yaxis; @@ -11760,28 +11760,28 @@ bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, str } } - menuTickItemDropdown(item, frame, inputs, arg3, data); + menuitemDropdownTick(item, dialog, inputs, arg3, data); } -Gfx *menuRenderOverlayPlayerStats(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menuframe *frame, union menuitemdata *data) +Gfx *menuitemPlayerStatsOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menudialog *dialog, union menuitemdata *data) { #if VERSION >= VERSION_NTSC_1_0 - return menuRenderOverlayDropdown(gdl, x + 1, y, -1, y2, item, frame, data); + return menuitemDropdownOverlay(gdl, x + 1, y, -1, y2, item, dialog, data); #else - return menuRenderOverlayDropdown(gdl, x, y, 56, y2, item, frame, data); + return menuitemDropdownOverlay(gdl, x, y, 56, y2, item, dialog, data); #endif } -void menuInitItemPlayerStats(struct menuitem *item, union menuitemdata *data) +void menuitemPlayerStatsInit(struct menuitem *item, union menuitemdata *data) { data->dropdown.scrolloffset = 0; g_MpSelectedPlayersForStats[g_MpPlayerNum] = g_MpPlayerNum; - menuInitItemDropdown(item, data); + menuitemDropdownInit(item, data); } GLOBAL_ASM( -glabel func0f0ef394 +glabel menuitem0f0ef394 /* f0ef394: 3c098008 */ lui $t1,%hi(g_ScaleX) /* f0ef398: 8faf0010 */ lw $t7,0x10($sp) /* f0ef39c: 2529fac0 */ addiu $t1,$t1,%lo(g_ScaleX) @@ -11862,7 +11862,7 @@ glabel func0f0ef394 /* f0ef4b8: 00000000 */ nop ); -Gfx *menuRenderControllerTexture(Gfx *gdl, s32 x, s32 y, s32 texturenum, u32 alpha) +Gfx *menuitemControllerRenderTexture(Gfx *gdl, s32 x, s32 y, s32 texturenum, u32 alpha) { gDPPipeSync(gdl++); gDPSetTexturePersp(gdl++, G_TP_NONE); @@ -11893,7 +11893,7 @@ Gfx *menuRenderControllerTexture(Gfx *gdl, s32 x, s32 y, s32 texturenum, u32 alp } GLOBAL_ASM( -glabel menuRenderControllerLines +glabel menuitemControllerRenderLines /* f0ef758: 3c018006 */ lui $at,%hi(var80061630) /* f0ef75c: c4241630 */ lwc1 $f4,%lo(var80061630)($at) /* f0ef760: 3c014080 */ lui $at,0x4080 @@ -12090,7 +12090,7 @@ glabel menuRenderControllerLines /* f0efa34: 01f33821 */ addu $a3,$t7,$s3 /* f0efa38: afb90010 */ sw $t9,0x10($sp) /* f0efa3c: afae0014 */ sw $t6,0x14($sp) -/* f0efa40: 0fc3bce5 */ jal func0f0ef394 +/* f0efa40: 0fc3bce5 */ jal menuitem0f0ef394 /* f0efa44: 8fa400a0 */ lw $a0,0xa0($sp) /* f0efa48: 8fac0050 */ lw $t4,0x50($sp) /* f0efa4c: 26310001 */ addiu $s1,$s1,0x1 @@ -12129,7 +12129,7 @@ u16 var80071354[][9] = { /*11*/ { L_OPTIONS_003, L_OPTIONS_003, L_MPWEAPONS_212, L_OPTIONS_003, L_MPWEAPONS_203, L_MPWEAPONS_204, L_MPWEAPONS_208, L_MPWEAPONS_205, L_OPTIONS_003 }, }; -u16 menuControllerGetButtonAction(s32 mode, s32 buttonnum) +u16 menuitemControllerGetButtonAction(s32 mode, s32 buttonnum) { u32 textid = var80071354[mode][buttonnum]; @@ -12161,7 +12161,7 @@ u16 menuControllerGetButtonAction(s32 mode, s32 buttonnum) * is used because the rest is bitwise or'ed to white. */ #if VERSION >= VERSION_NTSC_1_0 -Gfx *menuRenderControllerText(Gfx *gdl, s32 curmode, struct menurendercontext *context, s32 x, s32 y, u32 valuecolour, u32 labelcolour, s8 prevmode) +Gfx *menuitemControllerTextRender(Gfx *gdl, s32 curmode, struct menurendercontext *context, s32 x, s32 y, u32 valuecolour, u32 labelcolour, s8 prevmode) { s32 rx; s32 ry; @@ -12199,7 +12199,7 @@ Gfx *menuRenderControllerText(Gfx *gdl, s32 curmode, struct menurendercontext *c g_CharsHandelGothicXs, g_FontHandelGothicXs, labelcolour, viGetWidth(), viGetHeight(), 0, 0); } - textnum = menuControllerGetButtonAction(curmode, i); + textnum = menuitemControllerGetButtonAction(curmode, i); colour = valuecolour; // If there's a prevmode, get the text ID that was in this position for @@ -12210,11 +12210,11 @@ Gfx *menuRenderControllerText(Gfx *gdl, s32 curmode, struct menurendercontext *c // choose their control style separately to player 1, in which case // there would have been 2.5, 2.6, 2.7 and 2.8 for player 2. if (curmode > CONTROLMODE_24) { - if (textnum == menuControllerGetButtonAction(prevmode + 4, i)) { + if (textnum == menuitemControllerGetButtonAction(prevmode + 4, i)) { colour = labelcolour; } } else { - if (textnum == menuControllerGetButtonAction(prevmode, i)) { + if (textnum == menuitemControllerGetButtonAction(prevmode, i)) { colour = labelcolour; } } @@ -12250,7 +12250,7 @@ u16 labels[] = { }; GLOBAL_ASM( -glabel menuRenderControllerText +glabel menuitemControllerTextRender /* f0ec8f0: 27bdff68 */ addiu $sp,$sp,-152 /* f0ec8f4: 3c0f8007 */ lui $t7,0x8007 /* f0ec8f8: afbf005c */ sw $ra,0x5c($sp) @@ -12334,7 +12334,7 @@ glabel menuRenderControllerText .NB0f0eca28: /* f0eca28: 02c02025 */ or $a0,$s6,$zero .NB0f0eca2c: -/* f0eca2c: 0fc3b1f3 */ jal menuControllerGetButtonAction +/* f0eca2c: 0fc3b1f3 */ jal menuitemControllerGetButtonAction /* f0eca30: 02402825 */ or $a1,$s2,$zero /* f0eca34: 3050ffff */ andi $s0,$v0,0xffff /* f0eca38: 06e00010 */ bltz $s7,.NB0f0eca7c @@ -12343,14 +12343,14 @@ glabel menuRenderControllerText /* f0eca44: 14200008 */ bnez $at,.NB0f0eca68 /* f0eca48: 02e02025 */ or $a0,$s7,$zero /* f0eca4c: 26e40004 */ addiu $a0,$s7,0x4 -/* f0eca50: 0fc3b1f3 */ jal menuControllerGetButtonAction +/* f0eca50: 0fc3b1f3 */ jal menuitemControllerGetButtonAction /* f0eca54: 02402825 */ or $a1,$s2,$zero /* f0eca58: 56020009 */ bnel $s0,$v0,.NB0f0eca80 /* f0eca5c: 2ac10004 */ slti $at,$s6,0x4 /* f0eca60: 10000006 */ beqz $zero,.NB0f0eca7c /* f0eca64: 02808825 */ or $s1,$s4,$zero .NB0f0eca68: -/* f0eca68: 0fc3b1f3 */ jal menuControllerGetButtonAction +/* f0eca68: 0fc3b1f3 */ jal menuitemControllerGetButtonAction /* f0eca6c: 02402825 */ or $a1,$s2,$zero /* f0eca70: 56020003 */ bnel $s0,$v0,.NB0f0eca80 /* f0eca74: 2ac10004 */ slti $at,$s6,0x4 @@ -12419,27 +12419,27 @@ glabel menuRenderControllerText ); #endif -Gfx *menuRenderControllerInfo(Gfx *gdl, struct menurendercontext *context, s32 x, s32 y, s32 curmode, u32 alpha, u32 colour1, u32 colour2, s8 prevmode) +Gfx *menuitemControllerInfoRender(Gfx *gdl, struct menurendercontext *context, s32 x, s32 y, s32 curmode, u32 alpha, u32 colour1, u32 colour2, s8 prevmode) { s32 rx = context->x + x; s32 ry = context->y + y + 4; // The controller graphic is split into 4 textures - gdl = menuRenderControllerTexture(gdl, rx, ry, 0x33, alpha); - gdl = menuRenderControllerTexture(gdl, rx + 32, ry, 0x34, alpha); - gdl = menuRenderControllerTexture(gdl, rx, ry + 32, 0x35, alpha); - gdl = menuRenderControllerTexture(gdl, rx + 32, ry + 32, 0x36, alpha); + gdl = menuitemControllerRenderTexture(gdl, rx, ry, 0x33, alpha); + gdl = menuitemControllerRenderTexture(gdl, rx + 32, ry, 0x34, alpha); + gdl = menuitemControllerRenderTexture(gdl, rx, ry + 32, 0x35, alpha); + gdl = menuitemControllerRenderTexture(gdl, rx + 32, ry + 32, 0x36, alpha); if (curmode >= CONTROLMODE_21) { - gdl = menuRenderControllerLines(gdl, context, 13, 19, x, y, alpha); + gdl = menuitemControllerRenderLines(gdl, context, 13, 19, x, y, alpha); } else { - gdl = menuRenderControllerLines(gdl, context, 0, 21, x, y, alpha); + gdl = menuitemControllerRenderLines(gdl, context, 0, 21, x, y, alpha); } - return menuRenderControllerText(gdl, curmode, context, x, y, colour1, colour2, prevmode); + return menuitemControllerTextRender(gdl, curmode, context, x, y, colour1, colour2, prevmode); } -Gfx *menuRenderItemController(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemControllerRender(Gfx *gdl, struct menurendercontext *context) { struct menuitemdata_controller *data = &context->data->controller; u32 colour; @@ -12447,7 +12447,7 @@ Gfx *menuRenderItemController(Gfx *gdl, struct menurendercontext *context) s32 x; s32 y; char text[32]; - struct menuframe *frame = context->frame; + struct menudialog *dialog = context->dialog; u32 contalpha; u32 textalpha; @@ -12501,22 +12501,22 @@ Gfx *menuRenderItemController(Gfx *gdl, struct menurendercontext *context) contalpha = data->contfadetimer; gdl = func0f153628(gdl); - if (frame->transitiontimer < 0) { - colour = g_MenuColourPalettes[frame->type].unfocused; + if (dialog->transitiontimer < 0) { + colour = g_MenuColourPalettes[dialog->type].unfocused; } else { colour = colourBlend( - g_MenuColourPalettes[frame->type2].unfocused, - g_MenuColourPalettes[frame->type].unfocused, - frame->colourweight); + g_MenuColourPalettes[dialog->type2].unfocused, + g_MenuColourPalettes[dialog->type].unfocused, + dialog->colourweight); } - if (frame->dimmed) { + if (dialog->dimmed) { colour = colourBlend(colour, 0, 44) & 0xffffff00 | colour & 0xff; } func0f153e38( - g_MenuColourPalettes3[frame->type].unfocused, - g_MenuColourPalettes2[frame->type].unfocused); + g_MenuColourPalettes3[dialog->type].unfocused, + g_MenuColourPalettes2[dialog->type].unfocused); if (g_Menus[g_MpPlayerNum].main.controlmode >= CONTROLMODE_21) { sprintf(text, langGet(L_MPWEAPONS_213), // "Control Style %s %s" @@ -12538,14 +12538,14 @@ Gfx *menuRenderItemController(Gfx *gdl, struct menurendercontext *context) colour = colourBlend(colour, colour & 0xffffff00, contalpha); if (g_Menus[g_MpPlayerNum].main.controlmode >= CONTROLMODE_21) { - gdl = menuRenderControllerInfo(gdl, context, 0, 12, + gdl = menuitemControllerInfoRender(gdl, context, 0, 12, g_Menus[g_MpPlayerNum].main.controlmode, contalpha, textcolour, colour, data->prevmode); - gdl = menuRenderControllerInfo(gdl, context, 0, 80, + gdl = menuitemControllerInfoRender(gdl, context, 0, 80, g_Menus[g_MpPlayerNum].main.controlmode + 4, contalpha, textcolour, colour, data->prevmode); } else { - gdl = menuRenderControllerInfo(gdl, context, 0, PAL ? 19 : 15, + gdl = menuitemControllerInfoRender(gdl, context, 0, PAL ? 19 : 15, g_Menus[g_MpPlayerNum].main.controlmode, contalpha, textcolour, colour, data->prevmode); @@ -12562,7 +12562,7 @@ Gfx *menuRenderItemController(Gfx *gdl, struct menurendercontext *context) return gdl; } -void menuInitItemController(union menuitemdata *data) +void menuitemControllerInit(union menuitemdata *data) { data->controller.textfadetimer = 0; data->controller.contfadetimer = 0; @@ -12571,27 +12571,27 @@ void menuInitItemController(union menuitemdata *data) data->controller.prevmode = -1; } -Gfx *menuRenderItem(Gfx *gdl, struct menurendercontext *context) +Gfx *menuitemRender(Gfx *gdl, struct menurendercontext *context) { switch (context->item->type) { - case MENUITEMTYPE_LIST: return menuRenderItemList(gdl, context); - case MENUITEMTYPE_SELECTABLE: return menuRenderItemSelectable(gdl, context); - case MENUITEMTYPE_SLIDER: return menuRenderItemSlider(gdl); - case MENUITEMTYPE_CHECKBOX: return menuRenderItemCheckbox(gdl, context); - case MENUITEMTYPE_SCROLLABLE: return menuRenderItemScrollable(gdl, context); - case MENUITEMTYPE_MARQUEE: return menuRenderItemMarquee(gdl, context); - case MENUITEMTYPE_LABEL: return menuRenderItemLabel(gdl, context); - case MENUITEMTYPE_METER: return menuRenderItemMeter(gdl, context); - case MENUITEMTYPE_SEPARATOR: return menuRenderItemSeparator(gdl, context); - case MENUITEMTYPE_OBJECTIVES: return menuRenderItemObjectives(gdl, context); - case MENUITEMTYPE_07: return menuRenderItem07(gdl); - case MENUITEMTYPE_DROPDOWN: return menuRenderItemDropdown(gdl); - case MENUITEMTYPE_KEYBOARD: return menuRenderItemKeyboard(gdl, context); - case MENUITEMTYPE_RANKING: return menuRenderItemRanking(gdl, context); - case MENUITEMTYPE_PLAYERSTATS: return menuRenderItemPlayerStats(gdl, context); - case MENUITEMTYPE_CAROUSEL: return menuRenderItemCarousel(gdl, context); - case MENUITEMTYPE_MODEL: return menuRenderItemModel(gdl, context); - case MENUITEMTYPE_CONTROLLER: return menuRenderItemController(gdl, context); + case MENUITEMTYPE_LIST: return menuitemListRender(gdl, context); + case MENUITEMTYPE_SELECTABLE: return menuitemSelectableRender(gdl, context); + case MENUITEMTYPE_SLIDER: return menuitemSliderRender(gdl); + case MENUITEMTYPE_CHECKBOX: return menuitemCheckboxRender(gdl, context); + case MENUITEMTYPE_SCROLLABLE: return menuitemScrollableRender(gdl, context); + case MENUITEMTYPE_MARQUEE: return menuitemMarqueeRender(gdl, context); + case MENUITEMTYPE_LABEL: return menuitemLabelRender(gdl, context); + case MENUITEMTYPE_METER: return menuitemMeterRender(gdl, context); + case MENUITEMTYPE_SEPARATOR: return menuitemSeparatorRender(gdl, context); + case MENUITEMTYPE_OBJECTIVES: return menuitemObjectivesRender(gdl, context); + case MENUITEMTYPE_07: return menuitem07Render(gdl); + case MENUITEMTYPE_DROPDOWN: return menuitemDropdownRender(gdl); + case MENUITEMTYPE_KEYBOARD: return menuitemKeyboardRender(gdl, context); + case MENUITEMTYPE_RANKING: return menuitemRankingRender(gdl, context); + case MENUITEMTYPE_PLAYERSTATS: return menuitemPlayerStatsRender(gdl, context); + case MENUITEMTYPE_CAROUSEL: return menuitemCarouselRender(gdl, context); + case MENUITEMTYPE_MODEL: return menuitemModelRender(gdl, context); + case MENUITEMTYPE_CONTROLLER: return menuitemControllerRender(gdl, context); } return gdl; @@ -12600,62 +12600,62 @@ Gfx *menuRenderItem(Gfx *gdl, struct menurendercontext *context) /** * Return true if default up/down/left/right/back behaviour should be used. */ -bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) +bool menuitemTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data) { switch (item->type) { - case MENUITEMTYPE_LIST: return menuTickItemList(item, inputs, arg3, data); - case MENUITEMTYPE_SELECTABLE: return menuTickItemSelectable(item, inputs, arg3); - case MENUITEMTYPE_SLIDER: return menuTickItemSlider(item, frame, inputs, arg3, data); - case MENUITEMTYPE_CHECKBOX: return menuTickItemCheckbox(item, inputs, arg3); - case MENUITEMTYPE_SCROLLABLE: return menuTickItemScrollable(item, frame, inputs, arg3, data); - case MENUITEMTYPE_MARQUEE: return menuTickItemMarquee(item, data); - case MENUITEMTYPE_RANKING: return menuTickItemRanking(inputs, arg3, data); - case MENUITEMTYPE_DROPDOWN: return menuTickItemDropdown(item, frame, inputs, arg3, data); - case MENUITEMTYPE_KEYBOARD: return menuTickItemKeyboard(item, inputs, arg3, data); - case MENUITEMTYPE_CAROUSEL: return menuTickItemCarousel(item, inputs, arg3); - case MENUITEMTYPE_PLAYERSTATS: return menuTickItemPlayerStats(item, frame, inputs, arg3, data); + case MENUITEMTYPE_LIST: return menuitemListTick(item, inputs, arg3, data); + case MENUITEMTYPE_SELECTABLE: return menuitemSelectableTick(item, inputs, arg3); + case MENUITEMTYPE_SLIDER: return menuitemSliderTick(item, dialog, inputs, arg3, data); + case MENUITEMTYPE_CHECKBOX: return menuitemCheckboxTick(item, inputs, arg3); + case MENUITEMTYPE_SCROLLABLE: return menuitemScrollableTick(item, dialog, inputs, arg3, data); + case MENUITEMTYPE_MARQUEE: return menuitemMarqueeTick(item, data); + case MENUITEMTYPE_RANKING: return menuitemRankingTick(inputs, arg3, data); + case MENUITEMTYPE_DROPDOWN: return menuitemDropdownTick(item, dialog, inputs, arg3, data); + case MENUITEMTYPE_KEYBOARD: return menuitemKeyboardTick(item, inputs, arg3, data); + case MENUITEMTYPE_CAROUSEL: return menuitemCarouselTick(item, inputs, arg3); + case MENUITEMTYPE_PLAYERSTATS: return menuitemPlayerStatsTick(item, dialog, inputs, arg3, data); } return true; } -void menuInitItem(struct menuitem *item, union menuitemdata *data) +void menuitemInit(struct menuitem *item, union menuitemdata *data) { switch (item->type) { case MENUITEMTYPE_LIST: case MENUITEMTYPE_DROPDOWN: - menuInitItemDropdown(item, data); + menuitemDropdownInit(item, data); break; case MENUITEMTYPE_SCROLLABLE: - menuInitItemScrollable(data); + menuitemScrollableInit(data); break; case MENUITEMTYPE_MARQUEE: - menuInitItemMarquee(data); + menuitemMarqueeInit(data); break; case MENUITEMTYPE_RANKING: - menuInitItemRanking(data); + menuitemRankingInit(data); break; case MENUITEMTYPE_SLIDER: - menuInitItemSlider(data); + menuitemSliderInit(data); break; case MENUITEMTYPE_PLAYERSTATS: - menuInitItemPlayerStats(item, data); + menuitemPlayerStatsInit(item, data); break; case MENUITEMTYPE_KEYBOARD: - menuInitItemKeyboard(item, data); + menuitemKeyboardInit(item, data); break; case MENUITEMTYPE_CONTROLLER: - menuInitItemController(data); + menuitemControllerInit(data); break; } } -Gfx *menuRenderOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menuframe *frame, union menuitemdata *data) +Gfx *menuitemOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menudialog *dialog, union menuitemdata *data) { switch (item->type) { - case MENUITEMTYPE_LIST: return menuRenderOverlayList(gdl, x, y, x2, y2); - case MENUITEMTYPE_DROPDOWN: return menuRenderOverlayDropdown(gdl, x, y, x2, y2, item, frame, data); - case MENUITEMTYPE_PLAYERSTATS: return menuRenderOverlayPlayerStats(gdl, x, y, x2, y2, item, frame, data); + case MENUITEMTYPE_LIST: return menuitemListOverlay(gdl, x, y, x2, y2); + case MENUITEMTYPE_DROPDOWN: return menuitemDropdownOverlay(gdl, x, y, x2, y2, item, dialog, data); + case MENUITEMTYPE_PLAYERSTATS: return menuitemPlayerStatsOverlay(gdl, x, y, x2, y2, item, dialog, data); } return gdl; diff --git a/src/game/mplayer/ingame.c b/src/game/mplayer/ingame.c index 112be74ff..aff708554 100644 --- a/src/game/mplayer/ingame.c +++ b/src/game/mplayer/ingame.c @@ -20,12 +20,12 @@ #include "data.h" #include "types.h" -struct menudialog g_MpEndscreenChallengeCompletedMenuDialog; -struct menudialog g_MpEndscreenIndGameOverMenuDialog; -struct menudialog g_MpEndscreenTeamGameOverMenuDialog; +struct menudialogdef g_MpEndscreenChallengeCompletedMenuDialog; +struct menudialogdef g_MpEndscreenIndGameOverMenuDialog; +struct menudialogdef g_MpEndscreenTeamGameOverMenuDialog; #if VERSION >= VERSION_NTSC_1_0 -struct menudialog g_MpEndscreenSavePlayerMenuDialog; +struct menudialogdef g_MpEndscreenSavePlayerMenuDialog; #endif s32 mpStatsForPlayerDropdownHandler(s32 operation, struct menuitem *item, union handlerdata *data) @@ -210,7 +210,7 @@ char *mpMenuTextWeaponDescription(struct menuitem *item) return "\n"; } -char *mpMenuTitleStatsFor(struct menudialog *dialog) +char *mpMenuTitleStatsFor(struct menudialogdef *dialogdef) { struct mpchrconfig *mpchr = MPCHR(g_MpSelectedPlayersForStats[g_MpPlayerNum]); @@ -249,7 +249,7 @@ struct menuitem g_MpEndGameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpEndGameMenuDialog = { +struct menudialogdef g_MpEndGameMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_290, // "End Game" g_MpEndGameMenuItems, @@ -271,7 +271,7 @@ struct menuitem g_MpPauseControlMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPauseControlMenuDialog = { +struct menudialogdef g_MpPauseControlMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_285, // "Control" g_MpPauseControlMenuItems, @@ -286,7 +286,7 @@ struct menuitem g_Mp2PMissionInventoryMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPauseInventoryMenuDialog = { +struct menudialogdef g_MpPauseInventoryMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_284, // "Inventory" g_Mp2PMissionInventoryMenuItems, @@ -295,7 +295,7 @@ struct menudialog g_MpPauseInventoryMenuDialog = { &g_MpPauseControlMenuDialog, }; -struct menudialog g_2PMissionInventoryHMenuDialog = { +struct menudialogdef g_2PMissionInventoryHMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_284, // "Inventory" g_Mp2PMissionInventoryMenuItems, @@ -304,7 +304,7 @@ struct menudialog g_2PMissionInventoryHMenuDialog = { &g_2PMissionOptionsHMenuDialog, }; -struct menudialog g_2PMissionInventoryVMenuDialog = { +struct menudialogdef g_2PMissionInventoryVMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_284, // "Inventory" g_Mp2PMissionInventoryMenuItems, @@ -318,7 +318,7 @@ struct menuitem g_MpInGamePlayerStatsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPausePlayerStatsMenuDialog = { +struct menudialogdef g_MpPausePlayerStatsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&mpMenuTitleStatsFor, g_MpInGamePlayerStatsMenuItems, @@ -327,7 +327,7 @@ struct menudialog g_MpPausePlayerStatsMenuDialog = { &g_MpPauseInventoryMenuDialog, }; -struct menudialog g_MpEndscreenPlayerStatsMenuDialog = { +struct menudialogdef g_MpEndscreenPlayerStatsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&mpMenuTitleStatsFor, g_MpInGamePlayerStatsMenuItems, @@ -341,7 +341,7 @@ struct menuitem g_MpPlayerRankingMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPausePlayerRankingMenuDialog = { +struct menudialogdef g_MpPausePlayerRankingMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_276, // "Player Ranking" g_MpPlayerRankingMenuItems, @@ -350,7 +350,7 @@ struct menudialog g_MpPausePlayerRankingMenuDialog = { &g_MpPausePlayerStatsMenuDialog, }; -struct menudialog g_MpEndscreenPlayerRankingMenuDialog = { +struct menudialogdef g_MpEndscreenPlayerRankingMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_276, // "Player Ranking" g_MpPlayerRankingMenuItems, @@ -364,7 +364,7 @@ struct menuitem g_MpTeamRankingsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPauseTeamRankingsMenuDialog = { +struct menudialogdef g_MpPauseTeamRankingsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_279, // "Team Ranking" g_MpTeamRankingsMenuItems, @@ -373,7 +373,7 @@ struct menudialog g_MpPauseTeamRankingsMenuDialog = { &g_MpPausePlayerRankingMenuDialog, }; -struct menudialog g_MpEndscreenTeamRankingMenuDialog = { +struct menudialogdef g_MpEndscreenTeamRankingMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_279, // "Team Ranking" g_MpTeamRankingsMenuItems, @@ -617,7 +617,7 @@ struct menuitem g_MpGameOverMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpEndscreenIndGameOverMenuDialog = { +struct menudialogdef g_MpEndscreenIndGameOverMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_260, // "Game Over" g_MpGameOverMenuItems, @@ -626,7 +626,7 @@ struct menudialog g_MpEndscreenIndGameOverMenuDialog = { &g_MpEndscreenPlayerRankingMenuDialog, }; -struct menudialog g_MpEndscreenTeamGameOverMenuDialog = { +struct menudialogdef g_MpEndscreenTeamGameOverMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_260, // "Game Over" g_MpGameOverMenuItems, @@ -635,7 +635,7 @@ struct menudialog g_MpEndscreenTeamGameOverMenuDialog = { &g_MpEndscreenTeamRankingMenuDialog, }; -struct menudialog g_MpEndscreenChallengeCompletedMenuDialog = { +struct menudialogdef g_MpEndscreenChallengeCompletedMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_MPWEAPONS_165, // "Challenge Completed!" g_MpTeamRankingsMenuItems, @@ -644,7 +644,7 @@ struct menudialog g_MpEndscreenChallengeCompletedMenuDialog = { &g_MpEndscreenIndGameOverMenuDialog, }; -struct menudialog g_MpEndscreenChallengeCheatedMenuDialog = { +struct menudialogdef g_MpEndscreenChallengeCheatedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_167, // "Challenge Cheated!" g_MpTeamRankingsMenuItems, @@ -653,7 +653,7 @@ struct menudialog g_MpEndscreenChallengeCheatedMenuDialog = { &g_MpEndscreenIndGameOverMenuDialog, }; -struct menudialog g_MpEndscreenChallengeFailedMenuDialog = { +struct menudialogdef g_MpEndscreenChallengeFailedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPWEAPONS_166, // "Challenge Failed!" g_MpTeamRankingsMenuItems, @@ -669,7 +669,7 @@ struct menuitem g_MpEndscreenConfirmNameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpEndscreenConfirmNameMenuDialog = { +struct menudialogdef g_MpEndscreenConfirmNameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_142, // "Player Name" g_MpEndscreenConfirmNameMenuItems, @@ -685,7 +685,7 @@ struct menuitem g_MpEndscreenSavePlayerMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpEndscreenSavePlayerMenuDialog = { +struct menudialogdef g_MpEndscreenSavePlayerMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_246, // "Save Player" g_MpEndscreenSavePlayerMenuItems, diff --git a/src/game/mplayer/mplayer.c b/src/game/mplayer/mplayer.c index 96685c61d..3f75c8300 100644 --- a/src/game/mplayer/mplayer.c +++ b/src/game/mplayer/mplayer.c @@ -1168,7 +1168,7 @@ bool mpIsPaused(void) { if (PLAYERCOUNT() == 1 && g_Vars.mplayerisrunning - && g_Menus[g_Vars.currentplayerstats->mpindex].curframe) { + && g_Menus[g_Vars.currentplayerstats->mpindex].curdialog) { return true; } @@ -1213,9 +1213,9 @@ Gfx *mpRenderModalText(Gfx *gdl) x = viGetViewLeft() + viGetViewWidth() / 2; #if VERSION >= VERSION_NTSC_1_0 - if (g_Menus[g_Vars.currentplayerstats->mpindex].curframe) + if (g_Menus[g_Vars.currentplayerstats->mpindex].curdialog) #else - if (g_Menus[g_Vars.currentplayernum].curframe) + if (g_Menus[g_Vars.currentplayernum].curdialog) #endif { y = viGetViewTop() + 10; diff --git a/src/game/mplayer/scenarios.c b/src/game/mplayer/scenarios.c index bdea093c5..4fb8aea0f 100644 --- a/src/game/mplayer/scenarios.c +++ b/src/game/mplayer/scenarios.c @@ -52,7 +52,7 @@ */ struct mpscenario { - struct menudialog *optionsdialog; + struct menudialogdef *optionsdialog; void (*initfunc)(void); s32 (*numpropsfunc)(void); void (*initpropsfunc)(void); @@ -243,15 +243,15 @@ struct mpscenariooverview g_MpScenarioOverviews[] = { * While the options dialog is open, check if another player has changed the * scenario to a different one. If so, replace this dialog with the new one. */ -s32 mpOptionsMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 mpOptionsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { - if (g_Menus[g_MpPlayerNum].curframe->dialog != g_MpScenarios[g_MpSetup.scenario].optionsdialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition != g_MpScenarios[g_MpSetup.scenario].optionsdialog) { s32 i; s32 end = ARRAYCOUNT(g_MpScenarios); for (i = 0; i < end; i++) { - if (g_Menus[g_MpPlayerNum].curframe->dialog == g_MpScenarios[i].optionsdialog) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == g_MpScenarios[i].optionsdialog) { break; } } @@ -910,7 +910,7 @@ struct menuitem g_MpScenarioMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpScenarioMenuDialog = { +struct menudialogdef g_MpScenarioMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_243, // "Scenario" g_MpScenarioMenuItems, @@ -924,7 +924,7 @@ struct menuitem g_MpQuickTeamScenarioMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpQuickTeamScenarioMenuDialog = { +struct menudialogdef g_MpQuickTeamScenarioMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_243, // "Scenario" g_MpQuickTeamScenarioMenuItems, diff --git a/src/game/mplayer/scenarios/capturethecase.inc b/src/game/mplayer/scenarios/capturethecase.inc index 373b0ef56..fc8e555f6 100644 --- a/src/game/mplayer/scenarios/capturethecase.inc +++ b/src/game/mplayer/scenarios/capturethecase.inc @@ -26,7 +26,7 @@ struct menuitem g_CtcOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CtcOptionsMenuDialog = { +struct menudialogdef g_CtcOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_220, // "Capture Options" g_CtcOptionsMenuItems, diff --git a/src/game/mplayer/scenarios/combat.inc b/src/game/mplayer/scenarios/combat.inc index 9828a2797..ae2552cee 100644 --- a/src/game/mplayer/scenarios/combat.inc +++ b/src/game/mplayer/scenarios/combat.inc @@ -21,7 +21,7 @@ struct menuitem g_MpCombatOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpCombatOptionsMenuDialog = { +struct menudialogdef g_MpCombatOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_215, // "Combat Options" g_MpCombatOptionsMenuItems, diff --git a/src/game/mplayer/scenarios/hackthatmac.inc b/src/game/mplayer/scenarios/hackthatmac.inc index b42bb43c4..dded45887 100644 --- a/src/game/mplayer/scenarios/hackthatmac.inc +++ b/src/game/mplayer/scenarios/hackthatmac.inc @@ -25,7 +25,7 @@ struct menuitem g_HtmOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HtmOptionsMenuDialog = { +struct menudialogdef g_HtmOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_217, // "Hacker Options" g_HtmOptionsMenuItems, diff --git a/src/game/mplayer/scenarios/holdthebriefcase.inc b/src/game/mplayer/scenarios/holdthebriefcase.inc index c31c821b9..ca9fa0dee 100644 --- a/src/game/mplayer/scenarios/holdthebriefcase.inc +++ b/src/game/mplayer/scenarios/holdthebriefcase.inc @@ -25,7 +25,7 @@ struct menuitem g_HtbOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HtbOptionsMenuDialog = { +struct menudialogdef g_HtbOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_216, // "Briefcase Options" g_HtbOptionsMenuItems, diff --git a/src/game/mplayer/scenarios/kingofthehill.inc b/src/game/mplayer/scenarios/kingofthehill.inc index 7a77be59b..eb1799837 100644 --- a/src/game/mplayer/scenarios/kingofthehill.inc +++ b/src/game/mplayer/scenarios/kingofthehill.inc @@ -47,7 +47,7 @@ struct menuitem g_KohOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_KohOptionsMenuDialog = { +struct menudialogdef g_KohOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_219, // "Hill Options" g_KohOptionsMenuItems, diff --git a/src/game/mplayer/scenarios/popacap.inc b/src/game/mplayer/scenarios/popacap.inc index 9444629db..1bcab51d1 100644 --- a/src/game/mplayer/scenarios/popacap.inc +++ b/src/game/mplayer/scenarios/popacap.inc @@ -23,7 +23,7 @@ struct menuitem g_PacOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_PacOptionsMenuDialog = { +struct menudialogdef g_PacOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_218, // "Pop a Cap Options" g_PacOptionsMenuItems, diff --git a/src/game/mplayer/setup.c b/src/game/mplayer/setup.c index 24740e7bc..c1ae7951e 100644 --- a/src/game/mplayer/setup.c +++ b/src/game/mplayer/setup.c @@ -23,11 +23,11 @@ #include "types.h" struct menuitem g_MpCharacterMenuItems[]; -struct menudialog g_MpAddSimulantMenuDialog; -struct menudialog g_MpChangeSimulantMenuDialog; -struct menudialog g_MpChangeTeamNameMenuDialog; -struct menudialog g_MpEditSimulantMenuDialog; -struct menudialog g_MpSaveSetupNameMenuDialog; +struct menudialogdef g_MpAddSimulantMenuDialog; +struct menudialogdef g_MpChangeSimulantMenuDialog; +struct menudialogdef g_MpChangeTeamNameMenuDialog; +struct menudialogdef g_MpEditSimulantMenuDialog; +struct menudialogdef g_MpSaveSetupNameMenuDialog; s32 menuhandlerMpDropOut(s32 operation, struct menuitem *item, union handlerdata *data) { @@ -62,7 +62,7 @@ struct menuitem g_MpDropOutMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpDropOutMenuDialog = { +struct menudialogdef g_MpDropOutMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_195, // "Drop Out" g_MpDropOutMenuItems, @@ -630,7 +630,7 @@ s32 menuhandlerMpCharacterBody(s32 operation, struct menuitem *item, union handl g_PlayerConfigsArray[g_MpPlayerNum].base.mpheadnum, true); } -s32 menudialog0017a174(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog0017a174(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -638,11 +638,11 @@ s32 menudialog0017a174(s32 operation, struct menudialog *dialog, union handlerda case MENUOP_CLOSE: break; case MENUOP_TICK: - if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog - && g_Menus[g_MpPlayerNum].curframe->focuseditem != &dialog->items[1] - && g_Menus[g_MpPlayerNum].curframe->focuseditem != &dialog->items[2]) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef + && g_Menus[g_MpPlayerNum].curdialog->focuseditem != &dialogdef->items[1] + && g_Menus[g_MpPlayerNum].curdialog->focuseditem != &dialogdef->items[2]) { union handlerdata data; - menuhandlerMpCharacterBody(MENUOP_11, &dialog->items[2], &data); + menuhandlerMpCharacterBody(MENUOP_11, &dialogdef->items[2], &data); } } @@ -972,7 +972,7 @@ s32 mpMedalMenuHandler(s32 operation, struct menuitem *item, union handlerdata * return 0; } -char *mpMenuTitleStatsForPlayerName(struct menudialog *dialog) +char *mpMenuTitleStatsForPlayerName(struct menudialogdef *dialogdef) { // "Stats for %s" sprintf(g_StringPointer, langGet(L_MPMENU_145), g_PlayerConfigsArray[g_MpPlayerNum].base.name); @@ -998,7 +998,7 @@ struct menuitem g_MpSavePlayerMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpSavePlayerMenuDialog = { +struct menudialogdef g_MpSavePlayerMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_190, // "Confirm" g_MpSavePlayerMenuItems, @@ -1013,7 +1013,7 @@ struct menuitem g_MpSaveSetupNameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpSaveSetupNameMenuDialog = { +struct menudialogdef g_MpSaveSetupNameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_188, // "Game File Name" g_MpSaveSetupNameMenuItems, @@ -1034,7 +1034,7 @@ struct menuitem g_MpSaveSetupExistsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpSaveSetupExistsMenuDialog = { +struct menudialogdef g_MpSaveSetupExistsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_183, // "Save Game Setup" g_MpSaveSetupExistsMenuItems, @@ -1058,7 +1058,7 @@ struct menuitem g_MpWeaponsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpWeaponsMenuDialog = { +struct menudialogdef g_MpWeaponsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_173, // "Weapons" g_MpWeaponsMenuItems, @@ -1080,7 +1080,7 @@ struct menuitem g_MpQuickTeamWeaponsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpQuickTeamWeaponsMenuDialog = { +struct menudialogdef g_MpQuickTeamWeaponsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_173, // "Weapons" g_MpQuickTeamWeaponsMenuItems, @@ -1099,7 +1099,7 @@ struct menuitem g_MpPlayerOptionsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPlayerOptionsMenuDialog = { +struct menudialogdef g_MpPlayerOptionsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_167, // "Options" g_MpPlayerOptionsMenuItems, @@ -1127,7 +1127,7 @@ struct menuitem g_MpControlMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpControlMenuDialog = { +struct menudialogdef g_MpControlMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_199, // "Control" g_MpControlMenuItems, @@ -1141,7 +1141,7 @@ struct menuitem g_MpCompletedChallengesMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpCompletedChallengesMenuDialog = { +struct menudialogdef g_MpCompletedChallengesMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_165, // "Completed Challenges" g_MpCompletedChallengesMenuItems, @@ -1245,7 +1245,7 @@ struct menuitem g_MpPlayerStatsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPlayerStatsMenuDialog = { +struct menudialogdef g_MpPlayerStatsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&mpMenuTitleStatsForPlayerName, g_MpPlayerStatsMenuItems, @@ -1699,7 +1699,7 @@ s32 menuhandlerMpRestoreHandicapDefaults(s32 operation, struct menuitem *item, u return 0; } -s32 menudialogMpReady(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogMpReady(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { if (g_PlayerConfigsArray[g_MpPlayerNum].fileguid.fileid && g_PlayerConfigsArray[g_MpPlayerNum].fileguid.deviceserial) { @@ -1710,7 +1710,7 @@ s32 menudialogMpReady(s32 operation, struct menudialog *dialog, union handlerdat return false; } -s32 menudialogMpSimulant(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogMpSimulant(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { if ((u8)g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name[0] == '\0') { @@ -1728,7 +1728,7 @@ struct menuitem g_MpCharacterMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpCharacterMenuDialog = { +struct menudialogdef g_MpCharacterMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_143, // "Character" g_MpCharacterMenuItems, @@ -1742,7 +1742,7 @@ struct menuitem g_MpPlayerNameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPlayerNameMenuDialog = { +struct menudialogdef g_MpPlayerNameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_142, // "Player Name" g_MpPlayerNameMenuItems, @@ -1757,7 +1757,7 @@ struct menuitem g_MpLoadSettingsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpLoadSettingsMenuDialog = { +struct menudialogdef g_MpLoadSettingsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_139, // "Load Game Settings" g_MpLoadSettingsMenuItems, @@ -1772,7 +1772,7 @@ struct menuitem g_MpLoadPresetMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpLoadPresetMenuDialog = { +struct menudialogdef g_MpLoadPresetMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_139, // "Load Game Settings" g_MpLoadPresetMenuItems, @@ -1787,7 +1787,7 @@ struct menuitem g_MpLoadPlayerMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpLoadPlayerMenuDialog = { +struct menudialogdef g_MpLoadPlayerMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_137, // "Load Player" g_MpLoadPlayerMenuItems, @@ -1801,7 +1801,7 @@ struct menuitem g_MpArenaMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpArenaMenuDialog = { +struct menudialogdef g_MpArenaMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_115, // "Arena" g_MpArenaMenuItems, @@ -1820,7 +1820,7 @@ struct menuitem g_MpLimitsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpLimitsMenuDialog = { +struct menudialogdef g_MpLimitsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_107, // "Limits" g_MpLimitsMenuItems, @@ -1840,7 +1840,7 @@ struct menuitem g_MpHandicapsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpHandicapsMenuDialog = { +struct menudialogdef g_MpHandicapsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPWEAPONS_184, // "Player Handicaps" g_MpHandicapsMenuItems, @@ -1854,7 +1854,7 @@ struct menuitem g_MpReadyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpReadyMenuDialog = { +struct menudialogdef g_MpReadyMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_MPMENU_105, // "Ready!" g_MpReadyMenuItems, @@ -2011,19 +2011,19 @@ s32 menuhandlerMpSimulantBody(s32 operation, struct menuitem *item, union handle false); } -s32 menudialog0017ccfc(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog0017ccfc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_TICK: - if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog - && g_Menus[g_MpPlayerNum].curframe->focuseditem != &dialog->items[0] - && g_Menus[g_MpPlayerNum].curframe->focuseditem != &dialog->items[1]) { + if (g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef + && g_Menus[g_MpPlayerNum].curdialog->focuseditem != &dialogdef->items[0] + && g_Menus[g_MpPlayerNum].curdialog->focuseditem != &dialogdef->items[1]) { union handlerdata data; - menuhandlerMpCharacterBody(MENUOP_11, &dialog->items[1], &data); + menuhandlerMpCharacterBody(MENUOP_11, &dialogdef->items[1], &data); } } - return menudialogMpSimulant(operation, dialog, data); + return menudialogMpSimulant(operation, dialogdef, data); } s32 mpBotDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data) @@ -2081,7 +2081,7 @@ s32 menuhandlerMpDeleteSimulant(s32 operation, struct menuitem *item, union hand return 0; } -char *mpMenuTitleEditSimulant(struct menudialog *dialog) +char *mpMenuTitleEditSimulant(struct menudialogdef *dialogdef) { sprintf(g_StringPointer, "%s", &g_BotConfigsArray[g_Menus[g_MpPlayerNum].mpsetup.slotindex].base.name); return g_StringPointer; @@ -2190,7 +2190,7 @@ char *func0f17d3dc(struct menuitem *item) return g_StringPointer; } -s32 menudialogMpSimulants(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogMpSimulants(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { g_Menus[g_MpPlayerNum].mpsetup.slotcount = 0; @@ -2205,7 +2205,7 @@ struct menuitem g_MpAddChangeSimulantMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpAddSimulantMenuDialog = { +struct menudialogdef g_MpAddSimulantMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_101, // "Add Simulant" g_MpAddChangeSimulantMenuItems, @@ -2214,7 +2214,7 @@ struct menudialog g_MpAddSimulantMenuDialog = { NULL, }; -struct menudialog g_MpChangeSimulantMenuDialog = { +struct menudialogdef g_MpChangeSimulantMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_102, // "Change Simulant" g_MpAddChangeSimulantMenuItems, @@ -2229,7 +2229,7 @@ struct menuitem g_MpSimulantCharacterMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpSimulantCharacterMenuDialog = { +struct menudialogdef g_MpSimulantCharacterMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_100, // "Simulant Character" g_MpSimulantCharacterMenuItems, @@ -2248,7 +2248,7 @@ struct menuitem g_MpEditSimulantMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpEditSimulantMenuDialog = { +struct menudialogdef g_MpEditSimulantMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&mpMenuTitleEditSimulant, g_MpEditSimulantMenuItems, @@ -2274,7 +2274,7 @@ struct menuitem g_MpSimulantsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpSimulantsMenuDialog = { +struct menudialogdef g_MpSimulantsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_083, // "Simulants" g_MpSimulantsMenuItems, @@ -2722,7 +2722,7 @@ struct menuitem g_MpAutoTeamMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpAutoTeamMenuDialog = { +struct menudialogdef g_MpAutoTeamMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_075, // "Auto Team" g_MpAutoTeamMenuItems, @@ -2753,7 +2753,7 @@ struct menuitem g_MpTeamsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpTeamsMenuDialog = { +struct menudialogdef g_MpTeamsMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_070, // "Team Control" g_MpTeamsMenuItems, @@ -2868,7 +2868,7 @@ s32 mpSelectTuneListHandler(s32 operation, struct menuitem *item, union handlerd return 0; } -s32 menudialogMpSelectTune(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogMpSelectTune(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { var800840e0 = 80; @@ -2978,7 +2978,7 @@ s32 menuhandlerMpTeamNameSlot(s32 operation, struct menuitem *item, union handle return 0; } -char *func0f17e318(struct menudialog *dialog) +char *func0f17e318(struct menudialogdef *dialogdef) { sprintf(g_StringPointer, langGet(L_MPMENU_056), mpGetChallengeNameBySlot(g_Menus[g_MpPlayerNum].mpsetup.slotindex)); return g_StringPointer; @@ -3001,7 +3001,7 @@ s32 menuhandler0017e38c(s32 operation, struct menuitem *item, union handlerdata return 0; } -s32 menudialog0017e3fc(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog0017e3fc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -3029,7 +3029,7 @@ struct menuitem g_MpSelectTunesMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpSelectTunesMenuDialog = { +struct menudialogdef g_MpSelectTunesMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&mpMenuTextSelectTuneOrTunes, g_MpSelectTunesMenuItems, @@ -3049,7 +3049,7 @@ struct menuitem g_MpSoundtrackMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpSoundtrackMenuDialog = { +struct menudialogdef g_MpSoundtrackMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_062, // "Soundtrack" g_MpSoundtrackMenuItems, @@ -3063,7 +3063,7 @@ struct menuitem g_MpChangeTeamNameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpChangeTeamNameMenuDialog = { +struct menudialogdef g_MpChangeTeamNameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_061, // "Change Team Name" g_MpChangeTeamNameMenuItems, @@ -3086,7 +3086,7 @@ struct menuitem g_MpTeamNamesMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpTeamNamesMenuDialog = { +struct menudialogdef g_MpTeamNamesMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_059, // "Team Names" g_MpTeamNamesMenuItems, @@ -3103,7 +3103,7 @@ struct menuitem g_MpConfirmChallengeViaListOrDetailsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpConfirmChallengeViaListOrDetailsMenuDialog = { +struct menudialogdef g_MpConfirmChallengeViaListOrDetailsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&func0f17e318, g_MpConfirmChallengeViaListOrDetailsMenuItems, @@ -3124,7 +3124,7 @@ struct menuitem g_MpChallengesListOrDetailsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpChallengeListOrDetailsMenuDialog = { +struct menudialogdef g_MpChallengeListOrDetailsMenuDialog = { MENUDIALOGTYPE_DEFAULT, #if VERSION >= VERSION_NTSC_1_0 (u32)&mpMenuTextChallengeName, @@ -3141,9 +3141,9 @@ struct menudialog g_MpChallengeListOrDetailsMenuDialog = { NULL, }; -struct menudialog g_MpAdvancedSetupViaAdvChallengeMenuDialog; +struct menudialogdef g_MpAdvancedSetupViaAdvChallengeMenuDialog; -struct menudialog g_MpChallengeListOrDetailsViaAdvChallengeMenuDialog = { +struct menudialogdef g_MpChallengeListOrDetailsViaAdvChallengeMenuDialog = { MENUDIALOGTYPE_DEFAULT, #if VERSION >= VERSION_NTSC_1_0 (u32)&mpMenuTextChallengeName, @@ -3169,7 +3169,7 @@ struct menuitem g_MpConfirmChallengeMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpConfirmChallengeMenuDialog = { +struct menudialogdef g_MpConfirmChallengeMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&func0f17e318, g_MpConfirmChallengeMenuItems, @@ -3344,12 +3344,12 @@ char *mpMenuTextChallengeName(struct menuitem *item) return g_StringPointer; } -s32 mpCombatChallengesMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 mpCombatChallengesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_TICK) { if (g_BossFile.locktype == MPLOCKTYPE_CHALLENGE - && g_Menus[g_MpPlayerNum].curframe - && g_Menus[g_MpPlayerNum].curframe->dialog == dialog + && g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef && !mpIsChallengeLoaded()) { g_Menus[g_MpPlayerNum].unk850 = 0x4fac5ace; @@ -3383,7 +3383,7 @@ struct menuitem g_MpChallengesMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpChallengesMenuDialog = { +struct menudialogdef g_MpChallengesMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_050, // "Combat Challenges" g_MpChallengesMenuItems, @@ -3504,7 +3504,7 @@ char *mpMenuTextWeaponSetName(struct menuitem *item) return mpGetWeaponSetName(mpGetWeaponSet()); } -s32 menudialogMpGameSetup(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogMpGameSetup(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { g_Vars.mpsetupmenu = MPSETUPMENU_ADVSETUP; @@ -3514,7 +3514,7 @@ s32 menudialogMpGameSetup(s32 operation, struct menudialog *dialog, union handle return false; } -s32 menudialogMpQuickGo(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogMpQuickGo(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { g_Vars.mpsetupmenu = MPSETUPMENU_QUICKGO; @@ -3803,7 +3803,7 @@ s32 menuhandlerMpQuickTeamOption(s32 operation, struct menuitem *item, union han return 0; } -s32 menudialogCombatSimulator(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogCombatSimulator(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_OPEN) { g_Vars.waitingtojoin[0] = false; @@ -3812,8 +3812,8 @@ s32 menudialogCombatSimulator(s32 operation, struct menudialog *dialog, union ha g_Vars.waitingtojoin[3] = false; } - if (g_Menus[g_MpPlayerNum].curframe - && g_Menus[g_MpPlayerNum].curframe->dialog == &g_CombatSimulatorMenuDialog + if (g_Menus[g_MpPlayerNum].curdialog + && g_Menus[g_MpPlayerNum].curdialog->definition == &g_CombatSimulatorMenuDialog && operation == MENUOP_TICK) { g_Vars.mpsetupmenu = MPSETUPMENU_GENERAL; g_Vars.mpquickteam = MPQUICKTEAM_NONE; @@ -3850,7 +3850,7 @@ void mpCloseDialogsForNewSetup(void) g_MpPlayerNum = i; // If they have a menu open - if (g_Menus[g_MpPlayerNum].curframe) { + if (g_Menus[g_MpPlayerNum].curdialog) { bool ok = false; // Repeat the following steps until we've stopped finding dialogs @@ -3863,19 +3863,19 @@ void mpCloseDialogsForNewSetup(void) // Loop through the siblings (left/right) in this layer for (k = 0; k < g_Menus[g_MpPlayerNum].layers[j].numsiblings; k++) { if (g_Menus[g_MpPlayerNum].layers[j].siblings[k]) { - struct menudialog *dialog = g_Menus[g_MpPlayerNum].layers[j].siblings[k]->dialog; + struct menudialogdef *dialogdef = g_Menus[g_MpPlayerNum].layers[j].siblings[k]->definition; - if (dialog == &g_MpSaveSetupNameMenuDialog) ok = false; - if (dialog == &g_MpSaveSetupExistsMenuDialog) ok = false; - if (dialog == &g_MpAddSimulantMenuDialog) ok = false; - if (dialog == &g_MpChangeSimulantMenuDialog) ok = false; - if (dialog == &g_MpEditSimulantMenuDialog) ok = false; - if (dialog == &g_MpCombatOptionsMenuDialog) ok = false; - if (dialog == &g_HtbOptionsMenuDialog) ok = false; - if (dialog == &g_CtcOptionsMenuDialog) ok = false; - if (dialog == &g_KohOptionsMenuDialog) ok = false; - if (dialog == &g_HtmOptionsMenuDialog) ok = false; - if (dialog == &g_PacOptionsMenuDialog) ok = false; + if (dialogdef == &g_MpSaveSetupNameMenuDialog) ok = false; + if (dialogdef == &g_MpSaveSetupExistsMenuDialog) ok = false; + if (dialogdef == &g_MpAddSimulantMenuDialog) ok = false; + if (dialogdef == &g_MpChangeSimulantMenuDialog) ok = false; + if (dialogdef == &g_MpEditSimulantMenuDialog) ok = false; + if (dialogdef == &g_MpCombatOptionsMenuDialog) ok = false; + if (dialogdef == &g_HtbOptionsMenuDialog) ok = false; + if (dialogdef == &g_CtcOptionsMenuDialog) ok = false; + if (dialogdef == &g_KohOptionsMenuDialog) ok = false; + if (dialogdef == &g_HtmOptionsMenuDialog) ok = false; + if (dialogdef == &g_PacOptionsMenuDialog) ok = false; } } } @@ -3891,7 +3891,7 @@ void mpCloseDialogsForNewSetup(void) g_MpPlayerNum = prevplayernum; } -struct menudialog g_MpAbortMenuDialog; +struct menudialogdef g_MpAbortMenuDialog; struct menuitem g_MpStuffMenuItems[] = { { MENUITEMTYPE_SELECTABLE, 0, 0x00000004, L_MPMENU_041, 0x00000000, (void *)&g_MpSoundtrackMenuDialog }, // "Soundtrack" @@ -3907,7 +3907,7 @@ struct menuitem g_MpStuffMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpStuffMenuDialog = { +struct menudialogdef g_MpStuffMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_040, // "Stuff" g_MpStuffMenuItems, @@ -3916,7 +3916,7 @@ struct menudialog g_MpStuffMenuDialog = { &g_MpChallengeListOrDetailsMenuDialog, }; -struct menudialog g_MpStuffViaAdvChallengeMenuDialog = { +struct menudialogdef g_MpStuffViaAdvChallengeMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_040, // "Stuff" g_MpStuffMenuItems, @@ -3937,7 +3937,7 @@ struct menuitem g_MpPlayerSetup234MenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpPlayerSetupViaAdvMenuDialog = { +struct menudialogdef g_MpPlayerSetupViaAdvMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_028, // "Player Setup" g_MpPlayerSetup234MenuItems, @@ -3946,7 +3946,7 @@ struct menudialog g_MpPlayerSetupViaAdvMenuDialog = { &g_MpStuffMenuDialog, }; -struct menudialog g_MpPlayerSetupViaAdvChallengeMenuDialog = { +struct menudialogdef g_MpPlayerSetupViaAdvChallengeMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_028, // "Player Setup" g_MpPlayerSetup234MenuItems, @@ -3955,7 +3955,7 @@ struct menudialog g_MpPlayerSetupViaAdvChallengeMenuDialog = { &g_MpStuffViaAdvChallengeMenuDialog, }; -struct menudialog g_MpPlayerSetupViaQuickGoMenuDialog = { +struct menudialogdef g_MpPlayerSetupViaQuickGoMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_028, // "Player Setup" g_MpPlayerSetup234MenuItems, @@ -3971,7 +3971,7 @@ struct menuitem g_MpAbortMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpAbortMenuDialog = { +struct menudialogdef g_MpAbortMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_052, // "Abort" g_MpAbortMenuItems, @@ -3995,7 +3995,7 @@ struct menuitem g_MpAdvancedSetupMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpAdvancedSetupMenuDialog = { +struct menudialogdef g_MpAdvancedSetupMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_017, // "Game Setup" g_MpAdvancedSetupMenuItems, @@ -4004,7 +4004,7 @@ struct menudialog g_MpAdvancedSetupMenuDialog = { &g_MpPlayerSetupViaAdvMenuDialog, }; -struct menudialog g_MpAdvancedSetupViaAdvChallengeMenuDialog = { +struct menudialogdef g_MpAdvancedSetupViaAdvChallengeMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_017, // "Game Setup" g_MpAdvancedSetupMenuItems, @@ -4023,7 +4023,7 @@ struct menuitem g_MpQuickGoMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpQuickGoMenuDialog = { +struct menudialogdef g_MpQuickGoMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MISC_460, // "Quick Go" g_MpQuickGoMenuItems, @@ -4053,7 +4053,7 @@ struct menuitem g_MpQuickTeamGameSetupMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpQuickTeamGameSetupMenuDialog = { +struct menudialogdef g_MpQuickTeamGameSetupMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_017, // "Game Setup" g_MpQuickTeamGameSetupMenuItems, @@ -4072,7 +4072,7 @@ struct menuitem g_MpQuickTeamMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_MpQuickTeamMenuDialog = { +struct menudialogdef g_MpQuickTeamMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MISC_462, // "Quick Team" g_MpQuickTeamMenuItems, @@ -4089,7 +4089,7 @@ struct menuitem g_CombatSimulatorMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_CombatSimulatorMenuDialog = { +struct menudialogdef g_CombatSimulatorMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MISC_445, // "Combat Simulator" g_CombatSimulatorMenuItems, diff --git a/src/game/options.c b/src/game/options.c index 5cef297d6..e03bd7ddc 100644 --- a/src/game/options.c +++ b/src/game/options.c @@ -240,15 +240,15 @@ s32 optionsGetEffectiveScreenSize(void) if (g_MenuData.root == MENUROOT_TRAINING) { g_MpPlayerNum = 0; - if (g_Menus[g_MpPlayerNum].curframe && var8009dfc0) { + if (g_Menus[g_MpPlayerNum].curdialog && var8009dfc0) { return SCREENSIZE_FULL; } } - if (g_Menus[g_MpPlayerNum].curframe && ( - g_Menus[g_MpPlayerNum].curframe->dialog == &g_CiControlStylePlayer2MenuDialog || - g_Menus[g_MpPlayerNum].curframe->dialog == &g_CiControlStyleMenuDialog || - g_Menus[g_MpPlayerNum].curframe->dialog == &g_SoloMissionControlStyleMenuDialog)) { + if (g_Menus[g_MpPlayerNum].curdialog && ( + g_Menus[g_MpPlayerNum].curdialog->definition == &g_CiControlStylePlayer2MenuDialog || + g_Menus[g_MpPlayerNum].curdialog->definition == &g_CiControlStyleMenuDialog || + g_Menus[g_MpPlayerNum].curdialog->definition == &g_SoloMissionControlStyleMenuDialog)) { return SCREENSIZE_FULL; } diff --git a/src/game/training/menus.c b/src/game/training/menus.c index 357b2966d..a81ad3d95 100644 --- a/src/game/training/menus.c +++ b/src/game/training/menus.c @@ -24,10 +24,10 @@ #include "data.h" #include "types.h" -struct menudialog g_BioProfileMenuDialog; -struct menudialog g_BioTextMenuDialog; -struct menudialog g_HangarLocationDetailsMenuDialog; -struct menudialog g_HangarVehicleDetailsMenuDialog; +struct menudialogdef g_BioProfileMenuDialog; +struct menudialogdef g_BioTextMenuDialog; +struct menudialogdef g_HangarLocationDetailsMenuDialog; +struct menudialogdef g_HangarVehicleDetailsMenuDialog; s32 frDetailsOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data) { @@ -82,7 +82,7 @@ s32 frAbortMenuHandler(s32 operation, struct menuitem *item, union handlerdata * return 0; } -struct menudialog g_FrDifficultyMenuDialog; +struct menudialogdef g_FrDifficultyMenuDialog; s32 frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data) { @@ -207,7 +207,7 @@ s32 frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerd return 0; } -s32 frTrainingInfoMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 frTrainingInfoMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { u32 stack; s32 weaponnum; @@ -223,7 +223,7 @@ s32 frTrainingInfoMenuDialog(s32 operation, struct menudialog *dialog, union han } break; case MENUOP_TICK: - if (g_Menus[g_MpPlayerNum].curframe && g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { g_Menus[g_MpPlayerNum].unkdb4 -= g_Vars.diffframe60; g_Menus[g_MpPlayerNum].unkd8c = 18.849555969238f * var80061630; g_Menus[g_MpPlayerNum].unkd64 = 18.849555969238f * var80061630; @@ -241,7 +241,7 @@ s32 frTrainingInfoMenuDialog(s32 operation, struct menudialog *dialog, union han return 0; } -s32 frTrainingStatsMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 frTrainingStatsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_CLOSE) { if (frIsInTraining() == false) { @@ -869,7 +869,7 @@ struct menuitem g_FrDifficultyMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FrDifficultyMenuDialog = { +struct menudialogdef g_FrDifficultyMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_442, // "Difficulty" g_FrDifficultyMenuItems, @@ -883,7 +883,7 @@ struct menuitem g_FrWeaponListMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FrWeaponListMenuDialog = { +struct menudialogdef g_FrWeaponListMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_446, // "Weapon" g_FrWeaponListMenuItems, @@ -906,7 +906,7 @@ struct menuitem g_FrTrainingInfoInGameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FrTrainingInfoInGameMenuDialog = { +struct menudialogdef g_FrTrainingInfoInGameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_447, // "Training Info" g_FrTrainingInfoInGameMenuItems, @@ -929,7 +929,7 @@ struct menuitem g_FrTrainingInfoPreGameMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FrTrainingInfoPreGameMenuDialog = { +struct menudialogdef g_FrTrainingInfoPreGameMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_447, // "Training Info" g_FrTrainingInfoPreGameMenuItems, @@ -959,7 +959,7 @@ struct menuitem g_FrCompletedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FrCompletedMenuDialog = { +struct menudialogdef g_FrCompletedMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_MPMENU_448, // "Training Stats" g_FrCompletedMenuItems, @@ -994,7 +994,7 @@ struct menuitem g_FrFailedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_FrFailedMenuDialog = { +struct menudialogdef g_FrFailedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_448, // "Training Stats" g_FrFailedMenuItems, @@ -1064,7 +1064,7 @@ struct menuitem g_BioListMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_BioListMenuDialog = { +struct menudialogdef g_BioListMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_418, // "Information" g_BioListMenuItems, @@ -1080,7 +1080,7 @@ struct menuitem g_NowSafeMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_NowSafeMenuDialog = { +struct menudialogdef g_NowSafeMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_436, // "Cheats" g_NowSafeMenuItems, @@ -1089,7 +1089,7 @@ struct menudialog g_NowSafeMenuDialog = { NULL, }; -s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { u32 bodynum = ciGetChrBioBodynumBySlot(g_ChrBioSlot); u32 mpbodynum = mpGetMpbodynumByBodynum(bodynum); @@ -1308,7 +1308,7 @@ struct menuitem g_BioProfileMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_BioProfileMenuDialog = { +struct menudialogdef g_BioProfileMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_431, // "Character Profile" g_BioProfileMenuItems, @@ -1324,7 +1324,7 @@ struct menuitem g_BioTextMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_BioTextMenuDialog = { +struct menudialogdef g_BioTextMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&ciMenuTextMiscBioName, g_BioTextMenuItems, @@ -1338,7 +1338,7 @@ struct menuitem g_DtListMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_DtListMenuDialog = { +struct menudialogdef g_DtListMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_417, // "Device List" g_DtListMenuItems, @@ -1347,7 +1347,7 @@ struct menudialog g_DtListMenuDialog = { NULL, }; -s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -1392,7 +1392,7 @@ s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialog *dialog, union case MENUOP_CLOSE: break; case MENUOP_TICK: - if (g_Menus[g_MpPlayerNum].curframe && g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { + if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { s32 weaponnum = dtGetWeaponByDeviceIndex(dtGetIndexBySlot(g_DtSlot)); if (weaponnum == WEAPON_DISGUISE41) { @@ -1456,7 +1456,7 @@ char *dtMenuTextTimeTakenValue(struct menuitem *item) return g_StringPointer; } -s32 menudialogDeviceTrainingResults(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogDeviceTrainingResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_CLOSE) { chrSetStageFlag(NULL, 0x08000000); @@ -1517,7 +1517,7 @@ s32 menuhandler001a6a70(s32 operation, struct menuitem *item, union handlerdata return 0; } -s32 menudialog001a6aa4(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialog001a6aa4(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { switch (operation) { case MENUOP_OPEN: @@ -1574,7 +1574,7 @@ char *htMenuTextTimeTakenValue(struct menuitem *item) return g_StringPointer; } -s32 menudialogFiringRangeResults(s32 operation, struct menudialog *dialog, union handlerdata *data) +s32 menudialogFiringRangeResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) { if (operation == MENUOP_CLOSE) { chrSetStageFlag(NULL, 0x08000000); @@ -1618,7 +1618,7 @@ struct menuitem g_DtDetailsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_DtDetailsMenuDialog = { +struct menudialogdef g_DtDetailsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&dtMenuTextName, g_DtDetailsMenuItems, @@ -1636,7 +1636,7 @@ struct menuitem g_DtFailedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_DtFailedMenuDialog = { +struct menudialogdef g_DtFailedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_423, // "Training Stats" g_DtFailedMenuItems, @@ -1654,7 +1654,7 @@ struct menuitem g_DtCompletedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_DtCompletedMenuDialog = { +struct menudialogdef g_DtCompletedMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_MPMENU_423, // "Training Stats" g_DtCompletedMenuItems, @@ -1668,7 +1668,7 @@ struct menuitem g_HtListMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HtListMenuDialog = { +struct menudialogdef g_HtListMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_416, // "Holotraining" g_HtListMenuItems, @@ -1686,7 +1686,7 @@ struct menuitem g_HtDetailsMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HtDetailsMenuDialog = { +struct menudialogdef g_HtDetailsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&htMenuTextName, g_HtDetailsMenuItems, @@ -1704,7 +1704,7 @@ struct menuitem g_HtFailedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HtFailedMenuDialog = { +struct menudialogdef g_HtFailedMenuDialog = { MENUDIALOGTYPE_DANGER, L_MPMENU_423, // "Training Stats" g_HtFailedMenuItems, @@ -1722,7 +1722,7 @@ struct menuitem g_HtCompletedMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HtCompletedMenuDialog = { +struct menudialogdef g_HtCompletedMenuDialog = { MENUDIALOGTYPE_SUCCESS, L_MPMENU_423, // "Training Stats" g_HtCompletedMenuItems, @@ -2276,7 +2276,7 @@ struct hoverprop hoverprops[] = { }; // Can't match the 4bc part -//s32 ciHangarHolographMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data) +//s32 ciHangarHolographMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data) //{ // s32 index = ciGetHangarBioIndexBySlot(g_HangarBioSlot); // @@ -2299,7 +2299,7 @@ struct hoverprop hoverprops[] = { // case MENUOP_CLOSE: // break; // case MENUOP_TICK: -// if (g_Menus[g_MpPlayerNum].curframe && g_Menus[g_MpPlayerNum].curframe->dialog == dialog) { +// if (g_Menus[g_MpPlayerNum].curdialog && g_Menus[g_MpPlayerNum].curdialog->definition == dialogdef) { // // 4bc // index -= 14; // g_Menus[g_MpPlayerNum].unkd54 = props[index].y_offset; @@ -2317,7 +2317,7 @@ struct hoverprop hoverprops[] = { // return 0; //} -struct menudialog *ciGetFrWeaponListMenuDialog(void) +struct menudialogdef *ciGetFrWeaponListMenuDialog(void) { return &g_FrWeaponListMenuDialog; } @@ -2338,7 +2338,7 @@ struct menuitem g_HangarVehicleHolographMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HangarVehicleHolographMenuDialog = { +struct menudialogdef g_HangarVehicleHolographMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MISC_471, // "Holograph" g_HangarVehicleHolographMenuItems, @@ -2347,7 +2347,7 @@ struct menudialog g_HangarVehicleHolographMenuDialog = { NULL, }; -struct menudialog g_HangarVehicleDetailsMenuDialog = { +struct menudialogdef g_HangarVehicleDetailsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&bioMenuTextName, g_HangarDetailsMenuItems, @@ -2356,7 +2356,7 @@ struct menudialog g_HangarVehicleDetailsMenuDialog = { &g_HangarVehicleHolographMenuDialog, }; -struct menudialog g_HangarLocationDetailsMenuDialog = { +struct menudialogdef g_HangarLocationDetailsMenuDialog = { MENUDIALOGTYPE_DEFAULT, (u32)&bioMenuTextName, g_HangarDetailsMenuItems, @@ -2370,7 +2370,7 @@ struct menuitem g_HangarListMenuItems[] = { { MENUITEMTYPE_END, 0, 0x00000000, 0x00000000, 0x00000000, NULL }, }; -struct menudialog g_HangarListMenuDialog = { +struct menudialogdef g_HangarListMenuDialog = { MENUDIALOGTYPE_DEFAULT, L_MPMENU_415, // "Hangar Information" g_HangarListMenuItems, diff --git a/src/include/data.h b/src/include/data.h index 86a533f48..92c6ef453 100644 --- a/src/include/data.h +++ b/src/include/data.h @@ -285,30 +285,30 @@ extern char g_StringPointer2[]; extern s32 g_MpPlayerNum; extern u32 g_MpNumJoined; extern u16 g_ControlStyleOptions[]; -extern struct menudialog g_PreAndPostMissionBriefingMenuDialog; +extern struct menudialogdef g_PreAndPostMissionBriefingMenuDialog; extern struct stageoverviewentry g_StageNames[NUM_SOLOSTAGES]; extern struct mission missions[]; -extern struct menudialog g_SoloMissionControlStyleMenuDialog; -extern struct menudialog g_CiControlStyleMenuDialog; -extern struct menudialog g_CiControlStylePlayer2MenuDialog; -extern struct menudialog g_ChangeAgentMenuDialog; -extern struct menudialog g_2PMissionOptionsHMenuDialog; -extern struct menudialog g_2PMissionOptionsVMenuDialog; -extern struct menudialog g_FrWeaponsAvailableMenuDialog; -extern struct menudialog g_SoloMissionPauseMenuDialog; -extern struct menudialog g_2PMissionPauseHMenuDialog; -extern struct menudialog g_2PMissionPauseVMenuDialog; +extern struct menudialogdef g_SoloMissionControlStyleMenuDialog; +extern struct menudialogdef g_CiControlStyleMenuDialog; +extern struct menudialogdef g_CiControlStylePlayer2MenuDialog; +extern struct menudialogdef g_ChangeAgentMenuDialog; +extern struct menudialogdef g_2PMissionOptionsHMenuDialog; +extern struct menudialogdef g_2PMissionOptionsVMenuDialog; +extern struct menudialogdef g_FrWeaponsAvailableMenuDialog; +extern struct menudialogdef g_SoloMissionPauseMenuDialog; +extern struct menudialogdef g_2PMissionPauseHMenuDialog; +extern struct menudialogdef g_2PMissionPauseVMenuDialog; extern struct cutscene g_Cutscenes[]; -extern struct menudialog g_CiMenuViaPcMenuDialog; -extern struct menudialog g_CiMenuViaPauseMenuDialog; -extern struct menudialog g_CheatsMenuDialog; -extern struct menudialog g_PakChoosePakMenuDialog; -extern struct menudialog g_FilemgrFileSelect4MbMenuDialog; -extern struct menudialog g_MpQuickGo4MbMenuDialog; -extern struct menudialog g_MpConfirmChallenge4MbMenuDialog; -extern struct menudialog g_MainMenu4MbMenuDialog; -extern struct menudialog g_MpEditSimulant4MbMenuDialog; -extern struct menudialog g_AdvancedSetup4MbMenuDialog; +extern struct menudialogdef g_CiMenuViaPcMenuDialog; +extern struct menudialogdef g_CiMenuViaPauseMenuDialog; +extern struct menudialogdef g_CheatsMenuDialog; +extern struct menudialogdef g_PakChoosePakMenuDialog; +extern struct menudialogdef g_FilemgrFileSelect4MbMenuDialog; +extern struct menudialogdef g_MpQuickGo4MbMenuDialog; +extern struct menudialogdef g_MpConfirmChallenge4MbMenuDialog; +extern struct menudialogdef g_MainMenu4MbMenuDialog; +extern struct menudialogdef g_MpEditSimulant4MbMenuDialog; +extern struct menudialogdef g_AdvancedSetup4MbMenuDialog; extern struct filelist *g_FileLists[]; extern bool var80075bd0[]; extern struct var80075c00 var80075c00[]; @@ -461,41 +461,41 @@ extern struct surfacetype *g_SurfaceTypes[15]; extern void *var800844f0; extern f32 var800845d4; extern u32 var800845dc; -extern struct menudialog g_2PMissionInventoryHMenuDialog; -extern struct menudialog g_2PMissionInventoryVMenuDialog; -extern struct menudialog g_MpEndscreenChallengeCheatedMenuDialog; -extern struct menudialog g_MpEndscreenChallengeFailedMenuDialog; -extern struct menudialog g_MpDropOutMenuDialog; +extern struct menudialogdef g_2PMissionInventoryHMenuDialog; +extern struct menudialogdef g_2PMissionInventoryVMenuDialog; +extern struct menudialogdef g_MpEndscreenChallengeCheatedMenuDialog; +extern struct menudialogdef g_MpEndscreenChallengeFailedMenuDialog; +extern struct menudialogdef g_MpDropOutMenuDialog; extern struct mparena g_MpArenas[]; -extern struct menudialog g_MpWeaponsMenuDialog; -extern struct menudialog g_MpPlayerOptionsMenuDialog; -extern struct menudialog g_MpControlMenuDialog; -extern struct menudialog g_MpPlayerStatsMenuDialog; -extern struct menudialog g_MpPlayerNameMenuDialog; -extern struct menudialog g_MpLoadSettingsMenuDialog; -extern struct menudialog g_MpLoadPresetMenuDialog; -extern struct menudialog g_MpLoadPlayerMenuDialog; -extern struct menudialog g_MpArenaMenuDialog; -extern struct menudialog g_MpLimitsMenuDialog; -extern struct menudialog g_MpHandicapsMenuDialog; -extern struct menudialog g_MpReadyMenuDialog; -extern struct menudialog g_MpSimulantsMenuDialog; -extern struct menudialog g_MpTeamsMenuDialog; -extern struct menudialog g_MpChallengeListOrDetailsMenuDialog; -extern struct menudialog g_MpChallengeListOrDetailsViaAdvChallengeMenuDialog; -extern struct menudialog g_MpAdvancedSetupMenuDialog; -extern struct menudialog g_MpQuickGoMenuDialog; -extern struct menudialog g_MpQuickTeamGameSetupMenuDialog; -extern struct menudialog g_MpQuickTeamMenuDialog; -extern struct menudialog g_CombatSimulatorMenuDialog; -extern struct menudialog g_MpCombatOptionsMenuDialog; -extern struct menudialog g_HtbOptionsMenuDialog; -extern struct menudialog g_CtcOptionsMenuDialog; -extern struct menudialog g_KohOptionsMenuDialog; -extern struct menudialog g_HtmOptionsMenuDialog; -extern struct menudialog g_PacOptionsMenuDialog; -extern struct menudialog g_MpScenarioMenuDialog; -extern struct menudialog g_MpQuickTeamScenarioMenuDialog; +extern struct menudialogdef g_MpWeaponsMenuDialog; +extern struct menudialogdef g_MpPlayerOptionsMenuDialog; +extern struct menudialogdef g_MpControlMenuDialog; +extern struct menudialogdef g_MpPlayerStatsMenuDialog; +extern struct menudialogdef g_MpPlayerNameMenuDialog; +extern struct menudialogdef g_MpLoadSettingsMenuDialog; +extern struct menudialogdef g_MpLoadPresetMenuDialog; +extern struct menudialogdef g_MpLoadPlayerMenuDialog; +extern struct menudialogdef g_MpArenaMenuDialog; +extern struct menudialogdef g_MpLimitsMenuDialog; +extern struct menudialogdef g_MpHandicapsMenuDialog; +extern struct menudialogdef g_MpReadyMenuDialog; +extern struct menudialogdef g_MpSimulantsMenuDialog; +extern struct menudialogdef g_MpTeamsMenuDialog; +extern struct menudialogdef g_MpChallengeListOrDetailsMenuDialog; +extern struct menudialogdef g_MpChallengeListOrDetailsViaAdvChallengeMenuDialog; +extern struct menudialogdef g_MpAdvancedSetupMenuDialog; +extern struct menudialogdef g_MpQuickGoMenuDialog; +extern struct menudialogdef g_MpQuickTeamGameSetupMenuDialog; +extern struct menudialogdef g_MpQuickTeamMenuDialog; +extern struct menudialogdef g_CombatSimulatorMenuDialog; +extern struct menudialogdef g_MpCombatOptionsMenuDialog; +extern struct menudialogdef g_HtbOptionsMenuDialog; +extern struct menudialogdef g_CtcOptionsMenuDialog; +extern struct menudialogdef g_KohOptionsMenuDialog; +extern struct menudialogdef g_HtmOptionsMenuDialog; +extern struct menudialogdef g_PacOptionsMenuDialog; +extern struct menudialogdef g_MpScenarioMenuDialog; +extern struct menudialogdef g_MpQuickTeamScenarioMenuDialog; extern s32 var80087260; extern bool g_MpEnableMusicSwitching; extern struct mpweapon g_MpWeapons[0x27]; @@ -515,20 +515,20 @@ extern u8 g_ChrBioSlot; extern u8 g_HangarBioSlot; extern u8 g_DtSlot; extern u8 var80088bb4; -extern struct menudialog g_FrWeaponListMenuDialog; -extern struct menudialog g_FrTrainingInfoInGameMenuDialog; -extern struct menudialog g_FrTrainingInfoPreGameMenuDialog; -extern struct menudialog g_FrCompletedMenuDialog; -extern struct menudialog g_FrFailedMenuDialog; -extern struct menudialog g_BioListMenuDialog; -extern struct menudialog g_DtListMenuDialog; -extern struct menudialog g_DtDetailsMenuDialog; -extern struct menudialog g_DtFailedMenuDialog; -extern struct menudialog g_DtCompletedMenuDialog; -extern struct menudialog g_HtListMenuDialog; -extern struct menudialog g_HtDetailsMenuDialog; -extern struct menudialog g_HtFailedMenuDialog; -extern struct menudialog g_HtCompletedMenuDialog; -extern struct menudialog g_HangarListMenuDialog; +extern struct menudialogdef g_FrWeaponListMenuDialog; +extern struct menudialogdef g_FrTrainingInfoInGameMenuDialog; +extern struct menudialogdef g_FrTrainingInfoPreGameMenuDialog; +extern struct menudialogdef g_FrCompletedMenuDialog; +extern struct menudialogdef g_FrFailedMenuDialog; +extern struct menudialogdef g_BioListMenuDialog; +extern struct menudialogdef g_DtListMenuDialog; +extern struct menudialogdef g_DtDetailsMenuDialog; +extern struct menudialogdef g_DtFailedMenuDialog; +extern struct menudialogdef g_DtCompletedMenuDialog; +extern struct menudialogdef g_HtListMenuDialog; +extern struct menudialogdef g_HtDetailsMenuDialog; +extern struct menudialogdef g_HtFailedMenuDialog; +extern struct menudialogdef g_HtCompletedMenuDialog; +extern struct menudialogdef g_HangarListMenuDialog; #endif diff --git a/src/include/game/activemenu/activemenu.h b/src/include/game/activemenu/activemenu.h index 51f58686a..921a27117 100644 --- a/src/include/game/activemenu/activemenu.h +++ b/src/include/game/activemenu/activemenu.h @@ -5,8 +5,8 @@ #include "types.h" void amOpenPickTarget(void); -s32 menudialog000fcd48(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 amPickTargetMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialog000fcd48(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 amPickTargetMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); void amSetAiBuddyTemperament(bool aggressive); void amSetAiBuddyStealth(void); s32 amGetFirstBuddyIndex(void); diff --git a/src/include/game/cheats.h b/src/include/game/cheats.h index 32ecbfe69..ab7cca410 100644 --- a/src/include/game/cheats.h +++ b/src/include/game/cheats.h @@ -4,7 +4,7 @@ #include "data.h" #include "types.h" -extern struct menudialog g_CheatsMenuDialog; +extern struct menudialogdef g_CheatsMenuDialog; u32 cheatIsUnlocked(s32 cheat_id); bool cheatIsActive(s32 cheat_id); @@ -18,7 +18,7 @@ s32 cheatGetByTimedStageIndex(s32 stage_index, s32 difficulty); s32 cheatGetByCompletedStageIndex(s32 stage_index); s32 cheatGetTime(s32 cheat_id); char *cheatGetName(s32 cheat_id); -s32 cheatMenuHandleDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 cheatMenuHandleDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 cheatCheckboxMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 cheatMenuHandleBuddyCheckbox(s32 operation, struct menuitem *item, union handlerdata *data); s32 cheatMenuHandleTurnOffAllCheats(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/game/endscreen.h b/src/include/game/endscreen.h index 64ec4ef88..b49b4e8b6 100644 --- a/src/include/game/endscreen.h +++ b/src/include/game/endscreen.h @@ -4,16 +4,16 @@ #include "data.h" #include "types.h" -s32 menudialogRetryMission(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogSolo2PEndscreenCompleted(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogSolo2PEndscreenFailed(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialogRetryMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogSolo2PEndscreenCompleted(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogSolo2PEndscreenFailed(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 menuhandlerDeclineMission(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerEndscreenCheats(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerContinueMission(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerReplayLastLevel(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerReplayPreviousMission(s32 operation, struct menuitem *item, union handlerdata *data); -char *menuDialogTitleRetryStageName(struct menudialog *dialog); -char *menuDialogTitleNextMissionStageName(struct menudialog *dialog); +char *menuDialogTitleRetryStageName(struct menudialogdef *dialogdef); +char *menuDialogTitleNextMissionStageName(struct menudialogdef *dialogdef); char *soloMenuTextNumKills(struct menuitem *item); char *soloMenuTextNumShots(struct menuitem *item); char *soloMenuTextNumHeadShots(struct menuitem *item); @@ -27,7 +27,7 @@ char *menuTitleStageCompleted(struct menuitem *item); char *menuTextCurrentStageName3(struct menuitem *item); char *menuTitleStageFailed(struct menuitem *item); char *soloMenuTextMissionTime(struct menuitem *item); -struct menudialog *func0f10d730(void); +struct menudialogdef *func0f10d730(void); void func0f10d770(void); void endscreenHandleContinue(s32 context); char *soloMenuTextTimedCheatName(struct menuitem *item); diff --git a/src/include/game/filemgr.h b/src/include/game/filemgr.h index 1076dfbca..b0e62489f 100644 --- a/src/include/game/filemgr.h +++ b/src/include/game/filemgr.h @@ -52,11 +52,11 @@ s32 filemgrChooseAgentListMenuHandler(s32 operation, struct menuitem *item, unio s32 pakGameNoteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 filemgrFileToCopyListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 filemgrFileToDeleteListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); -s32 filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 pakGameNotesMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 pakChoosePakMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 filemgrMainMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 filemgrInsertOriginalPakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 filemgrCopyOrDeleteListMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 pakGameNotesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 pakChoosePakMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 filemgrMainMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 filemgrDeviceNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 filemgrFileNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 filemgrDeviceNameForErrorMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/game/game_0f09f0.h b/src/include/game/game_0f09f0.h index 29735bfdc..205e865a1 100644 --- a/src/include/game/game_0f09f0.h +++ b/src/include/game/game_0f09f0.h @@ -21,24 +21,24 @@ void func0f0f1418(void); void func0f0f1494(void); char *menuResolveText(u32 thing, void *dialogoritem); char *menuResolveParam2Text(struct menuitem *item); -char *menuResolveDialogTitle(struct menudialog *dialog); +char *menuResolveDialogTitle(struct menudialogdef *dialogdef); void func0f0f15a4(struct menuitem *item, s32 *arg1); -void func0f0f1618(struct menuitem *item, void *arg1, void *arg2, struct menuframe *frame); -void func0f0f1d6c(struct menudialog *dialog, struct menuframe *frame, struct menu *menu); +void func0f0f1618(struct menuitem *item, void *arg1, void *arg2, struct menudialog *dialog); +void func0f0f1d6c(struct menudialogdef *dialogdef, struct menudialog *dialog, struct menu *menu); u32 func0f0f1ef4(void); -void func0f0f2134(struct menudialog *dialog, struct menuframe *frame, struct menu *menu); -u32 func0f0f2354(struct menuframe *frame, struct menuitem *item, u32 *arg2, u32 *arg3); +void func0f0f2134(struct menudialogdef *dialogdef, struct menudialog *dialog, struct menu *menu); +u32 func0f0f2354(struct menudialog *dialog, struct menuitem *item, u32 *arg2, u32 *arg3); bool menuIsScrollableUnscrollable(struct menuitem *item); -bool menuIsItemDisabled(struct menuitem *item, struct menuframe *frame); -bool func0f0f2674(struct menuitem *item, struct menuframe *frame, u32 arg2); -struct menuitem *func0f0f26fc(s32 arg0, s32 arg1, struct menudialog *dialog, s32 *arg3, struct menuframe *frame); -struct menuitem *func0f0f288c(struct menuframe *frame); +bool menuIsItemDisabled(struct menuitem *item, struct menudialog *dialog); +bool func0f0f2674(struct menuitem *item, struct menudialog *dialog, u32 arg2); +struct menuitem *func0f0f26fc(s32 arg0, s32 arg1, struct menudialogdef *dialogdef, s32 *arg3, struct menudialog *dialog); +struct menuitem *func0f0f288c(struct menudialog *dialog); u32 func0f0f2928(void); u32 func0f0f29cc(void); u32 func0f0f2b2c(void); u32 func0f0f2c44(void); -void menuOpenDialog(struct menudialog *dialog, struct menuframe *arg1, struct menu *menu); -void menuPushDialog(struct menudialog *dialog); +void menuOpenDialog(struct menudialogdef *dialogdef, struct menudialog *arg1, struct menu *menu); +void menuPushDialog(struct menudialogdef *dialogdef); #if VERSION >= VERSION_NTSC_1_0 bool func0f0f3220(s32 arg0); @@ -49,7 +49,7 @@ void func0f0f3220(s32 arg0); void menuCloseDialog(void); void menuUpdateCurFrame(void); void menuPopDialog(void); -void func0f0f3704(struct menudialog *dialog); +void func0f0f3704(struct menudialogdef *dialogdef); void func0f0f372c(u8 *arg0, f32 x, f32 y, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 arg8); void func0f0f37a4(u8 *arg0); Gfx *func0f0f38b0(Gfx *gdl, u8 *arg1, u32 arg2); @@ -59,21 +59,21 @@ u32 func0f0f5360(void); u32 func0f0f74a8(void); u32 func0f0f7594(void); u32 func0f0f7728(void); -void func0f0f7e98(struct menuframe *frame); +void func0f0f7e98(struct menudialog *dialog); void menuClose(void); void func0f0f8120(void); -void func0f0f820c(struct menudialog *dialog, s32 root); +void func0f0f820c(struct menudialogdef *dialogdef, s32 root); bool func0f0f82a8(s32 arg0); void func0f0f8300(void); -void menuPushRootDialog(struct menudialog *dialog, s32 arg1); -void func0f0f85e0(struct menudialog *dialog, s32 root); +void menuPushRootDialog(struct menudialogdef *dialogdef, s32 arg1); +void func0f0f85e0(struct menudialogdef *dialogdef, s32 root); u32 func0f0f8634(void); u32 func0f0f86a8(void); void func0f0f8bb4(u8 *arg0, u32 arg1, u32 arg2); void menuInit(void); u32 func0f0f9030(void); u32 func0f0f935c(void); -void func0f0fa574(struct menuframe *frame); +void func0f0fa574(struct menudialog *dialog); void func0f0fa6ac(void); void menuDialogTick(void); u32 func0f0fb488(void); @@ -81,14 +81,14 @@ Gfx *func0f0fbba0(Gfx *gdl, u8 param_2, s32 arg2); Gfx *func0f0fbc30(Gfx *gdl); u32 menuChooseMusic(void); u32 menuGetRoot(void); -void func0f0fce8c(struct menudialog *dialog, s32 playernum, s32 arg2); +void func0f0fce8c(struct menudialogdef *dialogdef, s32 playernum, s32 arg2); char *menuTextSaveDeviceName(struct menuitem *item); u32 func0f0fd118(u32 arg0); bool func0f0fd1f4(s32 device, s32 arg1); void func0f0fd320(s32 arg0, s32 arg1); void func0f0fd494(struct coord *pos); void func0f0fd548(s32 arg0); -struct menuframe *menuIsDialogOpen(struct menudialog *dialog); +struct menudialog *menuIsDialogOpen(struct menudialogdef *dialogdef); struct chrdata *currentPlayerGetCommandingAibot(void); s32 menuhandler000fcc34(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/game/game_10c9c0.h b/src/include/game/game_10c9c0.h index 5750b0a19..aed76c7ba 100644 --- a/src/include/game/game_10c9c0.h +++ b/src/include/game/game_10c9c0.h @@ -9,6 +9,6 @@ s32 menuhandler4MbDropOut(s32 operation, struct menuitem *item, union handlerdat s32 menuhandler0010ca1c(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandler4MbAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandler0010cabc(s32 operation, struct menuitem *item, union handlerdata *data); -s32 menudialog4MbMainMenu(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialog4MbMainMenu(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); #endif diff --git a/src/include/game/mainmenu.h b/src/include/game/mainmenu.h index fc9fd5352..961474b1f 100644 --- a/src/include/game/mainmenu.h +++ b/src/include/game/mainmenu.h @@ -9,7 +9,7 @@ extern u16 g_ControlStyleOptions[]; char *menuTextCurrentStageName(struct menuitem *item); char *soloMenuTextDifficulty(struct menuitem *item); s32 menuhandlerControlStyleImpl(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpindex); -char *soloMenuTitleStageOverview(struct menudialog *dialog); +char *soloMenuTitleStageOverview(struct menudialogdef *dialogdef); f32 func0f1036ac(u8 value, s32 prop); bool isStageDifficultyUnlocked(s32 stageindex, s32 difficulty); char *soloMenuTextBestTime(struct menuitem *item); @@ -25,13 +25,13 @@ char *invMenuTextWeaponName(struct menuitem *item); char *invMenuTextWeaponManufacturer(struct menuitem *item); char *invMenuTextWeaponDescription(struct menuitem *item); bool soloChoosePauseDialog(void); -s32 menudialogBriefing(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialog00103608(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogCoopAntiOptions(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialog0010559c(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 inventoryMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogAbortMission(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 soloMenuDialogPauseStatus(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialogBriefing(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialog00103608(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogCoopAntiOptions(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialog0010559c(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 inventoryMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogAbortMission(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 soloMenuDialogPauseStatus(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 menuhandler001024dc(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandler001024fc(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerAcceptMission(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/game/menu/items.h b/src/include/game/menu/items.h index 3a587ec56..b5aa099fc 100644 --- a/src/include/game/menu/items.h +++ b/src/include/game/menu/items.h @@ -4,79 +4,79 @@ #include "data.h" #include "types.h" -u32 func0f0e5d2c(void); -s32 func0f0e5ef8(s16 arg0, struct menuitem *item); -u32 func0f0e6038(void); -Gfx *menuRenderOverlayList(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2); -Gfx *menuRenderItemList(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemList(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data); +u32 menuitem0f0e5d2c(void); +s32 menuitem0f0e5ef8(s16 arg0, struct menuitem *item); +u32 menuitem0f0e6038(void); +Gfx *menuitemListOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2); +Gfx *menuitemListRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemListTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data); -void menuInitItemDropdown(struct menuitem *item, union menuitemdata *data); -Gfx *menuRenderItemDropdown(Gfx *gdl); -bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); +void menuitemDropdownInit(struct menuitem *item, union menuitemdata *data); +Gfx *menuitemDropdownRender(Gfx *gdl); +bool menuitemDropdownTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); -Gfx *menuRenderOverlayDropdown(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menuframe *frame, union menuitemdata *data); -bool menuIsStringEmptyOrSpaces(char *text); -Gfx *menuRenderItemKeyboard(Gfx *gdl, struct menurendercontext *thing); -bool menuTickItemKeyboard(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data); -void menuInitItemKeyboard(struct menuitem *item, union menuitemdata *data); +Gfx *menuitemDropdownOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menudialog *dialog, union menuitemdata *data); +bool menuitemKeyboardIsStringEmptyOrSpaces(char *text); +Gfx *menuitemKeyboardRender(Gfx *gdl, struct menurendercontext *thing); +bool menuitemKeyboardTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemdata *data); +void menuitemKeyboardInit(struct menuitem *item, union menuitemdata *data); -Gfx *menuRenderItemSeparator(Gfx *gdl, struct menurendercontext *context); +Gfx *menuitemSeparatorRender(Gfx *gdl, struct menurendercontext *context); -Gfx *menuRenderObjective(Gfx *gfx, struct menuframe *frame, s32 index, s32 position, s32 x, s32 y, s32 width, s32 height, s32 arg8, s32 arg9); -Gfx *menuRenderItemObjectives(Gfx *gdl, struct menurendercontext *context); +Gfx *menuitemObjectiveRender(Gfx *gfx, struct menudialog *dialog, s32 index, s32 position, s32 x, s32 y, s32 width, s32 height, s32 arg8, s32 arg9); +Gfx *menuitemObjectivesRender(Gfx *gdl, struct menurendercontext *context); -Gfx *menuRenderItemModel(Gfx *gdl, struct menurendercontext *context); +Gfx *menuitemModelRender(Gfx *gdl, struct menurendercontext *context); -Gfx *menuRenderItemLabel(Gfx *gdl, struct menurendercontext *context); +Gfx *menuitemLabelRender(Gfx *gdl, struct menurendercontext *context); -Gfx *menuRenderItemMeter(Gfx *gdl, struct menurendercontext *context); +Gfx *menuitemMeterRender(Gfx *gdl, struct menurendercontext *context); -Gfx *menuRenderItemSelectable(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemSelectable(struct menuitem *item, struct menuinputs *inputs, u32 arg2); +Gfx *menuitemSelectableRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemSelectableTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2); -Gfx *menuRenderItemSlider(Gfx *gdl); -bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); -void menuInitItemSlider(union menuitemdata *data); +Gfx *menuitemSliderRender(Gfx *gdl); +bool menuitemSliderTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); +void menuitemSliderInit(union menuitemdata *data); -Gfx *menuRenderItemCarousel(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemCarousel(struct menuitem *item, struct menuinputs *inputs, u32 arg2); +Gfx *menuitemCarouselRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemCarouselTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2); -Gfx *menuRenderItemCheckbox(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemCheckbox(struct menuitem *item, struct menuinputs *inputs, u32 arg2); +Gfx *menuitemCheckboxRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemCheckboxTick(struct menuitem *item, struct menuinputs *inputs, u32 arg2); -char *menuItemScrollableGetText(u32 type); -Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); -void menuInitItemScrollable(union menuitemdata *data); +char *menuitemScrollableGetText(u32 type); +Gfx *menuitemScrollableRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemScrollableTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); +void menuitemScrollableInit(union menuitemdata *data); -Gfx *menuRenderItemMarquee(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemMarquee(struct menuitem *item, union menuitemdata *data); -void menuInitItemMarquee(union menuitemdata *data); +Gfx *menuitemMarqueeRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemMarqueeTick(struct menuitem *item, union menuitemdata *data); +void menuitemMarqueeInit(union menuitemdata *data); -Gfx *menuRenderItem07(Gfx *gdl); +Gfx *menuitem07Render(Gfx *gdl); -Gfx *menuRenderItemRanking(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemRanking(struct menuinputs *inputs, u32 arg1, union menuitemdata *data); -void menuInitItemRanking(union menuitemdata *data); +Gfx *menuitemRankingRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemRankingTick(struct menuinputs *inputs, u32 arg1, union menuitemdata *data); +void menuitemRankingInit(union menuitemdata *data); -Gfx *menuRenderItemPlayerStats(Gfx *gdl, struct menurendercontext *context); -bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); -Gfx *menuRenderOverlayPlayerStats(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menuframe *frame, union menuitemdata *data); -void menuInitItemPlayerStats(struct menuitem *item, union menuitemdata *data); +Gfx *menuitemPlayerStatsRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemPlayerStatsTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); +Gfx *menuitemPlayerStatsOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menudialog *dialog, union menuitemdata *data); +void menuitemPlayerStatsInit(struct menuitem *item, union menuitemdata *data); -u32 func0f0ef394(void); -Gfx *menuRenderControllerTexture(Gfx *gdl, s32 x, s32 y, s32 texturenum, u32 alpha); -Gfx *menuRenderControllerLines(Gfx *gdl, struct menurendercontext *context, s32 arg2, s32 arg3, s32 x, s32 y, u32 alpha); -u16 menuControllerGetButtonAction(s32 mode, s32 buttonnum); -Gfx *menuRenderControllerText(Gfx *gdl, s32 curmode, struct menurendercontext *context, s32 x, s32 y, u32 valuecolour, u32 labelcolour, s8 prevmode); -Gfx *menuRenderControllerInfo(Gfx *gdl, struct menurendercontext *context, s32 x, s32 y, s32 curmode, u32 alpha, u32 colour1, u32 colour2, s8 prevmode); -Gfx *menuRenderItemController(Gfx *gdl, struct menurendercontext *context); -void menuInitItemController(union menuitemdata *data); +u32 menuitem0f0ef394(void); +Gfx *menuitemControllerRenderTexture(Gfx *gdl, s32 x, s32 y, s32 texturenum, u32 alpha); +Gfx *menuitemControllerRenderLines(Gfx *gdl, struct menurendercontext *context, s32 arg2, s32 arg3, s32 x, s32 y, u32 alpha); +u16 menuitemControllerGetButtonAction(s32 mode, s32 buttonnum); +Gfx *menuitemControllerTextRender(Gfx *gdl, s32 curmode, struct menurendercontext *context, s32 x, s32 y, u32 valuecolour, u32 labelcolour, s8 prevmode); +Gfx *menuitemControllerInfoRender(Gfx *gdl, struct menurendercontext *context, s32 x, s32 y, s32 curmode, u32 alpha, u32 colour1, u32 colour2, s8 prevmode); +Gfx *menuitemControllerRender(Gfx *gdl, struct menurendercontext *context); +void menuitemControllerInit(union menuitemdata *data); -Gfx *menuRenderItem(Gfx *gdl, struct menurendercontext *context); -bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); -void menuInitItem(struct menuitem *item, union menuitemdata *data); -Gfx *menuRenderOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menuframe *frame, union menuitemdata *data); +Gfx *menuitemRender(Gfx *gdl, struct menurendercontext *context); +bool menuitemTick(struct menuitem *item, struct menudialog *dialog, struct menuinputs *inputs, u32 arg3, union menuitemdata *data); +void menuitemInit(struct menuitem *item, union menuitemdata *data); +Gfx *menuitemOverlay(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, struct menudialog *dialog, union menuitemdata *data); #endif diff --git a/src/include/game/mplayer/ingame.h b/src/include/game/mplayer/ingame.h index 33e6a67c8..72205e79a 100644 --- a/src/include/game/mplayer/ingame.h +++ b/src/include/game/mplayer/ingame.h @@ -9,7 +9,7 @@ char *mpMenuTextInGameLimit(struct menuitem *item); char *menutextPauseOrUnpause(s32 arg0); char *menutextMatchTime(s32 arg0); char *mpMenuTextWeaponDescription(struct menuitem *item); -char *mpMenuTitleStatsFor(struct menudialog *dialog); +char *mpMenuTitleStatsFor(struct menudialogdef *dialogdef); char *mpMenuTextWeaponOfChoiceName(struct menuitem *item); char *mpMenuTextAward1(struct menuitem *item); char *mpMenuTextAward2(struct menuitem *item); diff --git a/src/include/game/mplayer/scenarios.h b/src/include/game/mplayer/scenarios.h index f2566bf76..d67813237 100644 --- a/src/include/game/mplayer/scenarios.h +++ b/src/include/game/mplayer/scenarios.h @@ -4,8 +4,8 @@ #include "data.h" #include "types.h" -extern struct menudialog g_MpScenarioMenuDialog; -extern struct menudialog g_MpQuickTeamScenarioMenuDialog; +extern struct menudialogdef g_MpScenarioMenuDialog; +extern struct menudialogdef g_MpQuickTeamScenarioMenuDialog; struct mpscenariooverview { u16 name; diff --git a/src/include/game/mplayer/setup.h b/src/include/game/mplayer/setup.h index 6a512065d..4c9ca1950 100644 --- a/src/include/game/mplayer/setup.h +++ b/src/include/game/mplayer/setup.h @@ -10,7 +10,7 @@ s32 mpArenaMenuHandler(s32 operation, struct menuitem *item, union handlerdata * char *mpMenuTextWeaponNameForSlot(struct menuitem *item); char *mpMenuTextSetupName(struct menuitem *item); s32 mpCharacterBodyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, s32 mpbodynum, bool isplayer); -s32 menudialog0017a174(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialog0017a174(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 mpChallengesListHandler(s32 operation, struct menuitem *item, union handlerdata *data); char *mpMenuTextKills(struct menuitem *item); char *mpMenuTextDeaths(struct menuitem *item); @@ -30,7 +30,7 @@ void mpFormatDamageValue(char *dst, f32 damage); char *mpMenuTextPainReceived(struct menuitem *item); char *mpMenuTextDamageDealt(struct menuitem *item); s32 mpMedalMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); -char *mpMenuTitleStatsForPlayerName(struct menudialog *dialog); +char *mpMenuTitleStatsForPlayerName(struct menudialogdef *dialogdef); char *mpMenuTextUsernamePassword(struct menuitem *item); s32 mpCharacterHeadMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data, s32 mpheadnum, bool arg4); char *mpMenuTextBodyName(struct menuitem *item); @@ -43,9 +43,9 @@ s32 menuhandlerMpHandicapPlayer(s32 operation, struct menuitem *item, union hand char *mpMenuTextHandicapPlayerName(struct menuitem *item); s32 mpAddChangeSimulantMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); char *mpMenuTextSimulantDescription(struct menuitem *item); -s32 menudialog0017ccfc(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialog0017ccfc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 mpBotDifficultyMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); -char *mpMenuTitleEditSimulant(struct menudialog *dialog); +char *mpMenuTitleEditSimulant(struct menudialogdef *dialogdef); char *mpMenuTextSimulantName(struct menuitem *item); s32 menuhandlerMpNTeams(s32 operation, struct menuitem *item, union handlerdata *data, s32 numteams); char *mpMenuTextChrNameForTeamSetup(struct menuitem *item); @@ -55,11 +55,11 @@ s32 mpSelectTuneListHandler(s32 operation, struct menuitem *item, union handlerd char *mpMenuTextCurrentTrack(struct menuitem *item); s32 mpTeamNameMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); char *mpMenuTextTeamName(struct menuitem *item); -char *func0f17e318(struct menudialog *dialog); -s32 menudialog0017e3fc(s32 operation, struct menudialog *dialog, union handlerdata *data); +char *func0f17e318(struct menudialogdef *dialogdef); +s32 menudialog0017e3fc(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 mpChallengesListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); char *mpMenuTextChallengeName(struct menuitem *item); -s32 mpCombatChallengesMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 mpCombatChallengesMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); char *mpMenuTextSavePlayerOrCopy(struct menuitem *item); char *mpMenuTextArenaName(struct menuitem *item); char *mpMenuTextWeaponSetName(struct menuitem *item); @@ -100,7 +100,7 @@ void pacHandleDeath(s32 cplayernum, s32 vplayernum); void pacTick(void); Gfx *pacRenderHud(Gfx *gdl); bool pacRadarChr(Gfx **gdl, struct prop *prop); -s32 mpOptionsMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 mpOptionsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); char *mpMenuTextScenarioShortName(struct menuitem *item); char *mpMenuTextScenarioName(struct menuitem *item); s32 scenarioScenarioMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); @@ -139,8 +139,8 @@ s32 menuhandlerMpScoreLimitSlider(s32 operation, struct menuitem *item, union ha s32 menuhandlerMpTeamScoreLimitSlider(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpRestoreScoreDefaults(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpRestoreHandicapDefaults(s32 operation, struct menuitem *item, union handlerdata *data); -s32 menudialogMpReady(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogMpSimulant(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialogMpReady(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogMpSimulant(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 menuhandlerMpSimulantHead(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpSimulantBody(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpDeleteSimulant(s32 operation, struct menuitem *item, union handlerdata *data); @@ -148,7 +148,7 @@ s32 menuhandlerMpChangeSimulantType(s32 operation, struct menuitem *item, union s32 menuhandlerMpClearAllSimulants(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpAddSimulant(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpSimulantSlot(s32 operation, struct menuitem *item, union handlerdata *data); -s32 menudialogMpSimulants(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialogMpSimulants(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 menuhandlerMpTwoTeams(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpThreeTeams(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpFourTeams(s32 operation, struct menuitem *item, union handlerdata *data); @@ -156,7 +156,7 @@ s32 menuhandlerMpMaximumTeams(s32 operation, struct menuitem *item, union handle s32 menuhandlerMpHumansVsSimulants(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpHumanSimulantPairs(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpTeamSlot(s32 operation, struct menuitem *item, union handlerdata *data); -s32 menudialogMpSelectTune(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialogMpSelectTune(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 menuhandlerMpMultipleTunes(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpTeamNameSlot(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandler0017e38c(s32 operation, struct menuitem *item, union handlerdata *data); @@ -168,12 +168,12 @@ s32 menuhandlerMpLock(s32 operation, struct menuitem *item, union handlerdata *d s32 menuhandlerMpSavePlayer(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandler0017ef30(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpSaveSettings(s32 operation, struct menuitem *item, union handlerdata *data); -s32 menudialogMpGameSetup(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogMpQuickGo(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialogMpGameSetup(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogMpQuickGo(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 menuhandlerMpFinishedSetup(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerQuickTeamSeparator(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpQuickTeamOption(s32 operation, struct menuitem *item, union handlerdata *data); -s32 menudialogCombatSimulator(s32 operation, struct menudialog *dialog, union handlerdata *data); +s32 menudialogCombatSimulator(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 menuhandlerMpAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpDisplayTeam(s32 operation, struct menuitem *item, union handlerdata *data); s32 menuhandlerMpOneHitKills(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/game/training/menus.h b/src/include/game/training/menus.h index 5d4546234..8bdfbdec9 100644 --- a/src/include/game/training/menus.h +++ b/src/include/game/training/menus.h @@ -33,15 +33,15 @@ char *htMenuTextCancelOrAbort(struct menuitem *item); char *htMenuTextTimeTakenValue(struct menuitem *item); char *bioMenuTextName(struct menuitem *item); char *ciMenuTextHangarBioSubheading(struct menuitem *item); -struct menudialog *ciGetFrWeaponListMenuDialog(void); -s32 frTrainingInfoMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 frTrainingStatsMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogDeviceTrainingResults(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialog001a6aa4(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 menudialogFiringRangeResults(s32 operation, struct menudialog *dialog, union handlerdata *data); -s32 ciHangarHolographMenuDialog(s32 operation, struct menudialog *dialog, union handlerdata *data); +struct menudialogdef *ciGetFrWeaponListMenuDialog(void); +s32 frTrainingInfoMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 frTrainingStatsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 ciCharacterProfileMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 dtTrainingDetailsMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogDeviceTrainingResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialog001a6aa4(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 menudialogFiringRangeResults(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); +s32 ciHangarHolographMenuDialog(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); s32 frDetailsOkMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 frAbortMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); s32 frWeaponListMenuHandler(s32 operation, struct menuitem *item, union handlerdata *data); diff --git a/src/include/types.h b/src/include/types.h index 199e2b98b..35921d14b 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -3560,13 +3560,13 @@ struct menuitem { }; }; -struct menudialog { +struct menudialogdef { u8 type; u32 title; struct menuitem *items; - s32 (*handler)(s32 operation, struct menudialog *dialog, union handlerdata *data); + s32 (*handler)(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data); u32 unk10; - struct menudialog *nextsibling; + struct menudialogdef *nextsibling; }; struct twowords { @@ -3764,13 +3764,13 @@ struct fireslot { }; struct menulayer { - struct menuframe *siblings[5]; + struct menudialog *siblings[5]; s8 numsiblings; s8 cursibling; }; -struct menuframe { - struct menudialog *dialog; +struct menudialog { + struct menudialogdef *definition; u8 unk04; u8 unk05; u16 unk06; @@ -3937,11 +3937,11 @@ struct menu660 { }; struct menu { - struct menuframe frames[VERSION >= VERSION_NTSC_1_0 ? 10 : 9]; - /*0x460*/ s16 numframes; + struct menudialog dialogs[VERSION >= VERSION_NTSC_1_0 ? 10 : 9]; + /*0x460*/ s16 numdialogs; /*0x464*/ struct menulayer layers[6]; /*0x4f4*/ s16 depth; // index into layers. 1-indexed? - /*0x4f8*/ struct menuframe *curframe; + /*0x4f8*/ struct menudialog *curdialog; /*0x4fc*/ struct menu4fc unk4fc[VERSION >= VERSION_NTSC_1_0 ? 88 : 80]; /*0x65c*/ s32 unk65c; /*0x660*/ struct menu660 unk660[VERSION >= VERSION_NTSC_1_0 ? 12 : 10]; @@ -5138,7 +5138,7 @@ struct menudata { /*0x000*/ s32 count; /*0x004*/ s32 root; /*0x008*/ s32 unk008; // also a menuroot constant - /*0x00c*/ struct menudialog *unk00c; + /*0x00c*/ struct menudialogdef *unk00c; /*0x010*/ f32 unk010; /*0x014*/ u8 unk014; /*0x015*/ u8 unk015; @@ -6313,7 +6313,7 @@ struct menurendercontext { s16 height; struct menuitem *item; bool focused; - struct menuframe *frame; + struct menudialog *dialog; union menuitemdata *data; };