staphen
ef9ae41f6a
Fix item graphics on potion buttons for virtual gamepad
4 years ago
ephphatha
64a2c41b2c
Set clang-tidy config for MethodCase option
...
Previously this was falling back to FunctionCase, leading to inconsistent casing of class methods throughout the codebase. Applied to Item as an example.
4 years ago
ephphatha
7a3722d63b
Add helper for clearing an item and using it's old value
...
Used when moving from one persistent variable to another where we want the source variable to be marked empty. Defining as a function instead of move constructor/assignment operator as we only really need to mark the source for xvalues. Detecting that in the constructor/assignment would be needlessly complicated.
4 years ago
ephphatha
8d3f39d2e5
Clear the held item if it is used to open a quest entrance
4 years ago
Anders Jenbo
dc706e8ed5
Use HoldItem for determining if an item is held
...
This cleans up a bit of code and solves a few edge cases where an item
could be lost, the game be unresponsive, or miss fire an event during
lag cause of the cursor not reflecting the currently held item.
4 years ago
ephphatha
0595593f6f
Move the adjustment for large items out of InvGetEquipSlotCoord
4 years ago
ephphatha
c0a7f35bb9
Only attempt to lookup mouse position if the slot changes
4 years ago
ephphatha
b2127d07dc
Change InventoryMoveToBody side-effect to return value
...
This makes the call sites use the same pattern as every other inventory movement. See the next commit for why :D
4 years ago
ephphatha
40a0d6dda3
Replace uses of icursSize28 with local itemSize variable
...
Re-ordered the last couple of if conditions to make it clearer what the impact of the adjustments to mouse position are.
4 years ago
ephphatha
0adf0fb1f3
Use GetInventorySize in GetItemSizeOnSlot
4 years ago
ephphatha
907e1376b0
Add function to get item id at grid coords
...
Also introduced a few helper types and values to hopefully help document behaviour
correct spelling in comment
Co-authored-by: qndel <stefan551@o2.pl>
4 years ago
ephphatha
5f788a6e04
Be explicit about the cursor overlap checks when acting on inventory cells
4 years ago
Gleb Mazovetskiy
ade8aba822
Fix some more warnings
4 years ago
Gleb Mazovetskiy
9b8347996a
Fix OpenDingux/RetroFW builds
...
Follow-up to https://github.com/diasurgical/devilutionX/pull/4414 ,
which removed the `state` field.
4 years ago
Anders Jenbo
c667e69554
[gamepad] Fix repeated spell casting getting stuck if there is no target
4 years ago
Anders Jenbo
3792b9238c
[touch] Hook up action repeat
4 years ago
Anders Jenbo
66d7a3c222
[gamepad] Reuse repeat logic from mouse
4 years ago
Gleb Mazovetskiy
235451ae5a
Reduce debug log output of Control
4 years ago
staphen
aad12e50e7
Do not process button held events in character panel
4 years ago
staphen
27b7a71132
Do not process held events for action buttons in main menu
4 years ago
staphen
075953a1f3
Enable use of L2/R2 on joystick
4 years ago
Anders Jenbo
c68af7a5bf
[touch] Allow interacting with the spell book
...
Fixes #4393
4 years ago
Anders Jenbo
3b86c7fac4
[touch] Spend stat points when clicking the buttons
...
Fixes #4387
4 years ago
staphen
2759eb130b
Update player's spell target when using quick cast on gamepad
4 years ago
Gleb Mazovetskiy
787bc54310
Only query cbutton state for button events
...
Similar to https://github.com/diasurgical/devilutionX/pull/4374
4 years ago
staphen
a0bc3f218f
Only query jbutton state for button events
4 years ago
Gleb Mazovetskiy
4c2fa76e49
Controller mouse emulation fixes
...
1. Do not interrupt mouse mode on virtual clicks.
2. Handle virtual clicks directly instead of sending an SDL event.
3. Fix D-Pad mouse emulation state handling.
4. Hides the modifier hints during D-Pad mouse emulation.
4 years ago
Gleb Mazovetskiy
56de0a6566
Fix modifier + D-Pad triggering a D-Pad event
...
Also fixes build with `HAS_KBCTRL=1`
Fixes #1977
4 years ago
Felipe Wannmacher
889cc04f95
Enhanced attack using controllers ( #4019 )
4 years ago
Gleb Mazovetskiy
79c7eee10a
Mouse/Gamepad fixes
...
Introduces a `ControlDevice` global which is distinct from `ControlMode`
in that it is set to `Gamepad` even when simulating a mouse.
This allows us to avoid a number of edge cases related to mode changes.
Fixes #4242
4 years ago
staphen
e6182709d1
Allow casting Town Portal, Teleport, and Guardian scrolls from inventory
4 years ago
Gleb Mazovetskiy
40b1cd6d8a
Fix a negative shift exponent sanitizer warning
...
Source/spells.h:53:14: runtime error: shift exponent -1 is negative
Fixes #4319
4 years ago
staphen
6250067283
Touchscreen navigation for stash
4 years ago
staphen
6a30cd3950
Add gamepad support for stash
4 years ago
Anders Jenbo
9226f1435c
Clean up PotionButtonRenderer
4 years ago
Anders Jenbo
0f44da5487
[gamepad] Fix using quick spells with rebound keys
4 years ago
Anders Jenbo
8235380ef9
[gamepad] Avoid OOB on empty belt
4 years ago
Anders Jenbo
9d65580294
[gamepad] Fix managing belt
4 years ago
obligaron
481f15ded5
Introduce StashStruct.GetPage/SetPage
4 years ago
Anders Jenbo
6d28810dc7
Change infostr from char[128] to std::string
4 years ago
Anders Jenbo
1409e604f5
Reduce string conversions
4 years ago
Anders Jenbo
fbabb96464
[gamepad] Align cursor after using item
4 years ago
Anders Jenbo
a48f89007d
Implement stash
4 years ago
Gleb Mazovetskiy
7fede6c4cb
Clean up owned/unowned CelSprite ambiguity
...
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.
This clarifies ownership and makes the code cleaner in a number of
places.
Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
4 years ago
qndel
48f102eff1
Chat log
4 years ago
Felipe Wannmacher
6a6fd404dc
improved hints and added icons
4 years ago
ephphatha
db1d776539
Deduplicate PItem and DItem
4 years ago
obligaron
234a053863
Change Missiles Array to std::list
4 years ago
ephphatha
3bc2eb8471
Use ObjectAtPosition when highlighting from gamepad movement
4 years ago
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
4 years ago