Commit graph

216 commits

Author SHA1 Message Date
ephphatha
db1d776539 Deduplicate PItem and DItem 2022-01-24 21:12:13 +01:00
obligaron
234a053863 Change Missiles Array to std::list 2022-01-20 23:12:48 +01:00
ephphatha
3bc2eb8471 Use ObjectAtPosition when highlighting from gamepad movement 2022-01-19 03:05:27 +01:00
ephphatha
5c4f6d80e8 Use Point/range iterator in FindItemOrObject
This addresses a todo comment, though not in the way that was originally intended as we no longer use Direction::Omni
2022-01-19 03:05:27 +01:00
Felipe Wannmacher
6e32bf9794
changed spell circle ui (#3963) 2022-01-19 02:34:04 +01:00
Anders Jenbo
2e0a73e967 Disable stand button when in town
Fixes #3290
2022-01-03 23:26:33 +01:00
staphen
d193b90101 Don't deactivate gamepad when graphics settings change 2022-01-02 11:37:38 +01:00
Anders Jenbo
b0252b3339 Make Gamepad cursor independant of hardware mouse
The gamepad cursor (inventory, spells etc) no longer relies on warping a
real mouse cursor. This should make things work better on platforms that
do not support this, like Wayland.
2022-01-02 11:37:38 +01:00
Anders Jenbo
576d946581 Allow use of touch to select world objects 2022-01-02 11:37:38 +01:00
Anders Jenbo
6b2481a76c Touch support on all SDL2 platforms 2022-01-02 11:37:38 +01:00
staphen
74a77666b9 Improve behavior of ToControllerButtonEvent() 2021-12-24 23:08:41 +01:00
obligaron
419fe7b7ec Change Keymapper to OptionCategory/OptionEntry 2021-12-23 00:26:12 +01:00
Gleb Mazovetskiy
fee39d46fa DiabloUI: Handle mouse back button in menus 2021-12-11 21:27:02 +00:00
qndel
be0b79f9f5
Add IsWallSpell helper 2021-12-07 12:00:52 +01:00
Anders Jenbo
28ad032a2f 🐛 [gamepad] Fix casting lightningwalls
Fixes #3694
2021-12-07 01:37:58 +01:00
Anders Jenbo
d3a7c36d1d
Correct DPI on devices that apply extra scaling 2021-12-05 17:32:41 +01:00
Vladimir Olteanu
861fb99e9d Quick cast 2021-12-04 15:38:58 +01:00
Gleb Mazovetskiy
c57644970f Move UiFlags and UiPanels into their own files
The first breaks circular dependency between `DiabloUI` and `text_render`.
The latter one moves `UiPanels` to a more appropriate place.
2021-11-25 12:22:27 +01:00
Gleb Mazovetskiy
7e1fea6f76 clang-format all files in {Source,test}/
Also includes a few manual tweaks to comments and newlines for better results.

Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2021-11-24 23:44:12 +01:00
Gleb Mazovetskiy
8d1708358f Extract spell list and book into separate files
Moves the spell list/book UI from `control.cpp` code into separate files.
2021-11-23 21:38:06 +00:00
obligaron
677303cba9
Reduce use of view globals in game menu 2021-11-20 21:57:32 +01:00
staphen
08e4e8c254 Implement virtual gamepad activation/deactivation 2021-11-15 00:55:32 +01:00
staphen
40cc894630 Force VIRTUAL_GAMEPAD=OFF when USE_SDL1=ON 2021-11-15 00:55:32 +01:00
Anders Jenbo
56170b3372 Clean up id normalization 2021-11-07 23:15:10 +01:00
Andrew James
796e2813cf
Use scoped enums for DungeonFlags/BFLAG (#3135) 2021-11-07 03:11:16 +01:00
Gleb Mazovetskiy
3d308983a8 Migrate to libmpq
libmpq is a much simpler alternative to StormLib for reading MPQ archives.

We use our own fork of libmpq: https://github.com/diasurgical/libmpq

Impact:

* DevilutionX is now a lot more portable. Unlike StormLib, libmpq only
  needs platform-specific code for Windows.
* Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only).
* RAM usage is **300 KiB** lower than StormLib.
* Stripped release linux_x86_64 binary is **32 KiB** smaller.
* Amiga build now hangs instead of crashing.
2021-11-06 23:51:42 +00:00
Gleb Mazovetskiy
12b73076b8
Fix build error in plrctrl.cpp (#3374)
Follow-up to #3370
2021-11-03 10:59:10 +01:00
Stephen C. Wills
423441c3dc
Fix speedbook navigation on gamepad 2021-11-03 10:50:35 +01:00
staphen
884f9ed46b [Virtual Gamepad] Turn player when stand button is pressed 2021-11-03 10:21:55 +01:00
ephphatha
6d545868d2 Move objectIsDisabled to a member function
While it does reference a global configuration option it's mainly concerned with the properties of the object itself, so makes sense to be a member of the object class.
2021-10-31 14:21:57 +01:00
Anders Jenbo
c0c97bf224 [gamepad] Operate object as last option for primery action
Fixes #3307
2021-10-28 22:47:47 +02:00
staphen
f090da3ca8 [Gamepad] Prevent player applying stat points to maxed stat 2021-10-28 08:36:19 +02:00
staphen
e2408bc6bc [Virtual Gamepad] Set primary action button graphic to apply in char panel when applying stat points for level up 2021-10-28 08:36:19 +02:00
qndel
9c10f43019 disable using crippling shrines with controller 2021-10-26 22:31:16 +02:00
staphen
85f0e7b8c3 Add button for standing still to attack 2021-10-26 07:54:51 +02:00
Anders Jenbo
609414fd69 [touch] Indicate level up in a touch friendly way 2021-10-26 07:52:06 +02:00
staphen
ccd8f114f8 [Virtual Gamepad] Add menu panel to top-right corner 2021-10-26 05:14:46 +02:00
Anders Jenbo
396aa449d2 [touch] Update button faces 2021-10-26 05:02:10 +02:00
Anders Jenbo
488acf0eba [touch] Fix some button faces 2021-10-25 08:05:07 +02:00
staphen
a6807beb59 Improve gamepad cursor positioning when picking up items in inventory 2021-10-25 06:03:26 +02:00
Anders Jenbo
284f0347cc [touch] Add additional button faces
Apply color correciton
2021-10-25 05:49:53 +02:00
staphen
76de43fb0a [Gamepad] Use secondary action button to apply oils 2021-10-25 02:46:17 +02:00
staphen
900af16a9e Fix distributing stat points using gamepad 2021-10-21 13:25:19 +02:00
Anders Jenbo
d5999e6027 [gamepad] Only warp the cursor if item was moved 2021-10-20 05:08:45 +02:00
Anders Jenbo
8e70cd7a37 [gamepad] Fix OOB when using equiped items 2021-10-20 05:08:45 +02:00
Anders Jenbo
8730c3b2db [touch] Ignore irelevant input when in the inventory 2021-10-20 05:08:45 +02:00
Anders Jenbo
3d38e6ce88 [gamepad] Correctly jump over items horizontally 2021-10-20 05:08:45 +02:00
Anders Jenbo
2f925bfeb7 [gamepad] Prevent warping from row 9 and 10 to belt 2021-10-20 05:08:45 +02:00
Anders Jenbo
1ba7e07b29 Do not show the cursor when using a touch device 2021-10-20 05:08:45 +02:00
Anders Jenbo
b3a9a2ddce [gamepad] Allow for mixed mode navigation in inventory 2021-10-20 05:08:45 +02:00