https://github.com/diasurgical/devilutionx-mpq-tools produces an unpacked MPQ
with all the graphics converted to CLX and the unused files removed.
This is primarily useful on RAM-constrained platforms, such as PS2,
because it eliminates the MPQ overhead.
Adds a build option to load from such unpacked directories instead of the MPQ.
These directories are searched for in the same locations
where the MPQs would be searched for otherwise.
Example directory layout:
* /usr/local/share/diasurgical/devilutionx/diabdat/ -- unpacked and converted diabdat.mpq
* /usr/local/share/diasurgical/devilutionx/hellfire/ -- unpacked and converted hellfire MPQs (all of them merged into 1 directory)
* /usr/local/share/diasurgical/devilutionx/fonts/ -- unpacked fonts.mpq
* /usr/local/share/diasurgical/devilutionx/pl/ -- unpacked pl.mpq
These directory structure is produced by calling `unpack_and_minify_mpq`
`PKG_CONFIG_EXECUTABLE` must be a cache variable, otherwise only the first call to `find_program(PkgConfig)` succeeds.
Also bumps the CI environment to Ubuntu 22.04, because Ubuntu 20.04
version of mingw pkgconfig is bugged.
SDL2 2.24.0 has a bug in its cmake for macOS: https://github.com/libsdl-org/SDL/issues/6119
This bug has already been fixed upstream. This is a workaround until the
next version of SDL2 is released.
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).
This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
Diablo and Hellfire have different palettes in `ui_art\black.pcx`.
We now ship our own tiny `black.pcx` that takes priority over the
other ones. This `black.pcx` had the Diablo palette which resulted in an
incorrect palette in the Settings screen.
Split our own `black.pcx` file into `black_diablo.pcx` and
`black_hellfire.pcx` and load the correct one depending on the mode.
1. Make the vcpkg hack minimal by only defining the options it needs
before `include(Platforms)`.
Every dependent option needed by vcpkg has to be recalculated
after `include(Platforms)`. This brings the count of such options
down to 1 (`PACKET_ENCRYPTION`).
2. `include(Platforms)` before the rest of the options.
3. Group related options together into sections and add comments.
4. Fix `--gc-sections` for C files. Also adds `-Wl,--as-needed`.
Note: `PIE` can now be `ON` even if `BUILD_TESTING` is `OFF`.
The version in Ubuntu 22.04 comes without `ConvertUTF.{h,c}`.
We actually do not need `ConvertUTF.{h,c}` and starting from
v4.19 it is possible to tell SimpleIni to not include it
by setting `SI_NO_CONVERSION`.
Sets `SI_NO_CONVERSION` and raises the minimum required SimpleIni
version to 4.19.