Gleb Mazovetskiy
740868af3f
Update sol2 and lua
...
Also renames lua/lua.hpp to lua/lua_global.hpp.
The previous name broke version auto-detection in sol2, which involves
calling `__has_include(<lua/lua.hpp>)`.
8 months ago
Anders Jenbo
108cf4b42d
Load spell icon based on data ( #8072 )
8 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
staphen
bbc728a327
Remove overzealous validation logic in spell message handlers
9 months ago
Gleb Mazovetskiy
903f0a8181
Simplify palette handling
...
Gets rid of `orig_palette`, we now always have only 2 palettes:
1. `logical_palette`
This palette has color cycling / swapping applied but no global
effects such as brightness / fade-in.
2. `system_palette`
This palette is the actual palette used for rendering.
It is usually `logical_palette` with the global brightness setting
and fade-in/out applied.
Additionally, we now keep the k-d tree around and use it to
update single colors.
The colors that are color-cycled / swapped are never included
in the k-d tree, so the tree does not need updating on color
cycles/swaps.
9 months ago
staphen
88b39dc97d
Make use of SDL_UserEvent::code instead of SDL_Event::type
10 months ago
Gleb Mazovetskiy
58fe44f836
init.h -> init.hpp
10 months ago
staphen
8774c12b13
Ignore held mouse button when pressing keymapper mouse buttons
11 months ago
Anders Jenbo
3fb8be385b
Add support for MPQ packed mods and turn Hellfire into one
11 months ago
staphen
5855b3149e
More consistent gamepad context sensitivity
1 year ago
Eric Robinson
8eddf55c3f
Stores - IsPlayerInStore() ( #7843 )
1 year ago
Eric Robinson
aca06e898a
Menu text revision ( #3902 )
1 year ago
obligaron
949f5bce60
Enable CTRL + Mouse scroll wheel for map zoom
1 year ago
Eric Robinson
13a5ae4b0b
Replace Gamma Adjustment with Brightness Adjustment
1 year ago
Gleb Mazovetskiy
3bb1d685af
Extract current input mode into its own library
...
Removes a transitive dependency on the entire plrctrl from options.
1 year ago
Gleb Mazovetskiy
acc335be17
Options: Extract keymapper handling from options
1 year ago
Gleb Mazovetskiy
9492456dcd
Options: Remove dependency on demomode
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
staphen
7a6a6a6c32
Don't send spell level in spell casting network message
1 year ago
Gleb Mazovetskiy
bbcda12792
Move QuickMessages to its own library
...
Eliminates an options->diablo dependency.
1 year ago
Gleb Mazovetskiy
d7647d6c63
More dependency untangling
...
1. Moves more assets-related stuff from `init` to `engine/assets`.
2. Removes `SDL_audiolib` dependency from `soundsample.h`.
3. Cleans up some unused/missing includes.
1 year ago
Gleb Mazovetskiy
a7651f15d9
Extract `HeadlessMode` from `diablo.h`
...
Untangles some dependencies.
Many places that use `HeadlessMode` do not need all of `diablo.h`.
1 year ago
Gleb Mazovetskiy
b76feb2be3
Extract game mode out of init.cpp
...
Untangles some dependencies
1 year ago
Gleb Mazovetskiy
a49b1f2d58
Extract Is{Any,None}Of out of engine.hpp
...
Untangles some of the dependencies
1 year ago
Eric Robinson
8d1fb2bd63
Move Game Mode to own category
1 year ago
Eric Robinson
f1d48d7124
Debug: Insivible ( #7543 )
1 year ago
Gleb Mazovetskiy
7b0558146e
Async load: Handle errors
1 year ago
Gleb Mazovetskiy
f15fbcf61a
Async loading
...
Does the loading on a separate thread, so we're
now loading while fading in and while updating
the progress bar.
1 year ago
staphen
bfd289db88
Clear unique item flags in LoadGameLevel()
1 year ago
Eric Robinson
181247924b
Cleanup LoadGameLevel() ( #7467 )
1 year ago
Eric Robinson
e90855b3c4
Rename stores.cpp global variables ( #7425 )
2 years ago
Anders Jenbo
974f517fd9
Make belt_item_type in to an enum class
2 years ago
Eric Robinson
6396af1ff5
Cleanup panel code (Part 2) ( #7421 )
2 years ago
Gleb Mazovetskiy
2580cd7b68
Simplify foliage rendering
...
During `ReencodeDungeonCels`, extracts floor tile foliage into
a triangle with the floor frame and a separate 16-px tall `TransparentSquare`.
This means that the floor frames are now always triangles and
the foliage can be rendered directly without masking.
Dungeon graphics sizes:
Map | Frames | Foliage frames | Byte size | Before PR | After PR
-----|--------|---------------:|-----------:|----------:|----------:
Town | 3,803 | 41 | 2,317,832 | 2,242,056 | 2,242,190
L1 | 1,119 | 11 | 738,836 | 721,604 | 721,110
L4 | 1,091 | 6 | 603,140 | 584,500 | 584,242
RG99 binary size reduced by ~4 KiB: 2,426,380 bytes -> 2,421,388 bytes
2 years ago
Gleb Mazovetskiy
3d716f74d3
Add dun_render_benchmark
...
Results from a single run (a bit noisy) on my machine:
```
tools/build_and_run_benchmark.py dun_render_benchmark
```
```
------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
------------------------------------------------------------------------------------------------------------------------
DunRenderBenchmark/LeftTriangle_Solid_FullyLit 98297 ns 98282 ns 8840 items_per_second=15.1096M/s
DunRenderBenchmark/LeftTriangle_Solid_FullyDark 124727 ns 124701 ns 6973 items_per_second=11.9085M/s
DunRenderBenchmark/LeftTriangle_Solid_PartiallyLit 514869 ns 514747 ns 1700 items_per_second=2.88491M/s
DunRenderBenchmark/LeftTriangle_Transparent_FullyLit 520312 ns 520216 ns 1682 items_per_second=2.85458M/s
DunRenderBenchmark/LeftTriangle_Transparent_FullyDark 524440 ns 524331 ns 1664 items_per_second=2.83218M/s
DunRenderBenchmark/LeftTriangle_Transparent_PartiallyLit 532300 ns 532162 ns 1647 items_per_second=2.7905M/s
DunRenderBenchmark/RightTriangle_Solid_FullyLit 92387 ns 92363 ns 8840 items_per_second=16.7275M/s
DunRenderBenchmark/RightTriangle_Solid_FullyDark 85680 ns 85662 ns 9884 items_per_second=18.0361M/s
DunRenderBenchmark/RightTriangle_Solid_PartiallyLit 538347 ns 538250 ns 1626 items_per_second=2.87041M/s
DunRenderBenchmark/RightTriangle_Transparent_FullyLit 548800 ns 548760 ns 1598 items_per_second=2.81544M/s
DunRenderBenchmark/RightTriangle_Transparent_FullyDark 540450 ns 540369 ns 1620 items_per_second=2.85916M/s
DunRenderBenchmark/RightTriangle_Transparent_PartiallyLit 555061 ns 555003 ns 1575 items_per_second=2.78377M/s
DunRenderBenchmark/TransparentSquare_Solid_FullyLit 700849 ns 700751 ns 1320 items_per_second=3.68176M/s
DunRenderBenchmark/TransparentSquare_Solid_FullyDark 664927 ns 664872 ns 1389 items_per_second=3.88045M/s
DunRenderBenchmark/TransparentSquare_Solid_PartiallyLit 1131702 ns 1131559 ns 822 items_per_second=2.28004M/s
DunRenderBenchmark/TransparentSquare_Transparent_FullyLit 1022384 ns 1022267 ns 916 items_per_second=2.5238M/s
DunRenderBenchmark/TransparentSquare_Transparent_FullyDark 1023193 ns 1023057 ns 900 items_per_second=2.52185M/s
DunRenderBenchmark/TransparentSquare_Transparent_PartiallyLit 1033573 ns 1033496 ns 895 items_per_second=2.49638M/s
DunRenderBenchmark/Square_Solid_FullyLit 53532 ns 53524 ns 10000 items_per_second=30.8272M/s
DunRenderBenchmark/Square_Solid_FullyDark 41993 ns 41987 ns 19794 items_per_second=47.1573M/s
DunRenderBenchmark/Square_Solid_PartiallyLit 842772 ns 842615 ns 1108 items_per_second=1.56655M/s
DunRenderBenchmark/Square_Transparent_FullyLit 834105 ns 834026 ns 1119 items_per_second=1.58269M/s
DunRenderBenchmark/Square_Transparent_FullyDark 831912 ns 831823 ns 1122 items_per_second=1.58688M/s
DunRenderBenchmark/Square_Transparent_PartiallyLit 924638 ns 924536 ns 1010 items_per_second=1.42774M/s
DunRenderBenchmark/LeftTrapezoid_Solid_FullyLit 33728 ns 33725 ns 24962 items_per_second=18.8583M/s
DunRenderBenchmark/LeftTrapezoid_Solid_FullyDark 31088 ns 31085 ns 27444 items_per_second=20.4601M/s
DunRenderBenchmark/LeftTrapezoid_Solid_PartiallyLit 268792 ns 268768 ns 3254 items_per_second=1.97196M/s
DunRenderBenchmark/LeftTrapezoid_Transparent_FullyLit 277990 ns 277965 ns 3140 items_per_second=1.90672M/s
DunRenderBenchmark/LeftTrapezoid_Transparent_FullyDark 268952 ns 268912 ns 3250 items_per_second=1.9709M/s
DunRenderBenchmark/LeftTrapezoid_Transparent_PartiallyLit 288869 ns 288826 ns 3056 items_per_second=1.83501M/s
DunRenderBenchmark/RightTrapezoid_Solid_FullyLit 29581 ns 29576 ns 28347 items_per_second=21.0984M/s
DunRenderBenchmark/RightTrapezoid_Solid_FullyDark 25315 ns 25312 ns 32250 items_per_second=24.6523M/s
DunRenderBenchmark/RightTrapezoid_Solid_PartiallyLit 259977 ns 259960 ns 3312 items_per_second=2.0003M/s
DunRenderBenchmark/RightTrapezoid_Transparent_FullyLit 263079 ns 263056 ns 3322 items_per_second=1.97677M/s
DunRenderBenchmark/RightTrapezoid_Transparent_FullyDark 259849 ns 259824 ns 3364 items_per_second=2.00136M/s
DunRenderBenchmark/RightTrapezoid_Transparent_PartiallyLit 279623 ns 279594 ns 3127 items_per_second=1.85984M/s
```
2 years ago
Gleb Mazovetskiy
451f1fd70a
Re-encode dungeon tiles to remove bloat
...
Triangles in the dungeon CEL data have two redundant 0x00 pixels every other row.
Re-encodes the dungeon CEL data to remove these pixels in order to save RAM and simplify the rendering code.
Example RAM savings:
```
VERBOSE: Re-encoding dungeon CELs: 1,119 frames, 738,836 bytes
VERBOSE: Re-encoded dungeon CELs: 1,119 frames, 722,552 bytes
```
Performance remains the same. The rendering code is now a bit simpler.
2 years ago
Gleb Mazovetskiy
51659c827d
Only check devilutionx.mpq version if it exists
2 years ago
Gleb Mazovetskiy
7d5bef724d
Check DevilutionX version
...
This is similar to how we handle extra fonts
2 years ago
qndel
24f108f193
fix many typos ( #7322 )
2 years ago
Gleb Mazovetskiy
90732aa7be
Migrate objdat.cpp data to TSV
2 years ago
Gleb Mazovetskiy
2e7d565b05
CLX renderer: Cache the last drawn outline
2 years ago
matheusgomes28
7848ab731e
Splitting CheckInvPaste() into smaller functions ( #6984 )
2 years ago
Eric Robinson
0d68aed1f7
Sort inventory ( #7040 )
2 years ago
staphen
3c5b298391
Capture the level seed and use it to skip failed dungeon layouts
2 years ago
staphen
9e682afe13
Rename glSeedTbl
2 years ago
obligaron
8cb167ac98
Implement quick spell cycling
2 years ago
obligaron
426dd4c4af
Add scroll wheel support to keymapper
2 years ago
obligaron
244d3d2f3a
Remove scroll wheel hack
2 years ago
Gleb Mazovetskiy
124d113b57
Extract spell data to a TSV
2 years ago
Gleb Mazovetskiy
17f95a04da
Migrate missile sprite data to txtdata
2 years ago