- hooked up all front ends with a generic message printing function so that common code can access the native message displays. This is needed for consolidation of some input actions which are mostly identical but print messages.
- preparations for a generic message system.
Now this was magnitudes easier than the EDuke menu - NBlood's menu is actually clean and usable code but still nothing compared to a unified menu system.
This was only a crutch to let the input interface work with the original menus.
Now that the one in Blood is gone, all the conditions are no longer relevant. (Shadow Warrior never got far enough to implement this)
This was some meticulously preserved relic of bad old DOS times used to block OS facilities to close an app.
Since this has been worked around at a lower level already the variable was essentially without function but some quite bad code depended on it.
This mainly means being able to use the generic font.
This also adds more generalization to the menu sound handling, plus an option to turn menu sound off. This is motivated by the pig sounds which RR uses in the menu.
* implemented single image screens
* implemented skeleton of the image scroller
* added RR-specific definitions to the menus (need to copy and adjust d_menu.cpp)
* added definitions for credits screens.
Not tested yet!
* Added a JSON-based header to the savegames so that the unified menu can read from a common data source.
* moved loading and saving of frontend independent data to the wrapper so that support is automatic.
- 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.
Not only is this a deprecated feature - it also does not work right when complex lighting is at play, it must be done in the shader to get proper results.
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???
* moved the ASCII conversion hackery in SDLayer to a subfunction because this made things just messy.
* integrated the keyboard callback's functionality directly into inputState for consolidation purposes. This was yet another independent layer in the keyboard management.
* hook up D_PostEvent as the central place to dispatch keyboard input. This is now the only function that is getting called from the backend and a major prerequiside for swapping out the backend for GZDoom's.
Todo: Route mouse input through that, too.
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.
I think this shows a fundamental misunderstanding of what constexpr means, even when declared as such it requires a constant argument to be treated as a constant.
But since nearly all uses of this were not using constants, the compiler was emitting actual memory accesses to the array each time this was used.
- 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.
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.