Gleb Mazovetskiy
a2961eafd2
scrollrt: Add `IsFloor` function
...
Makes the connection between `foliage` and floor more obvious,
see
https://github.com/diasurgical/devilutionX/pull/7327#issuecomment-2294816131 .
2 years ago
Gleb Mazovetskiy
d41c7e4221
dun_render: Optimize triangle rendering
...
A small performance improvement at the cost of ~1 KiB binary size.
1143 -> 1147 FPS on the timedemo
2 years ago
Gleb Mazovetskiy
81452d870d
Add a `StaticVector` pretty-printer for LLDB
2 years ago
Gleb Mazovetskiy
51659c827d
Only check devilutionx.mpq version if it exists
2 years ago
Gleb Mazovetskiy
cfa6529357
animationinfo_test.cpp: Add missing include
...
for std::setprecision
2 years ago
Gleb Mazovetskiy
dc2406d2b1
Further increase outline pixels to 2048
...
Follow-up to https://github.com/diasurgical/devilutionX/pull/7157
2 years ago
Gleb Mazovetskiy
7d5bef724d
Check DevilutionX version
...
This is similar to how we handle extra fonts
2 years ago
qndel
8e57785755
change log type on missing optional lua assets from error to info
2 years ago
Gleb Mazovetskiy
8681ef7ccc
Add a `StaticVector` pretty-printer for GDB
...
Previously, printing a `StaticVector` in gdb printer the size and
the raw bytes of `data_`.
Example of using this pretty-printer:
```
$ gdb -iex 'add-autoload-safe-path .' build/devilutionx
(gdb) b Source/engine/load_file.hpp:126
(gdb) run
(gdb) p files
$1 = devilution::StaticVector<devilution::AssetRef, 6> of length 5 = {{archive = 0x55555c8d7460 <devilution::diabdat_mpq>, fileNumber = 1420,
filename = "monsters\\zombie\\zombien.cl2", directHandle = 0x0}, {archive = 0x55555c8d7460 <devilution::diabdat_mpq>, fileNumber = 1421,
filename = "monsters\\zombie\\zombiew.cl2", directHandle = 0x0}, {archive = 0x55555c8d7460 <devilution::diabdat_mpq>, fileNumber = 1422,
filename = "monsters\\zombie\\zombiea.cl2", directHandle = 0x0}, {archive = 0x55555c8d7460 <devilution::diabdat_mpq>, fileNumber = 1423,
filename = "monsters\\zombie\\zombieh.cl2", directHandle = 0x0}, {archive = 0x55555c8d7460 <devilution::diabdat_mpq>, fileNumber = 1424,
filename = "monsters\\zombie\\zombied.cl2", directHandle = 0x0}}
```
The pretty-printer implements the full array printer protocol, so it
even works in IDEs.
For VS Code and CMake, add the following to your `.vscode/settings.json`:
```
"cmake.debugConfig": {
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Load StaticVector pretty-printer"
"text": "source ${workspaceFolder}/tools/gdb/pretty_printers/utils/static_vector_pp.py",
"ignoreFailures": false
}
]
}
```
2 years ago
Gleb Mazovetskiy
bb6787ccf7
Rename `MissileData` fields to match the TSV
2 years ago
Gleb Mazovetskiy
0f13d95628
Fix Missile Hit Sound
...
Follow-up to #7312
Refs #7331
2 years ago
Gleb Mazovetskiy
d3e30d1ce9
StaticVector: Add more container methods
...
This is enough to make it usable as a backing storage for a
`priority_queue`. Had it in one of my branches and figured it might come
in handy in the future.
2 years ago
Eric Robinson
cec258fd4d
Clean up StartRangeAttack() ( #7207 )
2 years ago
Eric Robinson
d54e96ed90
Optimize RespawnDeadItem() ( #7212 )
2 years ago
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
356d3aaad4
CPU profiling with gperf
...
Documentation and scripts for profiling with gperf
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
c5788e5b08
Add a CLX rendering benchmark
...
```
----------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
----------------------------------------------------------------------------
BM_RenderSmallClx 868 ns 866 ns 802315 bytes_per_second=2.04538Gi/s items_per_second=6.92446M/s
BM_RenderLargeClx 128208 ns 128032 ns 5434 bytes_per_second=716.703Mi/s items_per_second=7.81057k/s
```
2 years ago
Gleb Mazovetskiy
5917d0945e
Delete tools/cpp_format_struct_table.py
...
All of the tables are now in TSV!
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
4aa9d37f0f
Add google-benchmark
2 years ago
Gleb Mazovetskiy
e5c628db78
Add a test for Crawl order
2 years ago
Gleb Mazovetskiy
df3d76c3c1
Add utils/string_view_hash.hpp
2 years ago
Gleb Mazovetskiy
89b854491f
uwp-project/devilutionx.vcxproj: Add 3rdParty/unordered_dense
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
80ee326911
Remove unused sounds
...
Done with the following script:
```ruby
tsv = File.read('assets/txtdata/sound/effects.tsv')
all = tsv.lines[1...].map {|l| l.split("\t")[0]}
used = Dir['Source/**/*.{cpp,c,h,hpp}'].flat_map do |path|
File.read(path).scan(/SfxID::[A-Za-z0-9]+/).map {|s| s.split('::')[1]}
end
used.concat(%w[
Warrior69b
Sorceror69b
Rogue69b
Monk69b
Swing2
SpellAcid1
OperateShrine1
Warrior14b
Warrior14c
Warrior15b
Warrior15c
Warrior16b
Warrior16c
Warrior2b
Warrior2c
Rogue14b
Rogue14c
Sorceror14b
Sorceror14c
Monk14b
Monk14c
])
used.sort!
used.uniq!
unused = all - used
unused.sort!
File.open('assets/txtdata/sound/effects.tsv', 'w') do |f|
f.write(tsv.lines[0])
tsv.lines[1...].each do |line|
fields = line.split("\t")
if unused.include?(fields[0])
puts fields[2].tr('\\', '/')
else
f.write(line)
end
end
end
```
2 years ago
Gleb Mazovetskiy
7bfc8e91bd
Update devilutionx.pot
...
Using tools/update_translations_pot.py
2 years ago
Gleb Mazovetskiy
b57fac6419
Add tools/update_translations_pot.py
...
Updates Translations/devilutionx.pot using xgettext
2 years ago
Gleb Mazovetskiy
8633be3578
Fix "Book of" translations
2 years ago
Gleb Mazovetskiy
067d83afac
Remove "Book of " from `translation_dummy.cpp`
2 years ago
Gleb Mazovetskiy
497e6dfe40
Add a dot to lowercase "i" in Turkish (all sizes)
...
https://github.com/diasurgical/devilutionX/pull/7189 added the dot to size 12,
this PR does so for the rest of the font sizes.
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
DakkJaniels
8910ea468c
Remove link to circleci latest builds
...
replaced link to circleci with link to readme section for test builds
2 years ago