* Extend F keys with F13-F24 range
* Add more possible keybindings
* Removed hardcoded keys that are used elsewhere
* Put PAUSE back where it was before
* Remove hardcoded logic for PAUSE key
* Hotkeys: Support more keybindings
This patch adds more keybindings, so we can map multiple keys.
It also adds a possibility to bind an alternate key to pause game
(currently mapped to P and Pause key by default).
Co-authored-by: n <neube.github@gmail.com>
Co-authored-by: staphen <staphen@gmail.com>
If a resampler was not enabled, we'd get an unused variable warning:
warning: unused variable 'ResamplerSpeex' [-Wunused-const-variable]
constexpr char ResamplerSpeex[] = "Speex";
This commit restricts the use of Test Barbarian and Test Barb to the
Hellfire expansion only.
Signed-off-by: Vinícius Ferrão <vinicius@ferrao.net.br>
Adds handy helpers for performing algorithms on the entire container.
They're prefixed with `c_` for container.
This naming convention is identical to some popular C++ libraries, such
as Abseil.
With this, we no longer require `std::filesystem` support to create the
save file directory when it does not exist.
Note that by default the save file directory exists because it is
created by SDL, so this is mostly useful on platforms that override the
save directory or use `UNPACKED_SAVES`.
If a config directory did not exist, the ini file was
not saved at all.
Only implemented for targets that support `std::filesystem` or `std::experimental::filesystem`.
These are all the targets except nxdk and iOS (only supported on iOS 13+).
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`
Adds simple string / integer concatenation functions.
Many of the uses of `fmt::format` are simply concatenation
of a few strings and integers.
`StrCat` is an easier-to-read alternative to such uses of `fmt`.
Looks like vsync doesn't work on NXDK at the moment.
Defaults it to false and hides it from the menu.
It is still possible to manually enable it via `diablo.ini` for testing.
1. Store all key data and all values data as 2 char arrays.
2. Change map keys to char pointers.
3. Change map values to offsets into the values array.
Example savings for Russian: 460 KiB -> 374.2 KiB (-85.8 KiB)
* Map: 68.5 KiB (with `string_view` keys it would be 101.5 KiB)
* Keys array: 108.7 KiB
* Values array: 197.0 KiB
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.