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
DakkJaniels
313cdb853c
GetManaAmount - fix usage of pMaxManaBase
...
I don't think this ever comes up because no spells have an sManaCost of 255, however _pMaxManaBase is stored as fixed point, so it should be shifted before use.
But to be honest, I'm not even sure what it is trying to do here. Was sManaCost == 255 supposed to indicate that it was going to use all the player's mana? Why was it cast to a BYTE before using it? Did they intend to limit the manage usage to 255 and just screwed up? I originally saw this logic in Devilution, and found it because the Middle Earth mod had a slight change here, where it used pMana (maybe because they thought it was intended to be a spell that used all the player's mana?) Also, I saw that in 1.07, Ghidra saw `ma` as a byte, not an int as written in Devilution - I wonder if that's where the cast came from? In the ME Mod version, it sees `ma` as an int.
4 years ago
Gleb Mazovetskiy
4cdbd358dd
Audio: Use SDL resampler where available
4 years ago
ephphatha
3f5a697086
Add tests for GetInventorySize
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
cef42d47a8
Add function to get current grid
4 years ago
obligaron
92baf04096
Use unarmed Animations when casting in town if weapon is not hold
4 years ago
obligaron
ee1a17e9e5
Enable Spell Animation in Town
4 years ago
Gleb Mazovetskiy
c2b5cad662
Fix SPLICONLAST for zero-based frame indexing
...
Follow-up to https://github.com/diasurgical/devilutionX/pull/4221
4 years ago
ephphatha
aab970dcde
Use GetIventorySize(Item) instead of SetICursor in inv.cpp
...
Also use mod for testing if item dimensions are even. Lets assume the release build can optimise this into a bitmask, probably wont need to do this anyway after a refactor.
4 years ago
ephphatha
5f788a6e04
Be explicit about the cursor overlap checks when acting on inventory cells
4 years ago
Stephen C. Wills
24813302c8
Fix frame index of Level Up icon ( #4442 )
4 years ago
Andrew James
8ed94ec365
Use zero-based arch indexes
...
fixes #4434
4 years ago
Andrew James
6dca3b50c1
Remove use of SetICursor and related globals from CheckStashPaste ( #4429 )
4 years ago
ephphatha
6a04d441c1
Expand hot area of stash cell to include bottom-right border
...
This matches the behaviour of inventory cell hit logic. Previously it was possible to click exactly on a border and be unable to put an item in the stash.
4 years ago
Gleb Mazovetskiy
a66ca44695
Zero-based frame indexing
...
Index frames starting at 0 instead of 1.
4 years ago
Gleb Mazovetskiy
127615c33f
Fix conversion of C-string literal to `char*`
4 years ago
Gleb Mazovetskiy
7f695c2835
Use SoundSample for music
...
Unifies audio handling between sound effects and music.
4 years ago
Gleb Mazovetskiy
ade8aba822
Fix some more warnings
4 years ago
Anders Jenbo
4b8eba1768
Update zerotier_native.h
4 years ago
Vladimir Olteanu
0e497b10f9
Use Miniset in drlg_l4
4 years ago
Gleb Mazovetskiy
21c64fd0af
Hardware cursor: Simplify initialization
...
Set the palette at load time.
Since we only support hardware cursors in SDL2, we can take advantage of
its reference-counted palettes.
4 years ago
Vladimir Olteanu
25d412d1ac
Remove duplicate code in DoLighting
4 years ago
Anders Jenbo
c5a3d138e0
Avoid using HeldItem in CheckInvSwap
4 years ago
staphen
33b27f630f
Clean up logic for 1-handed weapons in CheckInvPaste()
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
34201c7881
Do not set scaling hint with out a render
4 years ago
Anders Jenbo
ce5bd1df74
Show failing line in error messages
4 years ago
Anders Jenbo
d42fdd7745
Bump dvl_multicast_addr in preperation for 1.4.0
4 years ago
Anders Jenbo
b55ab39fe3
[ganepad] Do not repeat spell if modefier is pressed
4 years ago
Anders Jenbo
b9b7e9698a
Revert IPL_TARGAC description
...
Lets give it a better one later
4 years ago
Anders Jenbo
122ec0ac9d
Fix crash when switching to English
4 years ago
Anders Jenbo
c667e69554
[gamepad] Fix repeated spell casting getting stuck if there is no target
4 years ago
staphen
af9ab6d9e2
Restore durability to items in stores
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
12de70550b
Fix an OOB in CEL/CL2 outline rendering
...
This OOB happened when rendering a sprite so that it is exactly
off-screen (touching the border but not visible) on top/bottom
while also being only partly off-screen on the left or right.
4 years ago
Gleb Mazovetskiy
b312edee49
Fix snd_deinit called even if snd_init failed
...
We were previously setting `was_sound_init` to true unconditionally
after calling `snd_init`.
However, `snd_init` can fail. Use `gbSndInited` instead.
4 years ago
Gleb Mazovetskiy
3488b2225c
Split up store title from "Your gold"
4 years ago
Gleb Mazovetskiy
a8b7de498c
Fix -Wswitch in misc_msg.cpp
4 years ago
Gleb Mazovetskiy
1209355a0b
Reduce debug log output of misc_msg
4 years ago
Gleb Mazovetskiy
0bddde1644
Reduce debug log output of MpqWriter
4 years ago
Gleb Mazovetskiy
235451ae5a
Reduce debug log output of Control
4 years ago
Gleb Mazovetskiy
82093bd255
Reduce debug log output of Keymapper
4 years ago
Gleb Mazovetskiy
4808d5c3ab
Reduce debug log output of OpenAsset
4 years ago
staphen
aad12e50e7
Do not process button held events in character panel
4 years ago