From d916fee3a642859a42321f86f735adde2b8ae027 Mon Sep 17 00:00:00 2001 From: GenericHeroGuy Date: Sun, 16 Mar 2025 22:16:49 +0100 Subject: [PATCH] Expose menu routines/drawers Plus some extras for SOCcing more menus --- src/deh_soc.c | 50 +++++++++++++++++++++++- src/deh_soc.h | 2 + src/deh_tables.c | 43 ++++++++++++++++++++ src/deh_tables.h | 12 ++++++ src/m_menu.c | 100 +++++++++++++++++++---------------------------- src/m_menu.h | 35 +++++++++++++++++ 6 files changed, 180 insertions(+), 62 deletions(-) diff --git a/src/deh_soc.c b/src/deh_soc.c index c1f8aa3c8..c2131b084 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2145,6 +2145,13 @@ void readtextprompt(MYFILE *f, INT32 num) Z_Free(s); } +// super secret menu cvars... :shushing_face: +static struct { const char *name; consvar_t *var; } HIDDENVARS[] = { + { "NEXTMAP", &cv_nextmap }, + { "NEWGAMETYPE", &cv_newgametype }, + { NULL, NULL } +}; + static void readmenuitem(MYFILE *f, menu_t *menudef, char *itemname) { char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL); @@ -2198,6 +2205,8 @@ static void readmenuitem(MYFILE *f, menu_t *menudef, char *itemname) flags = IT_HEADER; else if (fastcmp(word+4, "SECRET")) flags = IT_SECRET; + else if (fastcmp(word+4, "WHITE")) + flags = IT_WHITESTRING; else if (word[4]) { deh_warning("MenuItem %s: unknown word '%s'", "", word); @@ -2234,6 +2243,13 @@ static void readmenuitem(MYFILE *f, menu_t *menudef, char *itemname) continue; } consvar_t *cvar = CV_FindVar(word2); + if (!cvar) + for (size_t i = 0; HIDDENVARS[i].name; i++) + if (fasticmp(word2, HIDDENVARS[i].name)) + { + cvar = HIDDENVARS[i].var; + break; + } if (!cvar) { deh_warning("MenuItem %s: unable to find cvar '%s'", "", word2); @@ -2267,7 +2283,7 @@ static void readmenuitem(MYFILE *f, menu_t *menudef, char *itemname) deh_warning("MenuItem %s: action already set!", ""); continue; } - void (*routine)(INT32 choice) = NULL; // TODO + void (*routine)(INT32) = get_menuroutine(word2); if (!routine) { deh_warning("MenuItem %s: unknown call routine '%s'", "", word2); @@ -2279,7 +2295,7 @@ static void readmenuitem(MYFILE *f, menu_t *menudef, char *itemname) } else if (fastcmp(word, "ALPHAKEY") || fastcmp(word, "Y")) { - menuitem->alphaKey = atoi(word2); + menuitem->alphaKey = get_number(word2); } else deh_warning("MenuItem %s: unknown word '%s'", "", word); @@ -2522,10 +2538,13 @@ void readmenu(MYFILE *f, INT32 num) } else if (fastcmp(word, "DRAWROUTINE")) { + void (*drawer)(void) = get_menudrawer(word2); + if (drawer == NULL) { deh_warning("Menu %d: unknown draw routine '%s'", num, word2); continue; } + menudef->drawroutine = drawer; } else if (fastcmp(word, "X")) { @@ -2537,10 +2556,13 @@ void readmenu(MYFILE *f, INT32 num) } else if (fastcmp(word, "QUITROUTINE")) { + void (*routine)(INT32) = get_menuroutine(word2); + if (!routine) { deh_warning("Menu %d: unknown quit routine '%s'", num, word2); continue; } + menudef->quitroutine = routine; } else deh_warning("Menu %d: unknown word '%s'", num, word); @@ -4303,6 +4325,30 @@ menutype_t get_menutype(const char *word) return MN_NONE; } +void (*get_menuroutine(const char *word))(INT32) +{ // Returns the value of MR_ enumerations + size_t i; + if (fastncmp("MR_",word,3)) + word += 3; // take off the MR_ + for (i = 0; MENU_ROUTINES[i].name; i++) + if (fasticmp(word, MENU_ROUTINES[i].name)) + return MENU_ROUTINES[i].routine; + deh_warning("Couldn't find menu routine named 'MR_%s'",word); + return NULL; +} + +void (*get_menudrawer(const char *word))(void) +{ // Returns the value of MD_ enumerations + size_t i; + if (fastncmp("MD_",word,3)) + word += 3; // take off the MD_ + for (i = 0; MENU_DRAWERS[i].name; i++) + if (fasticmp(word, MENU_DRAWERS[i].name)) + return MENU_DRAWERS[i].drawer; + deh_warning("Couldn't find menu drawer named 'MD_%s'",word); + return NULL; +} + /*static INT16 get_gametype(const char *word) { // Returns the value of GT_ enumerations INT16 i; diff --git a/src/deh_soc.h b/src/deh_soc.h index cb24db595..a1f7f104e 100644 --- a/src/deh_soc.h +++ b/src/deh_soc.h @@ -57,6 +57,8 @@ spritenum_t get_sprite(const char *word); playersprite_t get_sprite2(const char *word); sfxenum_t get_sfx(const char *word); menutype_t get_menutype(const char *word); +void (*get_menuroutine(const char *word))(INT32); +void (*get_menudrawer(const char *word))(void); //INT16 get_gametype(const char *word); //powertype_t get_power(const char *word); skincolornum_t get_skincolor(const char *word); diff --git a/src/deh_tables.c b/src/deh_tables.c index dbb9098f0..346bebbc2 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -694,10 +694,53 @@ const char *const MENUTYPES_LIST[] = { "OP_P3CAMERA", "OP_P4CAMERA", "MISC_REPLAY", + "MP_OFFLINESERVER", "SPECIAL" }; +struct menu_routine_s const MENU_ROUTINES[] = { + { "SETUPMULTIHANDLER", &M_SetupMultiHandler }, + { "HANDLESETUPMULTIPLAYER", &M_HandleSetupMultiPlayer }, + { "QUITMULTIPLAYERMENU", &M_QuitMultiPlayerMenu }, + { "STARTSERVERMENU", &M_StartServerMenu }, + { "STARTOFFLINESERVERMENU", &M_StartOfflineServerMenu }, + { "STARTSERVER", &M_StartServer }, + { "CONNECTMENUMODCHECKS", &M_ConnectMenuModChecks }, + { "HANDLECONNECTIP", &M_HandleConnectIP }, + { "CANCELCONNECT", &M_CancelConnect }, + { "SETUP1PCONTROLSMENU", &M_Setup1PControlsMenu }, + { "SETUP2PCONTROLSMENU", &M_Setup2PControlsMenu }, + { "SETUP3PCONTROLSMENU", &M_Setup3PControlsMenu }, + { "SETUP4PCONTROLSMENU", &M_Setup4PControlsMenu }, + { "VIDEOMODEMENU", &M_VideoModeMenu }, +#ifdef HWRENDER + { "OPENGLOPTIONSMENU", &M_OpenGLOptionsMenu }, +#endif + { "HANDLEVIDEOMODE", &M_HandleVideoMode }, + { "HANDLESOUNDTEST", &M_HandleSoundTest }, + { "MUSICTEST", &M_MusicTest }, + { "SCREENSHOTOPTIONS", &M_ScreenshotOptions }, + { "ADDONSOPTIONS", &M_AddonsOptions }, + { "ERASEDATA", &M_EraseData }, + { "MANUAL", &M_Manual }, + { "CREDITS", &M_Credits }, + { "BLANCREDITS", &M_BlanCredits }, + { NULL, NULL } +}; + +struct menu_drawer_s const MENU_DRAWERS[] = { + { "DRAWGENERICMENU", &M_DrawGenericMenu }, + { "DRAWMPMAINMENU", &M_DrawMPMainMenu }, + { "DRAWSETUPMULTIPLAYERMENU", &M_DrawSetupMultiPlayerMenu }, + { "DRAWSERVERMENU", &M_DrawServerMenu }, + { "DRAWVIDEOMENU", &M_DrawVideoMenu }, + { "DRAWVIDEOMODE", &M_DrawVideoMode }, + { "DRAWSKYROOM", &M_DrawSkyRoom }, + { "DRAWHUDOPTIONS", &M_DrawHUDOptions }, + { NULL, NULL } +}; + struct int_const_s const INT_CONST[] = { // If a mod removes some variables here, // please leave the names in-tact and just set diff --git a/src/deh_tables.h b/src/deh_tables.h index 15923a6c0..b67743ee6 100644 --- a/src/deh_tables.h +++ b/src/deh_tables.h @@ -53,6 +53,16 @@ struct actionpointer_t const char *name; ///< Name of the action in ALL CAPS. }; +struct menu_routine_s { + const char *name; + void (*routine)(INT32); +}; + +struct menu_drawer_s { + const char *name; + void (*drawer)(void); +}; + struct int_const_s { const char *n; // has to be able to hold both fixed_t and angle_t, so drastic measure!! @@ -82,6 +92,8 @@ extern const char *const KARTSTUFF_LIST[]; extern const char *const KARTHUD_LIST[]; extern const char *const HUDITEMS_LIST[]; extern const char *const MENUTYPES_LIST[]; +extern struct menu_routine_s const MENU_ROUTINES[]; +extern struct menu_drawer_s const MENU_DRAWERS[]; extern struct int_const_s const INT_CONST[]; diff --git a/src/m_menu.c b/src/m_menu.c index 715837f6b..582b80955 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -227,9 +227,6 @@ FUNCNORETURN static ATTRNORETURN void M_UltimateCheat(INT32 choice); static void M_GetAllEmeralds(INT32 choice); static void M_DestroyRobots(INT32 choice); //static void M_LevelSelectWarp(INT32 choice); -static void M_Credits(INT32 choice); -static void M_BlanCredits(INT32 choice); -static void M_MusicTest(INT32 choice); static void M_PandorasBox(INT32 choice); static void M_EmblemHints(INT32 choice); static char *M_GetConditionString(condition_t cond); @@ -238,7 +235,6 @@ menu_t SR_MainDef, SR_UnlockChecklistDef; // Misc. Main Menu static void M_SinglePlayerMenu(INT32 choice); static void M_Options(INT32 choice); -static void M_Manual(INT32 choice); static void M_SelectableClearMenus(INT32 choice); static void M_Retry(INT32 choice); static void M_EndGame(INT32 choice); @@ -275,29 +271,19 @@ static menu_t SP_TimeAttackDef, SP_ReplayDef, SP_GuestReplayDef, SP_GhostDef; //static menu_t SP_NightsAttackDef, SP_NightsReplayDef, SP_NightsGuestReplayDef, SP_NightsGhostDef; // Multiplayer -static void M_StartServerMenu(INT32 choice); static void M_ConnectMenu(INT32 choice); -static void M_ConnectMenuModChecks(INT32 choice); static void M_Refresh(INT32 choice); static void M_Connect(INT32 choice); -static void M_StartOfflineServerMenu(INT32 choice); -static void M_StartServer(INT32 choice); static void M_SetupMultiPlayer(INT32 choice); static void M_SetupMultiPlayer2(INT32 choice); static void M_SetupMultiPlayer3(INT32 choice); static void M_SetupMultiPlayer4(INT32 choice); -static void M_SetupMultiHandler(INT32 choice); // Options // Split into multiple parts due to size // Controls menu_t OP_ControlsDef, OP_AllControlsDef; menu_t OP_MouseOptionsDef; -static void M_VideoModeMenu(INT32 choice); -static void M_Setup1PControlsMenu(INT32 choice); -static void M_Setup2PControlsMenu(INT32 choice); -static void M_Setup3PControlsMenu(INT32 choice); -static void M_Setup4PControlsMenu(INT32 choice); static void M_Setup1PJoystickMenu(INT32 choice); static void M_Setup2PJoystickMenu(INT32 choice); @@ -315,7 +301,6 @@ menu_t OP_Player1CamOptionsDef, OP_Player2CamOptionsDef, OP_Player3CamOptionsDef // Video & Sound menu_t OP_VideoOptionsDef, OP_VideoModeDef; #ifdef HWRENDER -static void M_OpenGLOptionsMenu(INT32 choice); menu_t OP_OpenGLOptionsDef; #endif menu_t OP_SoundOptionsDef; @@ -331,11 +316,8 @@ menu_t OP_GameOptionsDef, OP_BlanKartGameOptionsDef, OP_ServerOptionsDef; menu_t OP_AdvServerOptionsDef; //menu_t OP_NetgameOptionsDef, OP_GametypeOptionsDef; menu_t OP_MonitorToggleDef; -static void M_ScreenshotOptions(INT32 choice); -static void M_EraseData(INT32 choice); static void M_Addons(INT32 choice); -static void M_AddonsOptions(INT32 choice); static patch_t *addonsp[NUM_EXT+5]; #define numaddonsshown 4 @@ -365,13 +347,11 @@ static UINT8 playback_enterheld = 0; // horrid hack to prevent holding the butto static void M_DrawGenericBackgroundMenu(void); static void M_DrawCenteredMenu(void); static void M_DrawAddons(void); -static void M_DrawSkyRoom(void); static void M_DrawChecklist(void); static void M_DrawMusicTest(void); static void M_DrawEmblemHints(void); static void M_DrawPauseMenu(void); static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade); -static void M_DrawServerMenu(void); static void M_DrawImageDef(void); //static void M_DrawLoad(void); static void M_DrawLevelStats(void); @@ -379,28 +359,17 @@ static void M_DrawTimeAttackMenu(void); //static void M_DrawNightsAttackMenu(void); //static void M_DrawSetupChoosePlayerMenu(void); static void M_DrawControl(void); -static void M_DrawVideoMenu(void); -static void M_DrawHUDOptions(void); -static void M_DrawVideoMode(void); static void M_DrawMonitorToggles(void); -static void M_DrawMPMainMenu(void); static void M_DrawConnectMenu(void); static void M_DrawJoystick(void); -static void M_DrawSetupMultiPlayerMenu(void); // Handling functions -static void M_CancelConnect(INT32 choice); static void M_ExitPandorasBox(INT32 choice); -static void M_QuitMultiPlayerMenu(INT32 choice); static void M_HandleAddons(INT32 choice); -static void M_HandleSoundTest(INT32 choice); static void M_HandleMusicTest(INT32 choice); static void M_HandleImageDef(INT32 choice); //static void M_HandleLoadSave(INT32 choice); static void M_HandleLevelStats(INT32 choice); -static void M_HandleConnectIP(INT32 choice); -static void M_HandleSetupMultiPlayer(INT32 choice); -static void M_HandleVideoMode(INT32 choice); static void M_HandleMonitorToggles(INT32 choice); // uhhhhhh hack? @@ -413,6 +382,7 @@ static void Dummymenuplayer_OnChange(void); static void Dummystaff_OnChange(void); // temporary measure until menu_t and menupres_t are merged (hopefully) +menu_t MP_PlayerSetupDef, MP_ServerDef, MP_OfflineServerDef, OP_AddonsOptionsDef; menu_t *menunum2menudef[NUMMENUTYPES] = { [MN_OP_CAMERA] = &OP_CamOptionsDef, [MN_OP_P1CAMERA] = &OP_Player1CamOptionsDef, @@ -423,6 +393,7 @@ menu_t *menunum2menudef[NUMMENUTYPES] = { [MN_OP_MAIN] = &OP_MainDef, [MN_OP_CHANGECONTROLS] = &OP_ControlsDef, [MN_OP_VIDEO] = &OP_VideoOptionsDef, + [MN_OP_VIDEOMODE] = &OP_VideoModeDef, [MN_OP_OPENGL] = &OP_OpenGLOptionsDef, [MN_OP_SOUND] = &OP_SoundOptionsDef, [MN_OP_CHAT] = &OP_ChatOptionsDef, @@ -433,9 +404,18 @@ menu_t *menunum2menudef[NUMMENUTYPES] = { [MN_OP_ADVANCEDSERVER] = &OP_AdvServerOptionsDef, [MN_OP_MONITORTOGGLE] = &OP_MonitorToggleDef, [MN_OP_DATA] = &OP_DataOptionsDef, + [MN_OP_ADDONS] = &OP_AddonsOptionsDef, + [MN_OP_SCREENSHOTS] = &OP_ScreenshotOptionsDef, [MN_OP_ERASEDATA] = &OP_EraseDataDef, [MN_MISC_REPLAY] = &MISC_ReplayOptionsDef, + [MN_MP_MAIN] = &MP_MainDef, + [MN_MP_PLAYERSETUP] = &MP_PlayerSetupDef, + [MN_MP_SERVER] = &MP_ServerDef, + [MN_MP_OFFLINESERVER] = &MP_OfflineServerDef, + + [MN_MAIN] = &MainDef, + [MN_FIRSTFREESLOT] = &FreeslotTest, }; @@ -2152,7 +2132,7 @@ menu_t OP_MonitorToggleDef = }; #ifdef HWRENDER -static void M_OpenGLOptionsMenu(INT32 choice) +void M_OpenGLOptionsMenu(INT32 choice) { (void)choice; @@ -4873,7 +4853,7 @@ static void M_HandleImageDef(INT32 choice) // MISC MAIN MENU OPTIONS // ====================== -static void M_AddonsOptions(INT32 choice) +void M_AddonsOptions(INT32 choice) { (void)choice; Addons_option_Onchange(); @@ -6424,7 +6404,7 @@ static void M_Options(INT32 choice) M_SetupNextMenu(&OP_MainDef); } -static void M_Manual(INT32 choice) +void M_Manual(INT32 choice) { (void)choice; @@ -6702,7 +6682,7 @@ static void M_DrawEmblemHints(void) M_DrawGenericMenu(); } -static void M_DrawSkyRoom(void) +void M_DrawSkyRoom(void) { INT32 i, y = 0; INT32 lengthstring = 0; @@ -6757,7 +6737,7 @@ static void M_DrawSkyRoom(void) } } -static void M_HandleSoundTest(INT32 choice) +void M_HandleSoundTest(INT32 choice) { boolean exitmenu = false; // exit to previous menu @@ -6807,7 +6787,7 @@ static size_t st_namescrollstate = 0; //static patch_t* st_radio[9]; //static patch_t* st_launchpad[4]; -static void M_MusicTest(INT32 choice) +void M_MusicTest(INT32 choice) { //INT32 ul = skyRoomMenuTranslations[choice-1]; //UINT8 i; @@ -7234,7 +7214,7 @@ static void M_NewGame(void) M_SetupChoosePlayer(0); }*/ -static void M_Credits(INT32 choice) +void M_Credits(INT32 choice) { (void)choice; cursaveslot = -2; @@ -7242,7 +7222,7 @@ static void M_Credits(INT32 choice) F_StartCredits(); } -static void M_BlanCredits(INT32 choice) +void M_BlanCredits(INT32 choice) { (void)choice; cursaveslot = -2; @@ -9336,7 +9316,7 @@ static void M_ConnectMenu(INT32 choice) #endif/*defined (MASTERSERVER) && defined (HAVE_THREADS)*/ } -static void M_ConnectMenuModChecks(INT32 choice) +void M_ConnectMenuModChecks(INT32 choice) { (void)choice; // okay never mind we want to COMMUNICATE to the player pre-emptively instead of letting them try and then get confused when it doesn't work @@ -9379,7 +9359,7 @@ static INT32 M_FindFirstMap(INT32 gtype) return 1; } -static void M_StartServer(INT32 choice) +void M_StartServer(INT32 choice) { UINT8 ssplayers = cv_splitplayers.value-1; @@ -9527,7 +9507,7 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade) #undef horizspac } -static void M_DrawServerMenu(void) +void M_DrawServerMenu(void) { M_DrawLevelSelectOnly(false, false); M_DrawGenericMenu(); @@ -9546,7 +9526,7 @@ static void M_MapChange(INT32 choice) M_SetupNextMenu(&MISC_ChangeLevelDef); } -static void M_StartOfflineServerMenu(INT32 choice) +void M_StartOfflineServerMenu(INT32 choice) { (void)choice; levellistmode = LLM_CREATESERVER; @@ -9554,7 +9534,7 @@ static void M_StartOfflineServerMenu(INT32 choice) M_SetupNextMenu(&MP_OfflineServerDef); } -static void M_StartServerMenu(INT32 choice) +void M_StartServerMenu(INT32 choice) { (void)choice; levellistmode = LLM_CREATESERVER; @@ -9572,7 +9552,7 @@ static UINT8 setupm_pselect = 1; // Draw the funky Connect IP menu. Tails 11-19-2002 // So much work for such a little thing! -static void M_DrawMPMainMenu(void) +void M_DrawMPMainMenu(void) { INT32 x = currentMenu->x; INT32 y = currentMenu->y; @@ -9655,7 +9635,7 @@ static void Splitplayers_OnChange(void) setupm_pselect = 1; } -static void M_SetupMultiHandler(INT32 choice) +void M_SetupMultiHandler(INT32 choice) { boolean exitmenu = false; // exit to previous menu and send name change @@ -9750,7 +9730,7 @@ static void M_ConnectIP(INT32 choice) } // Tails 11-19-2002 -static void M_HandleConnectIP(INT32 choice) +void M_HandleConnectIP(INT32 choice) { size_t l; boolean exitmenu = false; // exit to previous menu and send name change @@ -9853,7 +9833,7 @@ static INT32 setupm_fakeskin; static menucolor_t *setupm_fakecolor; static INT32 setupm_fakefollower; // -1 is for none, our followers start at 0 -static void M_DrawSetupMultiPlayerMenu(void) +void M_DrawSetupMultiPlayerMenu(void) { INT32 mx, my, st, flags = 0; spritedef_t *sprdef; @@ -10198,7 +10178,7 @@ static void M_GetFollowerState(void) } // Handle 1P/2P MP Setup -static void M_HandleSetupMultiPlayer(INT32 choice) +void M_HandleSetupMultiPlayer(INT32 choice) { size_t l; INT32 prev_setupm_fakeskin; @@ -10754,7 +10734,7 @@ static void M_EraseDataResponse(INT32 ch) M_ClearMenus(true); } -static void M_EraseData(INT32 choice) +void M_EraseData(INT32 choice) { const char *eschoice, *esstr = M_GetText("Are you sure you want to erase\n%s?\n\n(Press 'Y' to confirm)\n"); @@ -10770,7 +10750,7 @@ static void M_EraseData(INT32 choice) M_StartMessage(va(esstr, eschoice), FUNCPTRCAST(M_EraseDataResponse), MM_YESNO); } -static void M_ScreenshotOptions(INT32 choice) +void M_ScreenshotOptions(INT32 choice) { (void)choice; Screenshot_option_Onchange(); @@ -10916,7 +10896,7 @@ static void M_AssignJoystick(INT32 choice) // CONTROLS MENU // ============= -static void M_Setup1PControlsMenu(INT32 choice) +void M_Setup1PControlsMenu(INT32 choice) { (void)choice; setupcontrolplayer = 1; @@ -10949,7 +10929,7 @@ static void M_Setup1PControlsMenu(INT32 choice) M_SetupNextMenu(&OP_AllControlsDef); } -static void M_Setup2PControlsMenu(INT32 choice) +void M_Setup2PControlsMenu(INT32 choice) { (void)choice; setupcontrolplayer = 2; @@ -10982,7 +10962,7 @@ static void M_Setup2PControlsMenu(INT32 choice) M_SetupNextMenu(&OP_AllControlsDef); } -static void M_Setup3PControlsMenu(INT32 choice) +void M_Setup3PControlsMenu(INT32 choice) { (void)choice; setupcontrolplayer = 3; @@ -11015,7 +10995,7 @@ static void M_Setup3PControlsMenu(INT32 choice) M_SetupNextMenu(&OP_AllControlsDef); } -static void M_Setup4PControlsMenu(INT32 choice) +void M_Setup4PControlsMenu(INT32 choice) { (void)choice; setupcontrolplayer = 4; @@ -11333,7 +11313,7 @@ static void M_ResetControls(INT32 choice) static modedesc_t modedescs[MAXMODEDESCS]; -static void M_VideoModeMenu(INT32 choice) +void M_VideoModeMenu(INT32 choice) { INT32 i, j, vdup, nummodes; UINT32 width, height; @@ -11406,7 +11386,7 @@ static void M_VideoModeMenu(INT32 choice) M_SetupNextMenu(&OP_VideoModeDef); } -static void M_DrawVideoMenu(void) +void M_DrawVideoMenu(void) { M_DrawGenericMenu(); @@ -11431,7 +11411,7 @@ static void M_DrawVideoMenu(void) } } -static void M_DrawHUDOptions(void) +void M_DrawHUDOptions(void) { const char *str0 = ")"; const char *str1 = " Warning highlight"; @@ -11454,7 +11434,7 @@ static void M_DrawHUDOptions(void) } // Draw the video modes list, a-la-Quake -static void M_DrawVideoMode(void) +void M_DrawVideoMode(void) { INT32 i, j, row, col; @@ -11526,7 +11506,7 @@ static void M_DrawVideoMode(void) } // special menuitem key handler for video mode list -static void M_HandleVideoMode(INT32 ch) +void M_HandleVideoMode(INT32 ch) { if (vidm_testingmode > 0) switch (ch) { diff --git a/src/m_menu.h b/src/m_menu.h index 284a29aee..c2d02349f 100644 --- a/src/m_menu.h +++ b/src/m_menu.h @@ -148,6 +148,7 @@ typedef enum MN_OP_P3CAMERA, MN_OP_P4CAMERA, MN_MISC_REPLAY, + MN_MP_OFFLINESERVER, MN_SPECIAL, @@ -372,7 +373,41 @@ struct menu_t void M_SetupNextMenu(menu_t *menudef); void M_ClearMenus(boolean callexitmenufunc); +void M_SetupMultiHandler(INT32 choice); +void M_HandleSetupMultiPlayer(INT32 choice); +void M_QuitMultiPlayerMenu(INT32 choice); +void M_StartServerMenu(INT32 choice); +void M_StartOfflineServerMenu(INT32 choice); +void M_StartServer(INT32 choice); +void M_ConnectMenuModChecks(INT32 choice); +void M_HandleConnectIP(INT32 choice); +void M_CancelConnect(INT32 choice); +void M_Setup1PControlsMenu(INT32 choice); +void M_Setup2PControlsMenu(INT32 choice); +void M_Setup3PControlsMenu(INT32 choice); +void M_Setup4PControlsMenu(INT32 choice); +void M_VideoModeMenu(INT32 choice); +#ifdef HWRENDER +void M_OpenGLOptionsMenu(INT32 choice); +#endif +void M_HandleVideoMode(INT32 ch); +void M_HandleSoundTest(INT32 choice); +void M_MusicTest(INT32 choice); +void M_ScreenshotOptions(INT32 choice); +void M_AddonsOptions(INT32 choice); +void M_EraseData(INT32 choice); +void M_Manual(INT32 choice); +void M_Credits(INT32 choice); +void M_BlanCredits(INT32 choice); + void M_DrawGenericMenu(void); +void M_DrawMPMainMenu(void); +void M_DrawSetupMultiPlayerMenu(void); +void M_DrawServerMenu(void); +void M_DrawVideoMenu(void); +void M_DrawVideoMode(void); +void M_DrawSkyRoom(void); +void M_DrawHUDOptions(void); // Maybe this goes here????? Who knows. boolean M_MouseNeeded(void);