This was implemented in a way that made it entirely impossible to load Build resources and make them usable for modding.
ZDoom had Build texture support for many years but the limitations the palette handling imposed made it impossible to use them.
It wasn't usable for anything more than to load Build maps and have them display properly - a feature that had to be removed because it was irreparably broken already.
With the forced palette override out of the way it should now be possible to implement loading of Build ART files as actually usable resources.
- a bit of header cleanup.
* moved <zlib.h> and <bzlib.h> from files.h to files_decompress.cpp because they are no longer needed for defining the interface.
* added <functional> to the precompiled header
This should be dealt with at the source, not one level up, so that it also works properly if the GetReader function of the ResourceFile object is called directly and not through the resource manager.
Due to how the VM handles default parameters, these must always be identical to the parent to prevent undefined behavior.
So now, if such parameters are encountered, the compiler will either abort (for script version >= 3.3) or print a warning (for older versions.)
Any defaults being specified for older versions will be ignored, though, and the defaults of the parent function be copied to the override.
The native byte order converters were defined as macros which hid some issues due to lack of type checks.
Additionally the ???Long variants taking 'long' variables were removed, because longs are not always 32 bits so this could be destructive.
As a result of this, removed several DWORDs from struct definitions in i_crash.cpp.
* initial positioning in a subsection of a file failed. This mainly affected music playback.
* made the FileRdr constructor which takes a FileReaderInterface private so that everything that needs it must be explicitly declared as friend.
* removed a few redundant construction initializers for FileRdrs.
* loading compressed nodes needs to check the validity of its reader.
* use GetLength to detemine the size of a Zip file instead of doing another seek to the end.
* removed duplicate Length variables.
- fixed: The streaming music player must return the file reader if it fails to open, so that the next player can still use it.
- fixed: Timidity++'s Instruments class did not delete the sound font when it was destroyed.
..-