All backgrounds are now handled by a seperate routine.
This will allow more fine handling without a ton of special cases everywhere.
Creates an absolutely nasty diff because all menu_t have been updated in one blast 🥹
For the things that DO need to draw outside of GS_MENU (M_DrawOptionsCogs, the Wrongwarp), the behaviourflag MBF_DRAWBGWHILEPLAYING has also been added.
- M_LevelListFromGametype: Correctly wipe tutorial status when changing from tutorial to gametype with cups
- G_GetFirstMapOfGametype: Fix tutorial handling, gametype's datatype
- M_InitExtras: to prevent duplicated code, use G_GetFirstMapOfGametype
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
- Type in anything you want
- On closing the field, if a cheat sequence is matched *exactly*, activate it!
- Directly hooked up to a modified form of the previously existing SCRAMBLE interpreter system in m_cheat.c
- The existing cht_Responder call in D_ProcessEvents is gone
- Done this way because the new input paragadim is not very friendly to unqualified keyboard/controller input, and we still want text
- Plenty of opportunity to add fun future passwords in addition to the currently underbaked Tournament Mode
- Got a debug M_StartMessage just so you can tell what's up without sound
- Minimum viable implementation
- New horizontal menu
- FUTURE WORK: visuals are extremely basic
- Accessible from both Extras and in-game Pause if SECRET_SOUNDTEST is unlocked
- Rather than the Shadow-the-Hedgehog style free select of SRB2's Sound Test, it's a Best Of The Hacks And Fan Music Sega CD player.
- Back
- Exit menu
- Stop
- Stops Stereo music entirely
- Pause
- Pauses Stereo music without losing place in sequence
- FUTURE WORK: This should probably just pause the actual player ala minimised viewport
- Play
- Begins Stereo music on non-NULL musicdef entry
- Track
- For NULL soundtest entry:
- Switches between sfx
- For musicdefs with multiple tracks:
- Switches between them
- Prev and Next
- Changes musicdef entry
- FUTURE WORK: This is extremely naive and doesn't respect the following
- Cup order
- Unlocks
- Overrides all game-requested music changes when in Play or Pause mode
- This makes it an actual fun in-game feature as a menuification of the `tunes` command, not just a pure novelty.
- When SECRET_ADDONS is locked
- No Addons option on Extras submenu
- No mid-game Addons in K_CanChangeRules
- Forced onto CORE on Server Browser room selection page
- Semi-related: If modifiedgame is true, force onto MODDED, even if you haven't unlocked it
- TODO: Update UI to show you can't switch in a more elegant way
- Hide Addons Options on Data Options submenu
- When SECRET_EGGTV is locked
- No Egg TV option on Extras submenu
- Semi-related: Rename to Egg TV per team discussion
If Playing(), does nothing.
- If NULL, cycle between Cascade Cave as is traditional.
- If ".", stop music. (will one day be used for sound test)
- Any other case, call S_ChangeMusicInternal on the string directly
Notable menu sets:
- All Extra menus, excepting the Replay Hut, use "EXTRAS"
- Replay Hut uses "REPLAY"
- All online menus use "NETMD2".
- I know we wanted to do something with switching between "NETMDE" and "NETMD2". I would prefer a more consistent API for transferring song position across between tracks be implemented before implementing this.
- Known bug: Music restarts when exiting from failed connection screen
- Known bug: Music goes back to Cascade Cave when selecting "GO" for server creation
- Wontfix as we want that button to go directly to the voting screen, which we can do in a voting revamp branch
- Data Erase, Profile Erase: "SHWDN2"
- Not in the spec but I think it's both funny and a valuable tell for the most "dangerous" menu to play with.
- Also shifts the background to SKINCOLOR_BLACK
- src/menu contains files for each menu's definitions.
- src/menu/transient contains menus which are reused in
many places or are separate from Main Menu entirely.
File names ending in "-1" are menus which contain
a submenu. The suffix is added so that the parent menu
sorts before all its children in directory lists.
It's also done so Tab completion doesn't stop such that
a hyphen (-) would need to be typed.
For example (this is how I auto complete file names):
"ex" <TAB> completes to "extras" because the choices are
"extras.c" or "extras-addons.c" etc. Now you need to reach
away from the home row of a keyboard to type a "-" in
order to complete any of the submenu file names.
VS
"ex" <TAB> completes to "extras-". You only need to reach
to type a "1" for one menu. There may be more than one
submenu and submenu names start with letters, which are
closer to the home row.