Gleb Mazovetskiy
5b076e20ef
Rename `DrawFloor` to `DrawFloorTile`
...
There is no reason to overload these 2.
2 years ago
Gleb Mazovetskiy
efa94307e0
Optimize lit blending with light level 0
...
We don't need to worry about the custom Hell light table here (#7166 )
because this change only affects CLX sprites, not dungeon tiles.
2 years ago
Gleb Mazovetskiy
712f0bac0b
Remove `LightTableIndex` global
...
Also removes the redundant `DrawPlayerHelper` function.
2 years ago
Gleb Mazovetskiy
7940a10da9
clx_render: Slightly optimize `GetSkipSize`
...
This gives a very slight FPS boost.
1140 to 1143 FPS on my machine as measured by:
```bash
tools/linux_reduced_cpu_variance_run.sh tools/measure_timedemo_performance.py -n 5 --binary build-rel/devilutionx
```
2 years ago
Gleb Mazovetskiy
aecf711688
Clean up clx_decode.hpp
2 years ago
Gleb Mazovetskiy
df98042a1b
Optimize InvDrawSlotBack
...
0.4% of the timedemo profile -> 0.2%
2 years ago
Gleb Mazovetskiy
6180d3dd3d
Reduce map lookups in dvlnet
2 years ago
qndel
24f108f193
fix many typos ( #7322 )
2 years ago
Eric Robinson
75f42cc41d
Fix monster light on knockback ( #7122 )
2 years ago
Gleb Mazovetskiy
112e113201
Optimize `DoCrawl`
...
Benchmark:
```
cmake -S. -Bbuild-reld -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON
cmake --build build-reld --target crawl_benchmark && build-reld/crawl_benchmark
```
Before:
```
------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------
BM_Crawl/1 3.53 ns 3.53 ns 198384032
BM_Crawl/4 54.3 ns 54.2 ns 12907171
BM_Crawl/16 733 ns 732 ns 955101
BM_Crawl/20 1142 ns 1141 ns 613766
```
After:
```
------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------
BM_Crawl/1 1.36 ns 1.36 ns 453018506
BM_Crawl/4 5.59 ns 5.59 ns 124244505
BM_Crawl/16 102 ns 101 ns 6577269
BM_Crawl/20 147 ns 147 ns 4684004
```
2 years ago
Gleb Mazovetskiy
bf98d9f533
Speed up DeadItem
...
Previously, the same tiles were rechecked over and over again.
O(k^3) -> O(k^2)
This changes the visitation order but we agreed in #7215 that
we don't care.
2 years ago
Gleb Mazovetskiy
91306d8c22
Migrate misdat.cpp data to TSV
2 years ago
Gleb Mazovetskiy
624afafe58
Extract Crawl to a library
...
Also adds a test and a benchmark
2 years ago
Gleb Mazovetskiy
df3d76c3c1
Add utils/string_view_hash.hpp
2 years ago
Gleb Mazovetskiy
78e87e9f09
clx_sprite: Minor improvements from #7191
2 years ago
Gleb Mazovetskiy
90732aa7be
Migrate objdat.cpp data to TSV
2 years ago
Gleb Mazovetskiy
e5e007cd3c
Slightly optimize `Utf8CodePointLen`
...
A few more operations but the "lookup table" is now an immediate constant.
https://godbolt.org/z/7YG3ohWT6
2 years ago
Gleb Mazovetskiy
730c26a856
Migrate maps to unordered maps
2 years ago
Gleb Mazovetskiy
e9c29fa806
Switch to ankerl::unordered_dense
2 years ago
Gleb Mazovetskiy
01147410c1
Add dependency on unordered_dense
...
https://github.com/martinus/unordered_dense
2 years ago
Gleb Mazovetskiy
e7c58ad0ef
Remove missing SfxID
...
Follow-up to #7310
Also removes 1 more unused sound
2 years ago
Gleb Mazovetskiy
067d83afac
Remove "Book of " from `translation_dummy.cpp`
2 years ago
staphen
df0b3aaab7
Ensure that network timeout info shows up in the info panel
2 years ago
Eric Robinson
5ae0e5eb17
Optimize DeadItem() ( #7213 )
...
Optimize DeadItem() - Look up `player.position.tile` only once.
2 years ago
Anders Jenbo
28b7ae6b03
Allow for more flexible translations of "Book of {SpellName}"
2 years ago
Byrgius
0a778eec4b
Turkish Translation ( #7197 )
2 years ago
Gleb Mazovetskiy
27206cd1d7
Load font variant for Turkish
2 years ago
Anders Jenbo
211e99b420
Correct translation comment
2 years ago
Gleb Mazovetskiy
ada13f9e9a
Take PNG screenshots by default in SDL2 builds
...
PNG screenshots are also lossless and about half the size of the PCX
screenshots.
2 years ago
Gleb Mazovetskiy
33cc487ae4
Add single-argument logging overloads
...
Avoids going through `fmt` for single-argument log calls.
2 years ago
Gleb Mazovetskiy
b0c0ffef29
Fix tests build on SDL1
...
In SDL1, add `sdl2_to_1_2_backports` dependency to the interface of
`DevilutionX::SDL`, so that everything that uses SDL can also use
the backports.
Nearly everything uses the backports because logging uses the backports.
2 years ago
Gleb Mazovetskiy
177ba45f8d
Controller buttons: Make most of the code private
...
The compiler constant-folds the lookups in `printItemMiscGamepad`
code to the same asm as the manual version.
2 years ago
Gleb Mazovetskiy
742f5fd5f7
Fix a couple of compilation warnings
2 years ago
staphen
60113bb0b8
Fix brightness of whu casting animations
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
obligaron
56044b7021
Introduce IsFullyDark/IsFullyLit
2 years ago
staphen
753633f2ad
Don't validate items in Single Player
2 years ago
staphen
e0dddb1178
Don't draw non-item cursors as items
2 years ago
Gleb Mazovetskiy
8a135c9c3b
Increase OutlinePixels limit from 1024 to 1536
...
@Trihedraf reported that the game crashed when killing Diablo.
1536 should be enough for Diablo and any custom sprites (if not, we can increase it further).
2 years ago
staphen
15e44a19c3
Fix order of events when drawing timeout cursor
2 years ago
Gleb Mazovetskiy
35e93366f6
Replace uses of deprecated u8path
2 years ago
Gleb Mazovetskiy
09e7cfea0e
Turn codec into a standalone library
2 years ago
Gleb Mazovetskiy
3b0cde6704
Turn utils/format_int into a standalone library
2 years ago
Gleb Mazovetskiy
495e583e64
Turn utils/file_util into a standalone library
2 years ago
Gleb Mazovetskiy
164dc9dc87
Turn util/parse_int into a standalone library
2 years ago
Gleb Mazovetskiy
3e22e8065b
Turn util/str_* into a standalone library
2 years ago
Gleb Mazovetskiy
713c04838c
Turn utils/utf8 into a standalone library
2 years ago
Gleb Mazovetskiy
706905fd59
SDL1: Fix windowed video mode
...
On Ubuntu 24.04 when running in a window,
`SDL_GetVideoInfo` returns the display size rather than the window size,
resulting in incorrect scaling.
Using `SDL_GetVideoSurface` instead of `SDL_GetVideoInfo` fixes this.
2 years ago
Eric Robinson
a30f7c0b8e
Randomize Unique Item Generation (Reverse compatible) ( #7060 )
...
Co-authored-by: staphen <staphen@gmail.com>
2 years ago