From 68df5343ba4de03ad5ae938d18c5da8ef1dbbf6d Mon Sep 17 00:00:00 2001 From: Jonaeru Date: Sat, 25 Apr 2026 00:53:00 +0900 Subject: [PATCH 1/2] Disable all menus in Perfect Menu except Network Game and Change Agent --- src/game/mainmenu.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/game/mainmenu.c b/src/game/mainmenu.c index 5c7c3dcd5..8eeec2d2e 100644 --- a/src/game/mainmenu.c +++ b/src/game/mainmenu.c @@ -3861,7 +3861,11 @@ struct menudialogdef g_CiOptionsViaPcMenuDialog = { L_OPTIONS_180, // "Options" g_CiOptionsMenuItems, menudialog0010559c, +#ifdef PLATFORM_N64 0, +#else + MENUDIALOGFLAG_IGNOREBACK, +#endif NULL, }; @@ -5046,7 +5050,11 @@ struct menuitem g_MainMenuMenuItems[] = { { MENUITEMTYPE_SELECTABLE, 0, +#ifdef PLATFORM_N64 MENUITEMFLAG_SELECTABLE_CLOSESDIALOG | MENUITEMFLAG_BIGFONT, +#else + MENUITEMFLAG_SELECTABLE_CLOSESDIALOG | MENUITEMFLAG_BIGFONT | MENUITEMFLAG_ALWAYSDISABLED, +#endif L_MISC_446, // "Carrington Institute" 0x00000001, NULL, @@ -5054,7 +5062,11 @@ struct menuitem g_MainMenuMenuItems[] = { { MENUITEMTYPE_SELECTABLE, 0, +#ifdef PLATFORM_N64 MENUITEMFLAG_BIGFONT, +#else + MENUITEMFLAG_BIGFONT | MENUITEMFLAG_ALWAYSDISABLED, +#endif (uintptr_t)&mainMenuTextLabel, 0x00000002, menuhandlerMainMenuSoloMissions, @@ -5062,7 +5074,11 @@ struct menuitem g_MainMenuMenuItems[] = { { MENUITEMTYPE_SELECTABLE, 1, +#ifdef PLATFORM_N64 MENUITEMFLAG_BIGFONT, +#else + MENUITEMFLAG_BIGFONT | MENUITEMFLAG_ALWAYSDISABLED, +#endif (uintptr_t)&mainMenuTextLabel, 0x00000003, menuhandlerMainMenuCombatSimulator, @@ -5070,7 +5086,11 @@ struct menuitem g_MainMenuMenuItems[] = { { MENUITEMTYPE_SELECTABLE, 2, +#ifdef PLATFORM_N64 MENUITEMFLAG_BIGFONT, +#else + MENUITEMFLAG_BIGFONT | MENUITEMFLAG_ALWAYSDISABLED, +#endif (uintptr_t)&mainMenuTextLabel, 0x00000004, menuhandlerMainMenuCooperative, @@ -5078,7 +5098,11 @@ struct menuitem g_MainMenuMenuItems[] = { { MENUITEMTYPE_SELECTABLE, 3, +#ifdef PLATFORM_N64 MENUITEMFLAG_BIGFONT, +#else + MENUITEMFLAG_BIGFONT | MENUITEMFLAG_ALWAYSDISABLED, +#endif (uintptr_t)&mainMenuTextLabel, 0x00000005, menuhandlerMainMenuCounterOperative, @@ -5121,7 +5145,11 @@ struct menudialogdef g_CiMenuViaPcMenuDialog = { L_OPTIONS_116, // "Perfect Menu" g_MainMenuMenuItems, menudialogMainMenu, +#ifdef PLATFORM_N64 MENUDIALOGFLAG_STARTSELECTS, +#else + MENUDIALOGFLAG_STARTSELECTS | MENUDIALOGFLAG_IGNOREBACK, +#endif &g_CiOptionsViaPcMenuDialog, }; From 04a518840f4a7310792f6d587d63a142627a76f3 Mon Sep 17 00:00:00 2001 From: Jonaeru Date: Sun, 26 Apr 2026 20:59:32 +0900 Subject: [PATCH 2/2] Add "Player Setup" menu to "Join Game" menu Add `MENUDIALOGFLAG_STARTSELECTS` to the "Network Game" menu Remove `MENUDIALOGFLAG_IGNOREBACK` from the "Join Network Game" menu --- port/src/net/netmenu.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/port/src/net/netmenu.c b/port/src/net/netmenu.c index 4d5b36af1..600c27593 100644 --- a/port/src/net/netmenu.c +++ b/port/src/net/netmenu.c @@ -9,6 +9,7 @@ #include "game/mainmenu.h" #include "game/menu.h" #include "game/gamefile.h" +#include "game/filelist.h" #include "video.h" #include "input.h" #include "config.h" @@ -17,6 +18,8 @@ extern MenuItemHandlerResult menuhandlerMainMenuCombatSimulator(s32 operation, struct menuitem *item, union handlerdata *data); extern MenuItemHandlerResult menuhandlerMpAdvancedSetup(s32 operation, struct menuitem *item, union handlerdata *data); +extern struct menuitem g_MpPlayerSetup234MenuItems[]; +extern struct menudialogdef g_NetJoinPlayerSetupMenuDialog; static s32 g_NetMenuMaxPlayers = NET_MAX_CLIENTS; static s32 g_NetMenuPort = NET_DEFAULT_PORT; @@ -121,7 +124,7 @@ struct menudialogdef g_NetHostMenuDialog = { (uintptr_t)"Host Network Game", g_NetHostMenuItems, NULL, - MENUDIALOGFLAG_LITERAL_TEXT, + MENUDIALOGFLAG_LITERAL_TEXT | MENUDIALOGFLAG_STARTSELECTS, NULL, }; @@ -273,6 +276,18 @@ MenuItemHandlerResult menuhandlerJoinStart(s32 operation, struct menuitem *item, return 0; } +static MenuItemHandlerResult menuhandlerJoinPlayerSetup(s32 operation, struct menuitem *item, union handlerdata *data) +{ + if (operation == MENUOP_SET) { + // load MP player file + filelistCreate(0, FILETYPE_MPPLAYER); + filelistsTick(); + menuPushDialog(&g_NetJoinPlayerSetupMenuDialog); + } + + return 0; +} + struct menuitem g_NetJoinMenuItems[] = { { MENUITEMTYPE_SELECTABLE, @@ -282,6 +297,14 @@ struct menuitem g_NetJoinMenuItems[] = { (uintptr_t)&menutextJoinAddress, menuhandlerJoinAddress, }, + { + MENUITEMTYPE_SELECTABLE, + 0, + 0, + L_MPMENU_028, // "Player Setup" + 0, + menuhandlerJoinPlayerSetup, + }, { MENUITEMTYPE_SELECTABLE, 0, @@ -314,7 +337,7 @@ struct menudialogdef g_NetJoinMenuDialog = { (uintptr_t)"Join Network Game", g_NetJoinMenuItems, NULL, - MENUDIALOGFLAG_LITERAL_TEXT | MENUDIALOGFLAG_STARTSELECTS | MENUDIALOGFLAG_IGNOREBACK, + MENUDIALOGFLAG_LITERAL_TEXT | MENUDIALOGFLAG_STARTSELECTS, NULL, }; @@ -385,6 +408,15 @@ struct menudialogdef g_NetMenuDialog = { (uintptr_t)"Network Game", g_NetMenuItems, NULL, - MENUDIALOGFLAG_MPLOCKABLE | MENUDIALOGFLAG_LITERAL_TEXT, + MENUDIALOGFLAG_MPLOCKABLE | MENUDIALOGFLAG_LITERAL_TEXT | MENUDIALOGFLAG_STARTSELECTS, + NULL, +}; + +struct menudialogdef g_NetJoinPlayerSetupMenuDialog = { + MENUDIALOGTYPE_DEFAULT, + L_MPMENU_028, // "Player Setup" + g_MpPlayerSetup234MenuItems, + NULL, + MENUDIALOGFLAG_DROPOUTONCLOSE | MENUDIALOGFLAG_STARTSELECTS, NULL, };