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++
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.
- 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.
- For P_Ticker()'s calls to M_UpdateUnlockablesAndExtraEmblems
- Do not check non-UCRP_REQUIRESPLAYING conditions
- Controlled by a new `boolean doall` parameter to M_UpdateUnlockablesAndExtraEmblems
- Most other contexts have this as true
- Forced true if update is meant to be silent
- Only check UCRP_REQUIRESPLAYING conditions if a relevant property has been touched
- Controlled by a new `boolean checkthisframe` property on roundcondition_t
- Set in all contexts where roundcondition_t is modified
- Would also be set on lap change, but that case is already covered by the following
- Check all conditions, both UCRP_REQUIRESPLAYING and not, on:
- local player K_HandleLapIncrement
- local player P_DoPlayerExit
- local player P_DoTimeOver
- Controlled by a new `boolean deferredconditioncheck` property on gamedata_t
Before we can add extra unlock features, we need to make sure we're not building on a house of sand.
- R_SkinUsable: Use Net Unlock system if playernum is -1
- R_BotDefaultSkin: Move to r_skins.c, cache skin search
- R_GetSkinAvailabilities: Use Net Unlock when called for bots (and always permit R_BotDefaultSkin)
- Got_AddBot: Call R_GetSkinAvailabilities for summoned bots to guarantee sync status of available skins
- K_UpdateMatchRaceBots: Tidy up to match grand prix bot skin selection system, hiding server-locked skins and defaulting to R_BotDefaultSkin if you don't have enough unlocked for the remaining player slots
- UINT8 *buffer for AddGhost must now be allocated and filled externally.
- Introduce P_TryAddExternalGhost helper function for existing external ghosts.
- Call vRes_Free(curmapvirt) later, and NULL to make incorrect usage immediately obvious.
- Demos are VERY large and should not be cached for every map in the game all at once.
- Instead, store a small amount of data related to staff ghosts for later reference.
- best time (for use in Medals)
- best lap (maybe use for Medals too)
- player name (for use in Time Attack menu)
- Correctly restore menu state after failed record attack run
- Making things easier for future work - use demo.title as signifier to go back to title screen
I would've liked to make it use a single allocate function to do this very cleanly, but these cases were very clearly not meant to be standardized and use wildly different methods to allocate & free...
This caused some scary issues with P_SaveNetGame the other day, and it's making ACS net sync harder. Let's just cut this off right now.
Also fixed some scary mix-ups in some of the Lua archiving code.
- Should support custom gametypes, but haven't been thoroughly testing those
- Custom gametypes must now be unique by name
- Custom gametypes now have a maximum name length of 31
* `ATTACKING_` constants have been changed to be flags
- `ATTACKING_TIME` contains time data for all gametypes
- `ATTACKING_LAPS` contains laps data for `GTR_CIRCUIT` on maps with more than 1 lap
* `demoflags` now contains raw `ATTACKING_` flags
* Best time/best lap demo files will now be saved properly again (broken since `new-menus`)
* Ghosts will now be loaded properly again (broken since `unlockables-undefeatable`)
Completely clientside, unlike SECRET_SKIN. Followers have no gameplay function, and it saves us having to write even more to our demos/netsaves. Replaces SECRET_WARP.
Also:
- Now don't apply skins or followers from profiles if the skin is locked - instead, get the closest skin in stats. (Same function as from demos!)
- If you're looking at a profile and the skin or follower are locked, make them solid colour (TC_BLINK).
- Don't show the ring cursor before you've selected a profile.