- 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
Moves WordWrap to the font/V_GetFontSpecification system.
Much healthier long-term for our purposes, including the possibility of changing fonts for various contexts freely.
Handles showing the error message box on quit.
- Polite communication that the game fell over and that you (probably) didn't do anything wrong
- Accomodates pointing you to UNIXBACKTRACE and _WIN32 exchndl crash logs if relevant
- Points you to the specific dated and timed log file that contains the error
- Tells you that the vague and often confusing error message (like I_Error) is for a programmer, server host, or add-on creator
- Hee Ho!
Reorders shutdown in I_Error a little bit so the message
box displays before I_ShutdownSound and SDL_Quit (so the
sound can continue playing while the message box is open).
This should not have any other effects and
I_ShutdownGraphics is still done beforehand, which closes
the main game window.
- 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.
- 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.