From 33e51451aef7d577c6dedcf092f504439fdf854d Mon Sep 17 00:00:00 2001 From: alufolie91 Date: Sat, 22 Jul 2023 01:11:52 +0200 Subject: [PATCH] Add "Saturn Options" menu also rearrange and move menu entries, also prep for credits if we decide to add em --- src/m_menu.c | 159 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 93 insertions(+), 66 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 282d203a4..3b3253909 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -314,7 +314,6 @@ menu_t OP_VideoOptionsDef, OP_VideoModeDef; #ifdef HWRENDER menu_t OP_OpenGLOptionsDef, OP_OpenGLColorDef; #endif -menu_t OP_PlayerDistortDef; menu_t OP_SoundOptionsDef; //static void M_RestartAudio(void); @@ -325,7 +324,6 @@ menu_t OP_ProtocolDef; menu_t OP_DiscordOptionsDef; #endif menu_t OP_HUDOptionsDef, OP_ChatOptionsDef; -menu_t OP_HudOffsetDef; menu_t OP_GameOptionsDef, OP_ServerOptionsDef; #ifndef NONET menu_t OP_AdvServerOptionsDef; @@ -341,6 +339,12 @@ static patch_t *addonsp[NUM_EXT+5]; static void M_DeleteProtocol(void); +// Saturn +menu_t OP_SaturnDef; +menu_t OP_HudOffsetDef; +menu_t OP_PlayerDistortDef; +//menu_t OP_SaturnCreditsDef; + // Bird menu_t OP_BirdDef; menu_t OP_TiltDef; @@ -1103,20 +1107,22 @@ enum // Prefix: OP_ static menuitem_t OP_MainMenu[] = { - {IT_SUBMENU|IT_STRING, NULL, "Control Setup...", &OP_ControlsDef, 10}, + {IT_SUBMENU|IT_STRING, NULL, "Control Setup...", &OP_ControlsDef, 0}, - {IT_SUBMENU|IT_STRING, NULL, "Video Options...", &OP_VideoOptionsDef, 30}, - {IT_SUBMENU|IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 40}, - - {IT_SUBMENU|IT_STRING, NULL, "HUD Options...", &OP_HUDOptionsDef, 60}, - {IT_SUBMENU|IT_STRING, NULL, "Gameplay Options...", &OP_GameOptionsDef, 70}, - {IT_SUBMENU|IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 80}, - - {IT_SUBMENU|IT_STRING, NULL, "Data Options...", &OP_DataOptionsDef, 100}, - - {IT_CALL|IT_STRING, NULL, "Tricks & Secrets (F1)", M_Manual, 120}, - {IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 130}, + {IT_SUBMENU|IT_STRING, NULL, "Video Options...", &OP_VideoOptionsDef, 20}, + {IT_SUBMENU|IT_STRING, NULL, "Sound Options...", &OP_SoundOptionsDef, 30}, + {IT_SUBMENU|IT_STRING, NULL, "HUD Options...", &OP_HUDOptionsDef, 50}, + {IT_SUBMENU|IT_STRING, NULL, "Gameplay Options...", &OP_GameOptionsDef, 60}, + {IT_SUBMENU|IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 70}, + + {IT_SUBMENU|IT_STRING, NULL, "Data Options...", &OP_DataOptionsDef, 90}, + + {IT_CALL|IT_STRING, NULL, "Tricks & Secrets (F1)", M_Manual, 110}, + {IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 120}, + + {IT_SUBMENU|IT_STRING, NULL, "Saturn Options...", &OP_SaturnDef, 140}, + {IT_SUBMENU|IT_STRING, NULL, "Bird", &OP_BirdDef, 150}, }; @@ -1296,10 +1302,9 @@ static menuitem_t OP_VideoOptionsMenu[] = {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 100}, {IT_STRING | IT_CVAR, NULL, "FPS Cap", &cv_fpscap, 110}, {IT_STRING | IT_CVAR, NULL, "Drift spark pulse size",&cv_driftsparkpulse, 125}, - {IT_SUBMENU|IT_STRING, NULL, "Player distortion...", &OP_PlayerDistortDef, 135}, #ifdef HWRENDER - {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 145}, + {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 135}, #endif }; @@ -1360,41 +1365,6 @@ static menuitem_t OP_OpenGLColorMenu[] = }; #endif -static menuitem_t OP_PlayerDistortMenu[] = -{ - {IT_HEADER, NULL, "Player Distortion", NULL, 0}, - - {IT_STRING | IT_CVAR, NULL, "Rotate players on slopes", &cv_sloperoll, 10}, - {IT_STRING | IT_CVAR, NULL, "Slope rotation distance", &cv_sloperolldist, 20}, - {IT_STRING | IT_CVAR, NULL, "Rotate players when sliptiding", &cv_sliptideroll, 30}, - {IT_STRING | IT_CVAR, NULL, "Player stretch factor", &cv_gravstretch, 50}, -}; - -enum -{ - sloperotate, - slrotatedist, - stretchyplayer, -}; - -static menuitem_t OP_HudOffsetMenu[] = -{ - {IT_HEADER, NULL, "Kart Hud Offsets", NULL, 0}, - - {IT_STRING | IT_CVAR, NULL, "Itembox Horizontal Offset", &cv_item_xoffset, 10}, - {IT_STRING | IT_CVAR, NULL, "Itembox Vertical Offset", &cv_item_yoffset, 20}, - {IT_STRING | IT_CVAR, NULL, "Timer Horizontal Offset", &cv_time_xoffset, 35}, - {IT_STRING | IT_CVAR, NULL, "Timer Vertical Offset", &cv_time_yoffset, 45}, - {IT_STRING | IT_CVAR, NULL, "Lapcount Horizontal Offset", &cv_laps_xoffset, 60}, - {IT_STRING | IT_CVAR, NULL, "Lapcount Vertical Offset", &cv_laps_yoffset, 70}, - {IT_STRING | IT_CVAR, NULL, "Speedometer Horizontal Offset", &cv_spdm_xoffset, 85}, - {IT_STRING | IT_CVAR, NULL, "Speedometer Vertical Offset", &cv_spdm_yoffset, 95}, - {IT_STRING | IT_CVAR, NULL, "Miniranking Horizontal Offset", &cv_face_xoffset, 110}, - {IT_STRING | IT_CVAR, NULL, "Miniranking Vertical Offset", &cv_face_yoffset, 120}, - {IT_STRING | IT_CVAR, NULL, "Minimap Horizontal Offset", &cv_mini_xoffset, 135}, - {IT_STRING | IT_CVAR, NULL, "Minimap Vertical Offset", &cv_mini_yoffset, 145}, -}; - static menuitem_t OP_SoundOptionsMenu[] = { {IT_STRING|IT_CVAR, NULL, "SFX", &cv_gamesounds, 10}, @@ -1527,29 +1497,28 @@ static menuitem_t OP_HUDOptionsMenu[] = { {IT_STRING | IT_CVAR, NULL, "Show HUD (F3)", &cv_showhud, 10}, {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "HUD Visibility", &cv_translucenthud, 20}, - {IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 30}, + NULL, "HUD Visibility", &cv_translucenthud, 20}, - {IT_STRING | IT_SUBMENU, NULL, "Online HUD options...",&OP_ChatOptionsDef, 45}, - {IT_STRING | IT_CVAR, NULL, "Background Glass", &cons_backcolor, 55}, + {IT_STRING | IT_SUBMENU, NULL, "Online HUD options...",&OP_ChatOptionsDef, 35}, + {IT_STRING | IT_CVAR, NULL, "Background Glass", &cons_backcolor, 45}, {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Minimap Visibility", &cv_kartminimap, 65}, - {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 75}, - {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 85}, + NULL, "Minimap Visibility", &cv_kartminimap, 60}, + {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 70}, + {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 80}, - {IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 100}, + {IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 95}, // highlight info - (GOOD HIGHLIGHT, WARNING HIGHLIGHT) - 105 (see M_DrawHUDOptions) - {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 125}, + {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 120}, - {IT_STRING | IT_CVAR, NULL, "Show Track Addon Name", &cv_showtrackaddon, 140}, - {IT_STRING | IT_CVAR, NULL, "Show \"FOCUS LOST\"", &cv_showfocuslost, 150}, - - {IT_STRING | IT_CVAR, NULL, "2D character select", &cv_skinselectmenu, 160}, + {IT_STRING | IT_CVAR, NULL, "Show Track Addon Name", &cv_showtrackaddon, 135}, + {IT_STRING | IT_CVAR, NULL, "Show \"FOCUS LOST\"", &cv_showfocuslost, 145}, + {IT_STRING | IT_CVAR, NULL, "2D character select", &cv_skinselectmenu, 155}, }; + // Ok it's still called chatoptions but we'll put ping display in here to be clean static menuitem_t OP_ChatOptionsMenu[] = { @@ -1697,6 +1666,60 @@ static menuitem_t OP_MonitorToggleMenu[] = #endif }; +static menuitem_t OP_SaturnMenu[] = +{ + {IT_HEADER, NULL, "Saturn Options", NULL, 0}, + {IT_STRING | IT_CVAR, NULL, "Serverqueue waittime", &cv_connectawaittime, 40}, + {IT_STRING | IT_CVAR, NULL, "Addon Download Speed", &cv_downloadspeed, 55}, + {IT_SUBMENU|IT_STRING, NULL, "Player distortion...", &OP_PlayerDistortDef, 90}, + {IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 105}, + + //{IT_SUBMENU|IT_STRING, NULL, "Saturn Credits", &OP_SaturnCreditsDef, 130}, +}; + +static menuitem_t OP_PlayerDistortMenu[] = +{ + {IT_HEADER, NULL, "Player Distortion", NULL, 0}, + + {IT_STRING | IT_CVAR, NULL, "Rotate players on slopes", &cv_sloperoll, 10}, + {IT_STRING | IT_CVAR, NULL, "Slope rotation distance", &cv_sloperolldist, 20}, + {IT_STRING | IT_CVAR, NULL, "Rotate players when sliptiding", &cv_sliptideroll, 30}, + {IT_STRING | IT_CVAR, NULL, "Player stretch factor", &cv_gravstretch, 50}, +}; + +enum +{ + sloperotate, + slrotatedist, + stretchyplayer, +}; + +static menuitem_t OP_HudOffsetMenu[] = +{ + {IT_HEADER, NULL, "Kart Hud Offsets", NULL, 0}, + + {IT_STRING | IT_CVAR, NULL, "Itembox Horizontal Offset", &cv_item_xoffset, 10}, + {IT_STRING | IT_CVAR, NULL, "Itembox Vertical Offset", &cv_item_yoffset, 20}, + {IT_STRING | IT_CVAR, NULL, "Timer Horizontal Offset", &cv_time_xoffset, 35}, + {IT_STRING | IT_CVAR, NULL, "Timer Vertical Offset", &cv_time_yoffset, 45}, + {IT_STRING | IT_CVAR, NULL, "Lapcount Horizontal Offset", &cv_laps_xoffset, 60}, + {IT_STRING | IT_CVAR, NULL, "Lapcount Vertical Offset", &cv_laps_yoffset, 70}, + {IT_STRING | IT_CVAR, NULL, "Speedometer Horizontal Offset", &cv_spdm_xoffset, 85}, + {IT_STRING | IT_CVAR, NULL, "Speedometer Vertical Offset", &cv_spdm_yoffset, 95}, + {IT_STRING | IT_CVAR, NULL, "Miniranking Horizontal Offset", &cv_face_xoffset, 110}, + {IT_STRING | IT_CVAR, NULL, "Miniranking Vertical Offset", &cv_face_yoffset, 120}, + {IT_STRING | IT_CVAR, NULL, "Minimap Horizontal Offset", &cv_mini_xoffset, 135}, + {IT_STRING | IT_CVAR, NULL, "Minimap Vertical Offset", &cv_mini_yoffset, 145}, +}; + +/*static menuitem_t OP_SaturnCreditsMenu[] = +{ + {IT_HEADER, NULL, "Saturn Credits", NULL, 0}, + + // idk need to add credits uwu + +};*/ + static menuitem_t OP_BirdMenu[] = { {IT_HEADER, NULL, "Crazy", NULL, 0}, @@ -1717,6 +1740,7 @@ static menuitem_t OP_BirdMenu[] = {IT_STRING | IT_SUBMENU, NULL, "Advanced Music Options...", &OP_AdvancedBirdDef, 120}, }; + static menuitem_t OP_TiltMenu[] = { {IT_STRING | IT_CVAR, NULL, "Camera Tilting", &cv_tilting, 0}, @@ -2257,7 +2281,7 @@ menu_t OP_OpenGLColorDef = NULL }; #endif -menu_t OP_PlayerDistortDef = DEFAULTMENUSTYLE("M_VIDEO", OP_PlayerDistortMenu, &OP_VideoOptionsDef, 30, 60); + menu_t OP_DataOptionsDef = DEFAULTMENUSTYLE("M_DATA", OP_DataOptionsMenu, &OP_MainDef, 60, 30); menu_t OP_ScreenshotOptionsDef = DEFAULTMENUSTYLE("M_SCSHOT", OP_ScreenshotOptionsMenu, &OP_DataOptionsDef, 30, 30); menu_t OP_AddonsOptionsDef = DEFAULTMENUSTYLE("M_ADDONS", OP_AddonsOptionsMenu, &OP_DataOptionsDef, 30, 30); @@ -2267,7 +2291,10 @@ menu_t OP_DiscordOptionsDef = DEFAULTMENUSTYLE(NULL, OP_DiscordOptionsMenu, &OP_ #endif menu_t OP_EraseDataDef = DEFAULTMENUSTYLE("M_DATA", OP_EraseDataMenu, &OP_DataOptionsDef, 30, 30); -menu_t OP_HudOffsetDef = DEFAULTMENUSTYLE(NULL, OP_HudOffsetMenu, &OP_HUDOptionsDef, 30, 30); +menu_t OP_SaturnDef = DEFAULTMENUSTYLE(NULL, OP_SaturnMenu, &OP_MainDef, 30, 30); +menu_t OP_PlayerDistortDef = DEFAULTMENUSTYLE("M_VIDEO", OP_PlayerDistortMenu, &OP_SaturnDef, 30, 60); +menu_t OP_HudOffsetDef = DEFAULTMENUSTYLE(NULL, OP_HudOffsetMenu, &OP_SaturnDef, 30, 30); +//menu_t OP_SaturnCreditsDef = DEFAULTMENUSTYLE(NULL, OP_SaturnCreditsMenu, &OP_SaturnDef, 30, 30); menu_t OP_BirdDef = DEFAULTMENUSTYLE(NULL, OP_BirdMenu, &OP_MainDef, 30, 30); menu_t OP_TiltDef = DEFAULTMENUSTYLE(NULL, OP_TiltMenu, &OP_BirdDef, 30, 60);