Commit Graph
154 Commits
Author SHA1 Message Date
staphen f17ea8db98 Implement settings menu for gamepad customization 2022-11-27 18:27:21 +01:00
Gleb Mazovetskiy a2a8b1c706 Padmapper: Simplify buttonTo* data structures
Use an `std::array` instead of `std::unordered_map`.
2022-11-07 04:56:50 +00:00
Gleb Mazovetskiy e7c0d2943f KeyMapper: Use forward_list instead of vector
Similar to how we do this for Padmapper.
2022-11-02 11:52:07 +00:00
staphen 6a565d3755 Further improve simulated mouse interaction 2022-10-31 10:29:37 +01:00
staphen 198dec9412 Iron out interactions between simulated mouse movement and character movement 2022-10-31 10:29:37 +01:00
staphen d7908d82f4 Always remove release actions from padmapper regardless of whether the action can be invoked 2022-10-31 10:29:37 +01:00
staphen 4579324726 Ensure that padmapper actions are in the correct order after initialization 2022-10-31 10:29:37 +01:00
staphen c83f7d3958 Avoid copy construction of PadmapperOptions::Action 2022-10-26 21:36:08 +02:00
Gleb Mazovetskiy 179ae009df Improve logic and fix for old compilers 2022-10-17 01:01:21 +02:00
staphen e67e4934cc Add padmapper for gamepad customization 2022-10-17 01:01:21 +02:00
Gleb Mazovetskiy 41f43ea3f5 Support unpacked MPQs from devilutionx-mpq-tools
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`
2022-10-11 18:00:57 +01:00
Yuvraj Tetarwal 59482b5e9f Auto oil pickup (#5159)
* Fixed formatting
2022-07-31 18:26:07 +02:00
Gleb Mazovetskiy a4ac41cece Replace DVL_VK virtual key codes with SDLK 2022-07-17 10:00:06 +01:00
Trihedraf 5ee6e5dd3a Make zoom a setting in the menu (#4931) 2022-07-10 19:59:32 +02:00
Gleb Mazovetskiy 197e1180b2 Add StrCat and StrAppend
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`.
2022-07-10 06:14:58 +02:00
Gleb Mazovetskiy 5f813c3bec Xbox NXDK: Disable upscaling by default 2022-07-09 18:50:53 +01:00
Gleb Mazovetskiy 0a64ae3b6b Xbox NXDK: Default vsync to false and hide option
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.
2022-07-09 18:50:53 +01:00
Gleb Mazovetskiy 254806e027 Optimize translation RAM usage
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
2022-07-08 11:52:18 +01:00
Trihedrafandobligaron e002de4d69 show item labels toggle in menu
Co-Authored-By: obligaron <[email protected]>
2022-06-28 17:46:59 +02:00
Anders Jenbo 99181fd709 Move more files to the engine folder 2022-06-24 11:08:15 +02:00
Gleb Mazovetskiy 127c6bc9e1 Fix finding SimpleIni
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.
2022-06-21 00:00:38 +01:00
Gleb Mazovetskiy 2386fd12a9 Fix a few warnings 2022-06-15 13:01:20 +02:00
Gleb Mazovetskiy a4bd44b1cd Fix MSVC ADL format error
fmt::join is required when formatting containers
2022-06-14 12:46:36 +01:00
Gleb Mazovetskiy dab48daed6 options.cpp: Remove unnecessary data() calls 2022-06-14 12:46:36 +01:00
Gleb Mazovetskiy 1fc8ecb6f6 Add fmt::runtime annotations for C++20 support
`fmt` requires non-contexpr format string arguments to be wrapped in
`fmt::runtime` in C++20.
2022-06-14 12:46:36 +01:00
staphen 83168f7954 Add option for selecting audio device 2022-06-01 17:11:29 +02:00
staphen 5ec83d0b79 Reintroduce c-str overload for SetIniValue() 2022-05-31 20:44:00 +02:00
Gleb Mazovetskiy 99d490180c Settings: Add Resampler
Makes the resampler algorithm configurable from the settings menu.
2022-05-31 05:21:42 +01:00
Anders Jenbo a185b659e7 Set default sample rate to 22050 on Windows 2022-05-29 21:10:00 +02:00
ephphatha 7f15aa730d Move definition of ghMainWnd to utils/display.cpp
This variable is controlled/set by the code in that file, this also lets other files have more specific/relevant includes instead of the monolith that is diablo.h
2022-05-08 12:09:12 +02:00
Gleb Mazovetskiy ea5bfbe001 Default to 48kHz on Windows
Refs #1390
2022-04-16 15:41:47 +01:00
Gleb Mazovetskiy 4cdbd358dd Audio: Use SDL resampler where available 2022-04-16 04:20:47 +02:00
Gleb Mazovetskiy ade8aba822 Fix some more warnings 2022-04-14 01:26:29 +02:00
Gleb Mazovetskiy 82093bd255 Reduce debug log output of Keymapper 2022-04-11 23:35:03 +02:00
ephphatha df8c1a3e8c Use truthy test for TARGET_OS_IPHONE
This constant is defined as 1 when building for iphone, 0 for MacOS, and undefined on other platforms. To get the expected behaviour we need to check it's defined and non-zero.
2022-04-02 11:34:50 +01:00
Anders Jenbo 0f44da5487 [gamepad] Fix using quick spells with rebound keys 2022-03-30 19:02:03 +02:00
obligaron b52a50f2e7 Add OptionEntry for alternative nest art and remove command line parameter --nestart 2022-03-29 20:27:03 +02:00
Anders Jenbo 1d04ac574a Make game screen ZeroTier aware 2022-03-28 08:06:00 +02:00
obligaron 1975d77d12 Change default value for "Show FPS" to off 2022-03-26 21:23:26 +01:00
Anders Jenbo 1409e604f5 Reduce string conversions 2022-03-20 11:04:15 +01:00
Michael H 9a251a97af Added Greek language build & option
-added greek to the cmake assets build
-added greek to the options menu
2022-02-23 04:14:58 +01:00
obligaron 9fff4a1b53 Fix keymapper translations 2022-02-08 20:14:50 +01:00
obligaron 79b926c375 Move more options to OptionEntryBase 2022-02-05 20:51:54 +01:00
staphen 8d5b709749 Restore default Windows audio driver (WASAPI) 2022-02-03 06:40:59 +01:00
qndel 9536927301 Display hp/mana values on life/mana orbs (#4006) 2022-01-27 12:19:32 +01:00
ephphatha 000a04ad4d Cleanups from https://github.com/diasurgical/devilutionX/pull/3980 2022-01-23 05:25:48 +01:00
staphen df830f6495 Save settings before leaving the settings menu 2022-01-23 05:25:48 +01:00
obligaron b3a9760bda Keymapper: Add mouse support 2022-01-15 15:31:48 +01:00
obligaron aaeee3018f Add Item Highlighting, Screenshot, Pause, Automap and Hide Info Screens Actions to KeyMapper 2022-01-12 14:34:43 +01:00
obligaron be943df46e Keymapper: Add key released support 2022-01-12 14:34:43 +01:00