Gleb Mazovetskiy
de6eac137b
Split up lua bindings a bit
...
```lua
local render = devilutionx.render
local function drawGreet ()
render.string("Hello from " .. _VERSION, 10, 40)
end
Events.OnGameDrawComplete.Add(drawGreet)
```
2 years ago
Anders Jenbo
706010ee45
Add Lua support
2 years ago
ephphatha
d13bed2a78
Fix broken test case
3 years ago
ephphatha
6a8f4b12da
Get base block bonus from data struct instead of storing a copy
3 years ago
ephphatha
c1f3dcb705
Use safer versions of random number functions instead of GenerateRnd
3 years ago
Andrew James
bb16b93836
move definition of non-templated function to cpp file ( #6620 )
3 years ago
ephphatha
3fda0586bd
Add support for parsing fixed point decimal strings
3 years ago
ephphatha
f3de9d6e71
Use dedicated error enum for parsing failures
3 years ago
Eric Robinson
c754d95ecc
Fix various Automap drawing issues ( #6555 )
3 years ago
Eric Robinson
0f3c74af33
Avoid rounding issues in automap and allow an extra zoom out step
3 years ago
Gleb Mazovetskiy
b28bbd65ad
Fix some compilation warnings
...
```
data_file_test.cpp:37:20: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
37 | if (!result.endOfFile())
| ^
```
```
Source/engine/render/dun_render.cpp:1126:6: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
1126 | void RenderTile(const Surface &out, Point position,
```
3 years ago
staphen
a151219b9b
Don't validate creation flags on gold
3 years ago
Gleb Mazovetskiy
65e0ad88d2
Further reduce demo file size
...
The vast majority of events are rendering events:
Type | Count
-------------|------:
Rendering | 58,971
MouseMotion | 19,651
GameTick | 6,414
MouseButton | 516
Key | 7
Custom | 1
Encodes Rendering events in a single byte when possible.
Demo file size: 253,410 bytes -> 194,439 bytes
3 years ago
ephphatha
5f6e5ae9fb
Refactor iterator parsing to allow more reuse
3 years ago
staphen
4deae11871
Fix PlayerNetPack validation and tests
3 years ago
Gleb Mazovetskiy
eb51a8beb3
Reduce demo message size
...
`DemoMsg` struct and event data are now kept separately.
RAM usage for the timedemo messages: -85% (1.8 MiB -> 261 KiB)
Demo (`.dmo`) file size: -57% (590,790 bytes -> 253,410 bytes)
3 years ago
Stephen C. Wills
45dbe6aa61
Shift software cursor graphic and remove special casing ( #6512 )
3 years ago
Anders Jenbo
bf7135dd11
Adjust tests to work with data driven levels ( #6509 )
...
Co-authored-by: staphen <staphen@gmail.com>
3 years ago
ephphatha
32c3316743
Load experience data from file
...
Also added an iterator based API, though it's not useful for this use-case. Might be nice in the future?
The field/record iterators is single-pass input iterators with shared state.
To avoid rescanning fields unnecessarily parseInt currently can only be called once, it would be possible to make these iterators bidirectional with a bit of extra state (holding onto the start pointer)
Co-authored-by: Gleb Mazovetskiy <glex.spb@gmail.com>
3 years ago
ephphatha
996841e82e
Restore level 50 experience cap from Diablo
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
Stephen C. Wills
7b06703842
Add tests for net player validation ( #6492 )
3 years ago
Gleb Mazovetskiy
8c1a847f41
Remove utils/stdcompat/string_view.hpp
3 years ago
Gleb Mazovetskiy
62d067b653
Remove utils/stdcompat/abs.hpp
3 years ago
ephphatha
4e3f46603a
Remove unused attribute _pMaxLvl
3 years ago
Anders Jenbo
1af58fa4de
Update CI test demo recording
3 years ago
Anders Jenbo
8e7c29ecd3
Remove unused player property _pISplDur
3 years ago
Anders Jenbo
63277a842d
Clean up player packing
3 years ago
Anders Jenbo
efa51993e3
Split network player sync and hero save file
3 years ago
Anders Jenbo
8f74f86a6e
🐛 Use the alternate stairs up banner is active
3 years ago
qndel
3500dc1861
code cleanup
3 years ago
ephphatha
328a65424d
Add cases for non-arrow missiles
3 years ago
ephphatha
f90e969108
Use multiple samples instead of specific seeds to test missile rotations
...
This is a visual effect, shouldn't need to be repeatable from a specific starting seed (even in multiplayer?)
3 years ago
ephphatha
3bbb80d849
Introduce temporary function to advance the global rng state and discard results
3 years ago
ephphatha
b98e5fcfad
split logic responsible for advancing global generator state to a dedicated function
...
Exposing this also allows updating the engine test case to avoid peeking at the engine state after a roll, also will be useful for setting item/object seeds
3 years ago
Anders Jenbo
b38efb6ccf
Fix code style
3 years ago
Anders Jenbo
6e7ed13336
Add missing Hellfire healing potions to test data
3 years ago
Anders Jenbo
116bd3f626
Decompose iCreateInfo fixture table
3 years ago
Anders Jenbo
261776b255
Correct OOB check in PrepareInnerBorders()
3 years ago
obligaron
7985a9211d
Change Player::_pSplLvl to uint8_t
3 years ago
Anders Jenbo
13c5c09990
Clean up Light related naming
...
A few are left unchanged as they will be removed in a later commit
3 years ago
obligaron
abcea9853c
Update timedemo test to include improved lightning
3 years ago
Anders Jenbo
ec9d1b5550
Rename _oLight to applyLighting
3 years ago
DakkJaniels
24bb409086
Remove extra entry in experience level table and cap experience at level 50 requirement ( #5782 )
3 years ago
obligaron
b87711bc08
Reintroduce Player::spellFrom to seperate teleport cursor from queued spell
3 years ago
obligaron
eeca953615
Introduce UpdateHellfireFlag to set missing CF_HELLFIRE flag
3 years ago
obligaron
0426908988
Introduce GetTranslatedItemName/GetTranslatedItemNameMagical
3 years ago
obligaron
6f9453c00e
Introduce GenerateStaffName/GenerateStaffNameMagical
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