Eric Robinson
5937734b85
Move *dat files to tables dir
2 months ago
Eric Robinson
e6032a69a8
Split control.cpp ( #8347 )
3 months ago
Anders Jenbo
1c76897f2c
Apply simple const rules using clang-tidy
7 months ago
Gleb Mazovetskiy
d3248e969a
Untangle more dependencies
...
This allows us to make `clx_render_benchmark` and
`text_render_integration_test` standalone.
8 months ago
Gleb Mazovetskiy
88a9a0656d
Move option change handlers out of `options.cpp`
...
Fixes #7638
1 year ago
Gleb Mazovetskiy
d94bc424df
`sgOptions` -> `GetOptions()`
...
In C++, globals initialization order accross translation units is not
defined. Accessing a global via a function ensures that it is initialized.
This will be needed for #7638 , which will statically initialize change
handlers after the Options object has been initialized.
1 year ago
Gleb Mazovetskiy
c31836eab8
Split up `engine.{h,cpp}`
...
Untangles dependencies by splitting up `engine.{h,cpp}` into 3 files:
1. `primitive_render`
2. `ticks` -- only contains `GetAnimationFrame` for now.
3. `GetWidth2` renamed to `CalculateSpriteTileCenterX` and moved to `levels/dun_tile.hpp`.
1 year ago
Eric Robinson
6396af1ff5
Cleanup panel code (Part 2) ( #7421 )
2 years ago
obligaron
f31def7c33
Fix MSVC warnings in qol\*
2 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
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
Eric Robinson
f75f66d54b
Add `playerdat` ( #5763 )
3 years ago
Gleb Mazovetskiy
c351acbf7e
Remove redundant devilutionx.mpq check
...
We now check it only once in `CheckArchivesUpToDate`.
We then use `LoadClx` instead of `LoadOptionalClx` throughout.
4 years ago
Gleb Mazovetskiy
5505e830fb
Render XP bar as CLX
...
Missed in #5183 .
Also, the previous conversion command was incorrect (missing
--transparent-color 1), re-converted with:
```
pcx2clx --transparent-color 1 data/xpbar.pcx
```
4 years ago
Mikołaj Piróg
dda0b96ea5
Remove #defines in player.h and add constexpr where applicable ( #4896 )
...
* Change defines to constexpr int in player.h
* Add const or constexpr to player.h/cpp where applicable
* Update tests with changed names of player constatns
* remove unecessary variable
4 years ago
Gleb Mazovetskiy
563ee3af7c
Optimize `FormatInteger`
4 years ago
Vladimir Olteanu
2cc9d70fa6
Use decimal separators for gold and XP ( #4722 )
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
qndel
354e329644
Players[MyPlayerId] -> MyPlayer
4 years ago
obligaron
bc15bdf3a9
Remove PANEL_ defines and replace them with GetMainPanel()
4 years ago
Anders Jenbo
1409e604f5
Reduce string conversions
4 years ago
Anders Jenbo
d0014b0414
Fix untranlsatable strings
4 years ago
Anders Jenbo
718c46e7fe
Remove use of tempstr
4 years ago
qndel
81800e64bb
MAXCHARLEVEL cleanup
4 years ago
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>
4 years ago
obligaron
635f378722
Add OptionEntry Experience Bar
4 years ago
Anders Jenbo
7771a08d03
Translatable mainpanel
5 years ago
Anders Jenbo
3b0858cdac
Don't show xp bar when chat is open
5 years ago
Juliano Leal Goncalves
3251171a5c
♻️ Leverage 'Point' in 'xpbar.DrawBar' function
5 years ago
Juliano Leal Goncalves
20d356a6eb
♻️ Leverage 'Point' in art_draw functions
5 years ago
ephphatha
8f2e94ae4d
Use unsigned types for player experience and related values
5 years ago
ephphatha
0575716eac
Rename UiFlags members to group related options
5 years ago
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
5 years ago
Anders Jenbo
7f5ea145e9
Fix MSVC C4477 warning
...
Also take translation in to account when printing XP info
5 years ago
Anders Jenbo
2ca6e37c46
Clean up sub folders using clang-tidy/Android Studio
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
5 years ago
Anders Jenbo
a7c7fa0030
Fully apply clang-tidy/format to all files
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Anders Jenbo
b71b0149a3
Clang-tidy: ConstexprVariableCase
5 years ago
Juliano Leal Goncalves
fd9f2099d0
♻️ Leverage 'Point' to represent mouse position
5 years ago
Gleb Mazovetskiy
f9f301b054
🚚 engine.h: Extract `Point`, `Direction`, `clamp`
...
`engine.h` is getting quite bloated. Moves this code to their own files.
5 years ago
Anders Jenbo
8a7ec56d3a
Player by reference part 2
...
This mostly change player to be by reference instead of by index.
But additionally it does stript checks for gold in the belt, move some
value types to the initialization and short circute a few functiongs.
5 years ago
Jmgr
bbd39aa513
Replace sprintfs with strcpy for translatable strings
5 years ago
Jmgr
6e85cde978
Update format strings
5 years ago