qndel
770f3a2f20
unify ranged and melee pierce
5 years ago
BC Ko
4df798808e
2435 refactor global variable Items part 2 ( #2673 )
5 years ago
Anders Jenbo
408c6e43b6
Don't echo quick commands
5 years ago
Vladimir Olteanu
bfcc57783c
Remove Surface::{Alloc,Free}, introduce OwnedSurface
5 years ago
obligaron
36f13b34dc
Add debug text commands
5 years ago
obligaron
6be94ceb3f
Move DiabloHotkeyMsg to control.cpp and use IsChatAvailable
5 years ago
obligaron
13ab3e0ba9
Handle chat visible logic seperated from multiplayer (own function)
5 years ago
vladtepesch
0e56e52c75
fixes casting level 0 spell says "not enough mana" ( #2568 )
5 years ago
obligaron
8dbe16d4f6
Introduce GetSpellListItems
5 years ago
obligaron
95daecc1bb
Introduce GetSpellListSelection and remove selection game logic from DrawSpellList
5 years ago
BC Ko
0a4361d5fc
cleanup manual value clamping: control.cpp
5 years ago
Aaron Sun
6701b8a989
Fix attribute up (+) button doesn't work in special case
...
1) Open quest panel
2) Open character panel by click level up (+) button
5 years ago
Aaron Sun
aef812fb5a
Modify the calculation of panel position
...
left/center combination is used, but panel distance is limited
5 years ago
Anders Jenbo
8df8b940c4
Handle some clang-tidy issues
5 years ago
Aaron Sun
3ee90ca629
Add options for sub-panel alignment
5 years ago
Anders Jenbo
90960f0c14
Remove dead code
5 years ago
4aron5un
4c8210df21
Center the sub-panels (Quest, Character, Spell and Inventory) ( #2498 )
5 years ago
Vladimir Olteanu
b17ff04ee2
Use string_view in DrawString and friends
5 years ago
qndel
169f980038
ranged/magic formulas
5 years ago
qndel
bd5e30db52
replace armor formula
5 years ago
Anders Jenbo
d523fc1e81
Cleanups
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
a2bed56061
Clean up some variables in control.cpp
5 years ago
Anders Jenbo
a19e7b2a3b
Remove some more use of miniwin
5 years ago
obligaron
1956c6a1c2
Fix some 64bit warnings
5 years ago
Anders Jenbo
77b72da276
♻️ Use monster by reference when possible
5 years ago
Anders Jenbo
352a0ca510
Place local symbols in an anonymous namespace
5 years ago
Anders Jenbo
bc51e1616d
🎨 Apply clang-tidy
5 years ago
Anders Jenbo
20262e4569
🚚 Move local symbols in to anon namespace
5 years ago
Anders Jenbo
9ebdb6db69
General clean up
5 years ago
Anders Jenbo
9b8bf92575
Rename quest globals
5 years ago
Anders Jenbo
96bf75b502
Rename player globals
5 years ago
Anders Jenbo
dce78dde62
Rename lighting globals
5 years ago
Anders Jenbo
07ad083fda
Rename monster globals
5 years ago
Anders Jenbo
cb564a2d54
Clean up A-D
5 years ago
Gleb Mazovetskiy
55464eec78
Fix `-Wmissing-braces`
...
Fixes warnings such as this one:
```
../../../../../../Source/engine/render/text_render.hpp:83:33: warning: suggest braces around initialization of subobject [-Wmissing-braces]
return DrawString(out, text, { position.x, position.y, out.w() - position.x, 0 }, flags, spacing, lineHeight, drawTextCursor);
^~~~~~~~~~~~~~~~~~~~~~
```
5 years ago
Anders Jenbo
4eabc6024b
Apply various cleanups via Android Studio
5 years ago
Andrew James
3508aa6d3d
Align Life/Mana flask drawing routines ( #2291 )
...
* Clamp hpPer as a sanity check
* Refactor update mana routines in control.cpp to use PlayerStruct::UpdateManaPercentage
* Remove unnecessary calls to UpdateHP/ManaPercentage
* Unify logic that draws the flasks into a single internal function
* Fix style violations
* Remove unnecessary save/loads of hp/manaPer
The way this variable is used expects a value in this range and it gets clamped again anyway, but this makes the code more similar to the manaPer logic for future refactoring
Identical logic in use, the checks to see if the values are negative can be accomplished using clamp and the same divide by zero guard. I'll combine the two attributes in a near future commit.
control_update_life_mana is called during the game loop before any of the drawing functions so hpPer/manaPer are calculated based on the latest current/max of their respective attributes every frame.
There's no need to do the calculation again in the draw routines. (There's also no need to calculate this every frame but that's going to take a bit to untangle.)
5 years ago
Gleb Mazovetskiy
cb0dae8590
🚚 Rename `CelOutputBuf` to `Surface` and extract
5 years ago
Anders Jenbo
d9e0658643
Clang-tidy: basic naming
5 years ago
ephphatha
3f69faaecf
Refactor DrawLifeFlask to minimise bounds checks, add comments
5 years ago
ephphatha
58f3ca9ba3
Refactor player hp percentage calculation to avoid C4244 warnings
5 years ago
Juliano Leal Goncalves
cbb84199c2
♻️ Replace Point addition with 'Point + Displacement'
5 years ago
Juliano Leal Goncalves
0441ffc2f4
♻️ Move 'fromDirection' from 'Point' type to 'Displacement' type
5 years ago
Anders Jenbo
e7f0ce2764
Apply cleanups to codec, control, and some of cursor
5 years ago
Juliano Leal Goncalves
a37311ddc4
♻️ Leverage 'Point.Contains' for bound checks related to character buttons
5 years ago
Juliano Leal Goncalves
fd9f2099d0
♻️ Leverage 'Point' to represent mouse position
5 years ago
Anders Jenbo
48113d064a
Clang-tidy: readability-redundant-declaration
5 years ago
Anders Jenbo
79c9078fa1
♻️ Clean up type sizes
5 years ago