staphen
fec72f87aa
Swap offsets in distance formula for light cones
1 year ago
staphen
b9d79b4314
Do not process vision for remote players when they are between dungeon levels
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
Gleb Mazovetskiy
7b0558146e
Async load: Handle errors
1 year 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
624afafe58
Extract Crawl to a library
...
Also adds a test and a benchmark
2 years ago
obligaron
597e6b5f5f
Add comment for fully light and fully dark optimiation assert
2 years ago
obligaron
4b7424949f
Make IsFullyDark/IsFullyLit respect hell and hellfire levels
2 years ago
Eric Robinson
692365fe8c
Clean up: MakeLightTable() ( #7089 )
2 years ago
Eric Robinson
0ac30d101d
Refactor TileHasAny() ( #7085 )
2 years ago
Gleb Mazovetskiy
25c1c5b372
Fix a few -Wsign-compare warnings
2 years ago
Anders Jenbo
af295b9f48
Fix warnings with conversion between size_t and int for playerId
2 years ago
Gleb Mazovetskiy
c5a5dc9f5c
Fix a few MSVC warnings
2 years ago
Gleb Mazovetskiy
0f77cc3797
Force-inline methods to improve debug build perf
...
This has little or no effect on the optimized build
but significantly improves performance of the headless debug build
`timedemo_test` on my machine goes from 3s to 2s.
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
Anders Jenbo
b7424a0068
Clean up PmChangeLightOff()
3 years ago
Anders Jenbo
124cc71800
Update realtime lighting when static lights are changed
3 years ago
Anders Jenbo
acf98f2bdc
Fix wrong check for light level
...
Introduced in 13c5c09990
3 years ago
Anders Jenbo
f345087e75
Fix Lazarus glowing inside the wall
3 years ago
Anders Jenbo
4db65d94de
Add glow to Crypt lava tiles
3 years ago
Anders Jenbo
eef0b10e1f
Hellfire: Fix light fall off not with in it's radious
3 years ago
Anders Jenbo
6ba5998a97
Unset all vision before updating current ones
3 years ago
Anders Jenbo
d8b5c3a970
Fix light brightness pop on load
3 years ago
Anders Jenbo
828a52dc6d
Clean up ProcessLightsList()
3 years ago
qndel
731ad1ada5
use std::rotate ( #6019 )
3 years ago
Anders Jenbo
e969a8ad01
Invert player to vision relation
3 years ago
Anders Jenbo
231f6814f7
Use rectangle logic in vision and lighting updates
3 years ago
Anders Jenbo
382212b98c
Remove DisableLighting from release builds
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
Anders Jenbo
3304e8a542
Clean up lighting_color_cycling()
3 years ago
Anders Jenbo
0b19c2fd4f
Assert correct use of LightFalloffs
3 years ago
Anders Jenbo
3723fb2cf0
Clean up light table generation
3 years ago
Anders Jenbo
53d4e72e19
Fix Hell modification of the light table
...
There was a precission issue that caused some jitter in the light table.
This is solved and made made more redable by using a shift instead of
tricky use of remander from a devision.
3 years ago
Anders Jenbo
b36709666b
Clean up Nest and Crypt modifications to the light table
3 years ago
Anders Jenbo
8ef94f7cc0
Only generate the relevant version of LightFalloffs
3 years ago
Anders Jenbo
2afcd9e654
Cleanup generation of LightConeInterpolations
3 years ago
Anders Jenbo
5d57d5a323
Rename lightradius and lightblock
3 years ago
Anders Jenbo
dc2d97c112
Split lighting shades from trn tables
3 years ago
Anders Jenbo
f9b5c61f68
Extract pause translations table as a data file
3 years ago
Anders Jenbo
7aee0b311b
Fix light smearing when walking ( #6002 )
3 years ago
Anders Jenbo
779f16280c
Consistently use uint8_t for lighting values
3 years ago
Gleb Mazovetskiy
6327e713e0
Lowercase all file paths
...
We want to be able to use unpacked MPQs on low-end platforms
(PS2/rg99/etc).
This is tricky on case-sensitive filesystems. Avoids case issues by
lowercasing all paths in the code (then we'll just need lowercased
listfiles).
4 years ago
Vladimir Olteanu
8fd3be67b5
Refactor VisionCrawlTable
4 years ago
Anders Jenbo
2d21fc372e
Remove more miniwin code
4 years ago
Andrew James
593a9f3b4b
Pull distinct points from VisionCrawlTable used by guardians ( #4844 )
4 years ago
Gleb Mazovetskiy
c8ddf7df65
Crawl: Move implementation from header to cpp
4 years ago
Vladimir Olteanu
bed5bd9ec1
Eliminate CrawlTable
4 years ago
Gleb Mazovetskiy
3b2e560fa0
Non-int versions of `Point` and `Displacement` ( #4824 )
...
* Non-int versions of `Point` and `Displacement`
This will allow us to make some structs, such as `ActorPosition`, much
smaller.
* ActorPosition: Use smaller types
`Monsters`: 56K -> 46K
* player.cpp: Reduce size of `DirectionSettings`
* CrawlTable: Displacement -> DisplacementOf<int8_t>
* CrawlTable: vector<vector> -> array<vector>
Also only allocate one vector during construction instead of two.
A bit less indirection.
* Monster#enemyPosition: Point -> WorldTilePosition
sizeof(Monster): 240 -> 232
* Monster: Further optimize field layout and sizes
sizeof(Monster): 232 -> 208
`Monsters` is down to 40,000 bytes
* DMonsterStr: _mx/_my -> position
4 years ago
Vladimir Olteanu
5a5111f1d8
Refactor CrawlTable ( #4833 )
4 years ago