I have no idea how this is supposed to work, but all it does is create corrupt images, so for now it reverts to the software renderer which generates working 320x200 images.
Since the code is extremely volatile I changed the setup so that the save is a zip file with the regular snapshot plus all added data as separate entries.
This allows compressing everything properly without savegame breaking interference.
Blood does not yet load its savegames, need to check.
Conmsidering how hard it is in Duke Nukem based games to modify the level music, there is now a setting for this in mussetting.txt to make the job easier and even allow setting level music in Redneck Rampage without replacing game data.
- draw fullscreen blends below the console.
- moved all mouse event processing out of the SDL backend to D_PostEvent.
- removed all remaining code for dealing with mouse buttons directly.
Unfortunately necessary because Ion Fury savegames store 120 GB(!!) of data, mostly zeros.
Unlike the old method, this compresses the entire savegame as one block using a ZLib stream so it should be a lot more efficient now.
This broke the savegame reader which still assumed it was working on compressed data. Everything will now take the uncompressed path.
In-stream optional compression is not a good idea anyway, this can and should be done better.
Also: Why is the savegame format architecture dependent???
Unfortunately this means that the keybinding menus in all games except Blood are shot to shit right now because of how they passed the data on to its destination.
These menus are not fixable, this will have to wait until the replacement is up.
That's one more third party dependency down.
Not only are two hashing algorithms redundant, there was also a large size discrepancy: SuperFastHash is 3 kb of source code while xxhash is 120kb and generally extremely awful code.
It was easy to make a choice here. None of the use cases require this kind of performance tweaking, the longest hashed block of data is a 768 byte palette.
* moved the binding commands to osd.cpp. They were in the global namespace already and this way everything to be tossed out is in the same place when the time comes.
* removed support for the OSDs native CVARs. The only ones left were some internal ones I won't need until this code can be replaced.
* same for the custpmization code the games added. Duke Nukem was the only one anyway to have a decent font for it.
- disabled the user maps menu because it is hopelessly dependent on functionality that cannot be fixed. Better wait until the menu refactor to do it right - it'd be a waste of time fixing the current menus.
* saving of demos and savegames no longer mindlessly writes to the mod directory. All such access is now being rerouted through the special paths interface so that the game data can reside in write protected locations.
* refactored all occurences of klistpath except fnlist_getnames.
* do not allow CON scripts to write to arbitrary files. This is a massive exploit and can be used to cause real damage if someone knows how to play this thing - it's far easier than people may think! It will now write any such data to a special section in the main config which is safe and cannot be manipulated to write to random locations on the hard drive.
- consolidated the 3 identical S_OpenAudio implementations. The replacement code is disabled for the time being because it needs a rewrite. The replacement logic is uses is a bit too volatile.
- removed the old GRP scan code.
* reroute several error conditions to I_Error.
* removed some soon-to-be obsolete GRP loading code.
* explicitly trigger the SetDefaults script events which depended on side effects from the config implementation.
* removed the nonsensical file system switch. All this does is create instabilities because it is non-obvious from where data is loaded. If a resource is mounted, it should be checked for content no matter what. While this may affect the stray weird mod out there it is a necessity if we want to allow transparent project repackaging.
When doing this during startup it can be done by regular cleanup measures.
This also moves two larger chunks of networking code out of game.cpp.
Nevertheless, the fact that enet is a very dirty library which directly depends on Windows types is a big problem because it bleeds Windows definitions everywhere thanks to poor abstraction in all relevant layers.
The Steam/GOG path getters were taken out of the frontends.
This also switches the Windows directory reader touse the wide string version to get Unicode file names.
Some paths were added to the config file instead of hard coding them.
Some part are not done yet, and the file system data is currently ignored - there's no way to properly set this up with the file system code Build came with.
This removes all unused parts of the implementation and moves the rest to the InputState class for easier replacement later. All MACT is doing now here is to call the UpdateStatus function, the internal workings are no longer relevant.
- write the console log to the folder returned by M_GetDocumentsPath and not to the root game directory.
- removed G_ExtPreInit because it has become redundant. The search path setup will have to be redone anyway.