One new parameter on cupheader_t that can only be set in mainwads
If specified hint condition has been achieved, identifies from the actual unlock condition what Tutorial it should surface in a popup.
Funny question mark
This avoids an issue where the skins array takes up a fixed, but large
amount of memory at runtime. On x86_64 linux, that array is roughly 80
megabytes in memory, most of which is unused when the game is unmodded.
Instead, we treat `skins` as a dynamically resizing array, and it is an
array-of-pointers into separate allocated `skin_t`.
This is based on Lactozilla's skin limit MR for SRB2, but I've rewritten
it because RR has diverged quite a bit.
This was verified to check every access of `skins` by using clangd's
find-all-references function. However, I have only tested plain skins,
not Lua addons, so that could afford some extra checking.
A lot of messy, copypasted boilerplate has been bundled together into a single function.
Programmers can now fire up a Match Race, the most basic type of gameplay, from menu code in only four steps (other modes take a little more attention):
- **M_MenuToLevelPreamble(UINT8 - splitscreen players #, boolean - false to extend wipe/true for short wipe)**
- set restoremenu
- D_MapChange(...)
- M_ClearMenus(...)
Includes the following fixes:
- Encore no longer has over-long wipes when started from menu, only standard-length
- "Boss Intro" and Encore start-of-round sounds will always play, even if no Title Card is drawn
- No long wipe when restarting a Time Attack run
- Auto Encore and Auto Gamespeed are no longer accidentially forced if you've manually changed them to Off and Gear 2 before starting netgame
- All gametypes will be shown in the drawer, as opposed to just Race
- However, don't attempt to add the preview pic for CUPCACHE_SPECIAL (the Sealed Star)
- TehRealSalt and Lat` are currently preoccupied, so handle their credits
- Correct some accidential copypastes of existing boilerplate into new files
- Add a handful more of mine
- Consistency for Kaito Sinclaire's online handle
- Don't assume that the first Round in a Cup defines the default gametype for it
- Now consistently uses GT_RACE
- It was written this way to try and permit non-Race cups in future...
- But there are much more solid ways to approach this down the line, instead of overloading this pre-existing data.
- cup-select.c: Don't assume `roundqueue.position == 1` means starting a fresh Cup from scratch
- G_HandleSaveLevel: Allow saving GP backups for overridden Courses at the front of the roundqueue
- Play O_SSTAR3
- Special darkened background
- Imagery to replace the minimap, since Special Mode maps generally don't have them as a rule
- Sealed Stars:
- Star Within The Seal, from the standard Evaluation
- Versus:
- The DeviantArt SignatuRes
- Fix messed-up transitions between Time Attack main menu and Replay, Guests, and Ghosts submenus
- Special Mode specifically:
- Forced unexpected wipes
- All modes:
- Don't slide away the minimap (or replacement imagery) when going between these menus
- Fix music not being correctly attached
- Correctly center minimaps in Time Attack view
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.
- Controlled by M_CupSecondRowLocked
- Looks for any Cup with associated unlockable that's on the second row
- Cached on load for both relevant menus - Cupgrid and Challenges
- Custom cups will be stretched out onto more pages
- Side incentive of unlocking more material: Less annoying interactions with custom material
- Pages with nothing unlocked are completely skipped over
Also moves a bunch of minor things which previously used magic numbers to the CUPMENU_COLUMNS/CUPMENU_ROWS defines, for sanity
- Handle removing GP Backups when any game end sequence is started, not just the Podium (in case no Podium exists)
- Guarantee removal in M_StartCup out-of-entries failure state
- Now actually from the relevant GP difficulty's Cupgrid, instead of the top-level Play choice
- Permits a much cleaner M_StartCup, combining two of the previously four copypasted, slightly modified level startup regions (which could be further combined for sanity's sake, but would take a LITTLE more work right now than I have in me)
- Shows a funny exclamation mark from Sonic Rush on the relevant cup on the grid
- Selected by default when loading the menu, if appropriate
- Only send from the server when an update to roundqueue state is relevant
- Perform sanity checking on reciept
- Initialise when map command is sent with roundqueue size greater than the client's
- Correct gametype/encore state on reciept
- Only permit from the server, forbid admin clients from providing it on penalty of kick
A general purpose system that permits cacheing of GP progression in one place, but which permits future expansion and brings Online GP a little closer to reality.
- Stores a bunch of levels, gametypes, encore state, and restricted-by-rank-ness in sequence.
- Initialised on GP cup select.
- FUTURE WORK: Open to being initialised by other methods
- Digests its way through that sequence as maps are completed.
- Stores round number instead of `grandprixinfo`.
- Map commands as sent over the wire have been adjusted.
- Sends round number and size of/position in roundqueue.
- Now figures out GP Event Type from gametype.
- Can be swung in the direction of a Special Stage with a hint flag.
- This hint flag replaces "fromlevelselect", which was functionally vestigal.
- Even if there's only one level in the group, only skip over the mini linear list in a Time Attack mode
- Improves some of the jumpscare of looking into Lost and Found and being blasted to TEST RUN
- Fix lists of one map being wedged against the bottom of the screen
- Precache valid map count
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
- restoreMenu, M_SpecificMenuRestore
- From any Cup Select, Level Select, or Time Attack context (including non-net replay playback), return to the relevant "core menu"
- From any server OR server connection failure, return to the Online EGGA CHANNEL top-level menu
- From netreplay, head to replay hut without incorrect gamestate/fade cope
- Interruption for Challenges unlock sequence now happens on all menu returns, not just post-titlescreen
- M_StartControlPanel
- Integrate with above
- Handle menu re-initialisation properly under more contexts
- D_ClearState
- Split out from D_StartTitle
- Can be used alongside M_StartControlPanel to restore menu state from any play session in a way just as reliable as D_StartTitle was