Originally written by x.organic, flattened rewrite due to massive changes between RR and SRB2Kart codebase
Notable changes:
- p_adding_file has been reworked into partadd_earliestfile to allow for final setup to use
- much like the public version required removing TEXTURE SOCs, this one required removing Flats support from ANIMDEFS
- For .wad resources, if a map is called WADNAME:
- Everything up to the first full stop in the file name is substituted as the long lumpname (so WADNAME in RR_GREENHILLS.beta3.wad replaces map RR_GREENHILLS)
- Has (hacky) support for Zone Builder temporary files on Windows
- If WADNAME is passed to `-warp` (but NOT `-map` or `+map`) go to the most recent loaded WADNAME
- Requires everyone to customise their testing parameters to disable MSDOS 8.3 filenames
- For all resources:
- Jart added lumpname hashes for the first 8 characters. Use these in W_CheckNumForLongNamePwad and the map equivalent
Fixes PNG patch conversion crashing when called from vres
at game startup.
Also does not reload palette every time the resolution is
changed. (This had no effect on the SDL backend, don't
worry.)
- Refactor significantly (now has its own func, `G_GetNextMap`)
- If gametype uses cups, iterate through cups to find the current level, then grab the next valid level
- If not, get the next valid mapheader for your gametype
- SOC `nextmap`/`marathonnext` is not just deprecated but REMOVED
- Hide the NEXTMAP_ constants again, but leave support dummied out for if we have them publically accessible again
- Also get rid of a bunch of OTHER mapheader stuff we're never gonna use
- NiGHTS Grades? NOPE
- Vanilla titlecard patches? NOPE
- Boss music fadeout/replacement? NOPE
- Select Heading? NOPE
- You've been blocked.
- Don't show maps without lumps on the level select list
- this is me being petty, but making it NOTIMEATTACK in SOC instead of TIMEATTACK so we can reconsider the maps with/without them.
- G_MapNumber now handles special NEXTMAP_ nextmapspecial_t constants that exist at the end of the available type.
- Cleanup of G_DoCompleted
- Add bounds checking to the various SOC maincfg map starts (spstage_start, etc)
- Add lump checking to titlemap behaviour
* Required an adjustment of everywhere using G_MapNumber to return the raw header number, instead of off-by-one ala gamemap.
* Fixing gamemap is a viable improvement for a future commit, but this commit is already pretty big.
* Remove SCANTHINGS, since it used G_MapNumber and didn't work with long map names OR virtres anyways.
* Support freeing new information in CLEAR LEVELS maincfg event, since I tried to use that to test cups.
* Make Patch_Free's usability match Z_Free -- passing NULL is permitted and a no-op.
- Grab thumbnail and minimap pictures even for base game maps
- Repair modified game event for replacement map load
- PU_STATIC thumbnail and minimap, freed on new file load lump discovery
- Fix W_CheckNumForMap to not SIGSEGV if no match
- Reduce the number of pointless map lump hunts, we've already got it stored
- Prevent use-after-free for map pictures on voting screen
- Cache "BLANKLVL" patch once
- Draw minimap on the time attack menu
Unfortunately cups are still broken and I'm not sure where to start on that, or if it's just not having a sample wad to test with that includes cups
- Remove block from using connect with uninitialised profile. Instead, CL_ConnectToServer handles the guess entirely.
- Add splitscreen player initialisation in circumstances previously missing it
- Was reproducible by spamming back button events during game launch.
- Caused by the way profile data was initialised - D_StartTitle was calling a function with too many side effects.
- In addition, never instantly skip the title screen when the above occours.
- This would be enough to patch over the mentioned bug, but I made sure to solve it properly so it won't break when we touch this again later.
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.
"cheats" is a proper cvar now. Enabling it allows for cheats to be used any time, even in multiplayer, and disables gamedata saving. Turning it off undoes as many cheat commands as reasonably possible. Based a little bit off of some vanilla work I also did.
Many cheat commands are still SP-only, but can reasonably be allowed in netgames now if a net command is created for them.