- 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
(This commit does not compile. Sound test and tunes
command code needs to be ported after this.)
This is a big one. Here's the rundown:
The old music system was very direct, much of the time
just a proxy to the real sound API in i_sound.h.
You could change the music on command, but there wasn't
a consistent way to prevent some music from playing over
others. P_RestoreMusic is one example of needing to
address this problem. The jingles system was intended as
another solution. Furthermore, sound test (Stereo) has its
own needs.
I am removing all of that. Music handling in general is
now a very deliberate system, kind of similar to jingles.
In the new system, "tunes" are registered. The tune stores
info such as whether it should loop or fade out. Most of
the configuration is intended to be initialized only ONCE.
Tunes can be mapped to an actual music lump. They can be
remapped at any time too.
Tunes are also configured with a priority number. This
determines which tune is heard, if multiple are supposed
to be playing at a time. You can even tell a tune how long
it should play, so it's unnecessary to track this with
bespoke timers.
- Permits the use of the existing K_HandleMenuMessage MM_YESNO system, instead of the faked previous implementation
- Removes the "cl_requestmode" hack
- The only area of the game that fakes handling Menu Messages is the title screen, now, due to the lack of guarantees for menu inputs.
- *Also* permits Screenshots and video/lossless Recordings to be started/ended on this menu.
- M_StopMessage is now in charge of setting the answer to a given prompt.
- Menu Messages can now be dismissed on the title screen, instead of carried into the top-level menu transition.
Immense 25-file diff, so spun off into its own branch.
- Improved appearance
- Not just a big block of text on a blue background
- Well, OK, the main part is, but some stuff has been spun out into its own fields
- Title text
- Text and button prompt for Yes/No or OK
- Slides with pow on and off the screen
- Disabled MM_EVENTHANDLER, which has always been dog but got considerably worse after newmenus to the point nothing's using it anymore
- Required in order to reduce the reliance on FUNCPTRCAST, which prevents Eidolon from compiling some stuff because it's not valid C++
Replaces existing musicflag system, which only had one flag, with a priority system that overrides menu music in general.
Also adds the CHAO KEY FREE DDL WORKING 2023 goofy music for matchesplayed Chao Key generation.
- 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
The intersection between processed buttons and raw keyboard data is a messy one and will probably never be perfect, but it is now consistent.
- Never overwrite a valid keyboard menuKey recieved this frame with a -1 if a different type of event is recieved as well.
- Store previous state of dpad_lr and dpad_ud on menucmd struct.
- Previously, if `a` was bound to Turn Left, it could produce a valid menuKey for one frame, then be considered a leftward input - switching from manual keyboard to Virtual Keyboard.
- It still only produces a valid menuKey for one frame... but we simply filter out leftward inputs that are older than this frame to keep things (relatively) clean.
- `_OCEAN` on first launch without profile set, to avoid skipping between three different tracks in quick succession
- 'FILE' if you create a new profile on first launch OR if you go into Options->Profiles
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.
- Will silently merge conflict with !1093, make sure to adjust PROFILEVER handling
- (profile_t *)->rumble
- cv_rumble[MAXSPLITSCREENPLAYERS]
- cv_dummyprofilerumble
- Disables all current rumbles when toggling off
- Prevents new rumbles from being set while turned off
- 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.
- Unfortunately, the way this system previously worked, the unlock was given to you for free if you accidentially opened two copies of the game at once.
- Instead, open the file in r+ mode, shimmy along 5 bytes, and write a `true` to be read later.
- Far more memory safe than rewriting the entire gamedata out on crash.
ALSO:
- crashflags has been split into boolean evercrashed and UINT8 musicflags.
- We don't need to track if the LAST session was a crash, at least not right now.
- Opens the floor up to other music like Loser Club happening on the Challenges menu.
M_UpdateMenuCMD only needs to be called once per tick per player.
It was being called for every event, which really mangled the repeat
delays as more attached controllers sent axis events.
- Combine multiple adjacent saves
- Generally could happen during game ticking, combined via gamedata->deferredstate
- DEFINITELY happened in splitscreen PWR handling, adjust those loops directly
- Write "dirty" state via gamedata->crashflags on everything except safe, intentful unloads
- Add UC_CRASH, which unlocks dependent on the above "dirty" state being present at gamedata load
- We can use this for something more useful and less funny later.
- Play "O_LOSERC" on the menu, starting with the Challenges screen, if a UC_CRASH condition has been met.
- Online menu is inaccessible until unlocked.
- Unlike most unlocks, the fact that it's not enabled is very clearly signposted.
- This is because the previous entry in the series barely had any offline content at all, so the fact you'll have to work for it will catch a lot of people by surprise.
- Has a message that straight up tells you you need experience in Grand Prix mode.
- Has no affect in TESTERS builds, for which this is the only method of play available.
- Drawn over the top of basically everything when enabled.
- Update song credit on
- Menu music update (can sometimes clear it)
- Intermission begin
- Vote begin
- Return to title (by clearing it)
- Splits M_SetupDifficultyOptions out of M_SetupDifficultySelect.
- Permits Encore to be handled on Difficulty menu if unlocked after a Match Race.
- Fixes an issue where the in-game Pause menu could be accessed in the menu
- The prevMenu that was set was overriden with in-game Pause.
- The assumption made - that the levelsearch/levellist struct would not be touched - is pretty transparently violated.
- I made it go back to the Difficulty select instead of fixing the issue because:
- Match Race is more dependent on the rules you configure for that particular round
- This mode of play will be modified in future to not be literally offline MP with things like voting, but instead return to the menu
- It was easier relative to the amount of work to properly restore (this is the biggest reason)
- Permits IT_ARROWS routines to distinguish between a rightward input and an A-button input.
- Only M_ChangeCvar needed to change to accomodate this - every other example of IT_ARROWS already acommodates this