Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.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
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
staphen
6bcb4d70e4
Use padmapper bindings on spell icons
3 years ago
Gleb Mazovetskiy
ebcd6b222d
Optimize `SpellData` size: 40 bytes -> 24
3 years ago
Gleb Mazovetskiy
b61dac853b
Add `GetSpellData(SpellID)`
3 years ago
KPhoenix
d813f13700
`enum spell_id` -> `enum class SpellID`
3 years ago
Gleb Mazovetskiy
1788d2f8ec
Remove miniwin
...
Event handling code moved to `engine/events.{hpp,cpp}`.
3 years ago
DakkJaniels
0c1c8d0aa0
fix speedbook crash ( #5730 )
3 years ago
Eric Robinson
049f75515b
Fix bug in ef3a57b7 ( #5732 )
3 years ago
Eric Robinson
ef3a57b7d9
`enum spell_type` -> `enum class SpellType` ( #5674 )
3 years ago
Anders Jenbo
e50e21e0e4
Use outline for spell icon texts
3 years ago
Gleb Mazovetskiy
46e755f680
Simplify spell icon handling
...
Hide the internals of spell icon rendering behind simple functions.
3 years ago
Gleb Mazovetskiy
680ab5ec40
Overhaul backbuffer state handling
...
When rendering directly to the output buffer, we need to maintain the
state of what has been drawn and what needs redrawing per-buffer.
We previously tried to do it implicitly by checking `SDL_DOUBLEBUF` and
other flags. The previous implementation was broken in several
ways, resulting in rendering issues on devices that support 8-bit output
directly.
Changes this mechanism to explicitly maintain buffer state per output
buffer. The new mechanism doesn't require knowledge of the number of
buffers, and thus also works correctly with triple-buffering.
Fixes #5447
3 years ago
staphen
8b6db3a678
Get rid of panelstr, pnumlines, and ClearPanel()
4 years ago
KPhoenix
a1822bca8e
Remove sSkillText from spelldat.cpp
4 years ago
Anders Jenbo
3ae834148a
Split event handeling from general miniwin features
4 years ago
Anders Jenbo
2d21fc372e
Remove more miniwin code
4 years ago
Anders Jenbo
6a8fd04067
Use player by references ( #4938 )
4 years ago
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`.
4 years ago
staphen
cab75ded6b
Check both SPL_NULL and SPL_INVALID to determine spell validity
4 years ago
Gleb Mazovetskiy
17f8cdddc4
Clean up `GetSpellLevel`
...
Remove the buggy `GetSpellLevel` implementation and use
`Player#GetSpellLevel` throughout instead.
4 years ago
Anders Jenbo
72656b3011
Move path and palette to the engine folder
4 years ago
obligaron
9ac04314f4
Introduce Player::isOnLevel
4 years ago
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.
4 years ago
Gleb Mazovetskiy
779ccaca17
Overhaul translation fetching
...
1. Do not modify the map after loading. Instead, return string views
(guaranteed to be null-terminated) from look up functions and return
the key directly if not found.
2. Use an `unorded_map` instead of `map` where available (C++20).
Saves a bit of RAM (~50 KiB) and improves lookup performance.
4 years ago
Anders Jenbo
1203514383
Clean up use of currlevel
4 years ago
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
4 years ago
obligaron
bc15bdf3a9
Remove PANEL_ defines and replace them with GetMainPanel()
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
Gleb Mazovetskiy
a66ca44695
Zero-based frame indexing
...
Index frames starting at 0 instead of 1.
4 years ago
Gleb Mazovetskiy
ade8aba822
Fix some more warnings
4 years ago
Gleb Mazovetskiy
e3945da045
Fix a negative shift exponent sanitizer warning
...
Source/spells.h:54:14: runtime error: shift exponent -1 is negative
4 years ago
Drakker
3039b760e1
Added more Quickspell hotkeys for a total of 16. Saving will write the number of configured quickspell slots at the beginning of the hotkeys file. The loader will check the size, if its bigger than older saves should be it will load the header and read the hotkeys, otherwise it will load 4 quickspells for compatibility.
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
be57d62684
Use UTF8 aware string copying
4 years ago
Anders Jenbo
718c46e7fe
Remove use of tempstr
4 years ago
obligaron
419fe7b7ec
Change Keymapper to OptionCategory/OptionEntry
4 years ago
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.
4 years ago
Vladimir Olteanu
210ea7d18d
Always draw spell hotkey in town
4 years ago
Vladimir Olteanu
14eae23441
Spell list: always draw hotkeys
...
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
4 years ago
Gleb Mazovetskiy
8d1708358f
Extract spell list and book into separate files
...
Moves the spell list/book UI from `control.cpp` code into separate files.
4 years ago