Andrew James
c7abf2f778
Extract logic from CheckInvCut/AutoPlaceItemInInventory ( #7494 )
...
* Remove unnecessary namespace
* Extract FindSlotUnderCursor
* Split logic for finding a space in the inventory to dedicated functions
1 year ago
Eric Robinson
e90855b3c4
Rename stores.cpp global variables ( #7425 )
2 years ago
Eric Robinson
6396af1ff5
Cleanup panel code (Part 2) ( #7421 )
2 years ago
Gleb Mazovetskiy
730c26a856
Migrate maps to unordered maps
2 years ago
Gleb Mazovetskiy
dbf14dd6d4
Fix item label height for CJK
2 years ago
obligaron
2da492d203
Change some functions to Player reference
2 years ago
obligaron
fae6b3d817
Change Player::getId() and MyPlayerId to uint8_t
2 years ago
obligaron
22ec684671
Fix some MSVC warnings
2 years ago
obligaron
f31def7c33
Fix MSVC warnings in qol\*
2 years ago
Anders Jenbo
bb2e189327
Convert _sfx_id in to class enum
2 years ago
Gleb Mazovetskiy
55b0fc5c26
Text inputs: Selection, copy, cut
...
Adds shift selection, Ctrl+C, and Ctrl+X handling.
Also fixes left-right movement for non-ASCII characters.
2 years ago
Gleb Mazovetskiy
e5881688f4
`text_render`: Replace optional args with struct
...
4 options args are a bit unwieldy, especially when you want
to pass only the first and the last one.
With a struct, there is no need to specify the default values
for the args in between.
2 years ago
Gleb Mazovetskiy
09ab58343c
Migrate gold drop/withdrawal to `text_input`
...
With this, all text input is handled in a unified way.
2 years ago
qndel
c3d1c82f6f
chatlog refactor
2 years ago
Gleb Mazovetskiy
88bbf4f913
Improve DiabloMsg handling
...
1. Simplified implementation.
2. Now adjusts the box size to fit the content (e.g. when wrapping
failed or when there are too many lines).
2 years ago
Gleb Mazovetskiy
d1d27c8368
Rename error -> diablo_msg
2 years ago
ephphatha
24a20ce8e2
Extract uses of MyPlayer to prevent future crashes in tests/game init
3 years ago
ephphatha
bd8aab0aff
handle stash item swapping using the gamepad a bit better
3 years ago
Gleb Mazovetskiy
5355146d51
Use structured bindings
3 years ago
ephphatha
dd296d25e0
Find the closest point when pasting items on the edge of the stash
3 years ago
Stephen C. Wills
45dbe6aa61
Shift software cursor graphic and remove special casing ( #6512 )
3 years ago
ephphatha
996841e82e
Restore level 50 experience cap from Diablo
3 years ago
ephphatha
e6890cc5cc
Move MaxCharacterLevel to playerdat and add helpers for the various uses
3 years ago
ephphatha
14639cd096
Replace _pNextExper with getter method
...
No real need to persist this value
3 years ago
ephphatha
da76e131e4
Add getter/setter for character levels to ensure _pNextExper stays synced
3 years ago
ephphatha
d92d152576
Use unsigned type for character levels
3 years ago
ephphatha
486f5ca3e8
Replace ExpLvlsTbl global with helper function
3 years ago
Gleb Mazovetskiy
9ae72f0269
Remove `PointsInRectangle` factory functions
...
These are no longer needed in C++17 thanks to CTAD.
3 years ago
Gleb Mazovetskiy
ba4def9382
Use utils/algorithm/container.hpp in more places
3 years ago
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
3 years ago
Gleb Mazovetskiy
c19bfe87fa
Remove utils/stdcompat/algorithm.hpp
3 years ago
Gleb Mazovetskiy
62d067b653
Remove utils/stdcompat/abs.hpp
3 years ago
Gleb Mazovetskiy
8101e2c0ba
Add `c_any_of` and friends
...
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.
3 years ago
qndel
1b42a17153
dont show hit indicator for 1 player
3 years ago
qndel
88e7c8feec
get rid of hardcoded ALT in variable/function name
3 years ago
Gleb Mazovetskiy
5bf0b8bc96
Add more missing <cstdint> includes
...
https://github.com/diasurgical/devilutionX/pull/6095 only added includes
for `uint32_t`, this PR also adds the includes for the remaining
integral types.
3 years ago
Gleb Mazovetskiy
4fa3732526
Add missing <cstdint> includes
...
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
3 years ago
obligaron
b87711bc08
Reintroduce Player::spellFrom to seperate teleport cursor from queued spell
3 years ago
obligaron
b916c8e428
Introduce Open/Close/ToggleCharPanel
3 years ago
obligaron
1522dc7031
Multiplayer: Add arena potions
3 years ago
obligaron
590c990c80
Introduce Item::getName
3 years ago
obligaron
2296bf5625
Use StashStruct::EmptyCell instead for empty stash item check
3 years ago
Gleb Mazovetskiy
e35595a1eb
StrCat improvements
...
1. Use `fmt::format_int` directly instead of parsing a format string.
2. Use `AppendStrView`.
3. Define the varargs versions using fold expressions when available.
4. Add tests.
3 years ago
staphen
58b48e17ea
Fix OOB access when accessing stash
3 years ago
ikonomov
49894785b5
Update stash.cpp
3 years ago
obligaron
715e689ecb
Introduce Item::isUsable()
3 years ago
Eric Robinson
f75f66d54b
Add `playerdat` ( #5763 )
3 years ago
KPhoenix
a1fbf5253f
`enum talk_id` -> `enum class TalkID`
3 years ago
Gleb Mazovetskiy
1788d2f8ec
Remove miniwin
...
Event handling code moved to `engine/events.{hpp,cpp}`.
3 years ago
Trihedraf
624d5be3d2
make Floating Numbers an enum for random, vertical or off
3 years ago