Search finally works again!
- Now uses a cvar which is copied into static memory to uppercase it, instead of a weird static string uppercased into zone memory.
- You have to scroll to the top of the menu to use it, one entry above the previous first file/folder/"UP...".
- Don't play menu sound if you've reached the end of an un-looping menu.
- Change M_DrawAddons to draw relatively, so that the height can be changed without consequence.
- Add an option to adjust the spacing of Addons Menu entries (currently unused, but could be explored later).
- Moved Search (still not yet functional) further up the menu.
- Move M_AddonsRefresh out of M_DrawAddons - death to a HORRIBLE hack
- Use it as the tickroutine for the addons menu instead
- Behaves as before, possibly more consistent
There's no actual good way to handle the case of changing your skin, etc, maybe even various controls for a momentary test AND supporting profiles, so don't even try. Instead, let the game "pretend" you selected ttlprofilen to let it just about work.
This works because all the relevant cvars and controls still get saved to the config when changed... they just get written over when you select a profile. So if you haven't changed anything since your last successful launch, it is now functionally indistinguishable.
Catches a case that's never been relevant before -- now that you can open the console on the menu, map commands have newfound dangers to be worked around.
Was caused by the following actions:
- Starting a game
- Going to the Options menu
- scrolling beyond the 4th entry
- Exiting to title screen
- Opening up main menu again
Changed conditions -
- Switch Map and Addons on in-game pause menu
- now restricted by !K_CanChangeRules(), which covers all singleplayer conditions
- Gameplay and Server Options
- now restricted if in-game, and either singleplayer conditions or not admin
- Erase data
- now restricted if in-game at all (fixes new-menus regression)
- Previous implementation used fopen, fwrite, fread, etc.
- Instead, use the byteptr.h macros to/from a buffer, performing IO all at once before/after.
- This way, if we do something unrecoverable mid-write, we won't corrupt the user's profile.
- Also cross-endian compatible AND now capable of supporting changes in the struct.
- Sadly not back-compatible. This should be the last time we destroy the team's existing profiles...
Also, modify a typo in a gamedata error this system used as reference.
Preparation for reworking Addons menu -- I have been caught in these virtual keyboard popups without remembering how to escape a little too often for comfort.
Used to be "CHANGES? No/Yes", but that was confusing.
Now "READY? All good/Change" (had to be adjusted from discussed text to fit in the space, even with thinstring)
* Don't allow creation/loading of more profiles than the game supports.
* Add a few missing M_SetMenuDelay()'s
* Fix PRF%c default name generation issues
* There could still be an infinite loop if MAXPROFILES is ever increased >= 26... but we can handle that one later.
- O(n) instead of O(4n)
- Actually free the sacrificed profile's memory
- Don't hop to profile 1 after deleting a later profile, to reduce the % of footguns/losing your place in the list.
* Use leveltime instead of leniency for flicker, which makes it work as intended
* Make the threshold for tripwire BLASTER 200% (from 180%)
* Always colorize boost/BLASTER when you have a Flame Shield
* Hide boost/BLASTER if you're using flamedash specifically
- Invinc and sneaker can go up to BLASTER.
- Flame shield and momentum make only the boost by themselves.
- Hyuu and grow ignore tripwire so don't make ANY aura without any of the prior also occouring.
Overwriting the global power level all the time and not updating any code to use the profile was extremely yikes. This also allows for splitscreen players with power levels.
- Less M_StartMessage spam
- Say "NEW" instead of "EMPTY" for new profile creation
- Use Eggman instead of Sonic for the Guest profile
- Instead of needing to hold X for 3 seconds to exit the test controls menu, you simply press nothing for 5 seconds.
- Add separate back option to controls menu.
- Started on the ability to use prefcolor as your profile color
- Allow guest online because there is literally already mechanics for having a player with no power level :V