Gleb Mazovetskiy
ee8ca1c005
Greatly simplify outline rendering
...
The new algorithm is a lot less code, slightly faster, and results
in a smaller binary (-40 KiB on rg99).
The previous algorithm filled all the pixels around every solid pixel.
The new algorithm only fills pixels that will be visible.
We first collect the outline pixels into an array (which may contain a
small amount of duplicates). Then, we render the entire array in a
single loop. This turns out to be slightly faster than rendering inline,
at the cost of ~4 KiB of stack (basically free).
To collect the pixels, we go through the CLX sprite, keeping track
of the solid runs in the current row, and the filled pixels on the line
above and the line below.
To be able to quickly test the pixels above and below, we introduce a
new data structure, `StaticBitVector`. It is similar to a bitset,
except the size is determined at runtime (capacity is fixed),
and it supports quick updates of entire subspans.
2 years ago
Gleb Mazovetskiy
2c8b0cb0c3
blit_impl.hpp: Fix incorrect assumption
...
Turns out we can have fills of length 1
2 years ago
Gleb Mazovetskiy
5ff588d402
Fix some compilation warnings
2 years ago
Gleb Mazovetskiy
aa0476b0cc
Use -O2 for render code even in release mode
...
-O3 tries to vectorize blit loops too aggressively,
but our blit calls mostly loop only a few times.
`measure_timedemo_performance` on my machine:
* O1: 6.606 ± 0.060 seconds, 1109.520 ± 9.843 FPS
* O2: 6.484 ± 0.063 seconds, 1130.220 ± 10.909 FPS
* O3: 6.746 ± 0.017 seconds, 1086.260 ± 2.170 FPS
2 years ago
Gleb Mazovetskiy
07597078cc
blit_impl: Add length assumptions
...
We know that length is never 0.
Letting the compiler know that allows it to optimize one instruction
away.
Moreover, for Fill runs, we also know that the length is at least 2.
2 years ago
staphen
78eb3c7fe9
Parse TCP host using hostname:port format
2 years ago
Gleb Mazovetskiy
bae4030d7b
Simplify CLX rendering
...
Inlines blit command parsing.
We previously had blit commands because we supported rendering multiple
formats (CEL, CL2, CLX) but now we only ever render CLX, so this is
no longer necessary.
2 years ago
Gleb Mazovetskiy
ee76c860b7
blit_impl: Use <algorithm> with unseq policy
2 years ago
Trihedraf
bf0e8f7797
Update mingw scripts to latest dependency releases
2 years ago
staphen
7a12080f7e
Update vcpkg baseline to get libsodium 1.0.20
2 years ago
dependabot[bot]
36438a47dc
Bump jidicula/clang-format-action from 4.12.0 to 4.13.0
...
Bumps [jidicula/clang-format-action](https://github.com/jidicula/clang-format-action ) from 4.12.0 to 4.13.0.
- [Release notes](https://github.com/jidicula/clang-format-action/releases )
- [Commits](https://github.com/jidicula/clang-format-action/compare/v4.12.0...v4.13.0 )
---
updated-dependencies:
- dependency-name: jidicula/clang-format-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Trihedraf
1e0a0a917e
update miyoomini build to latest port requirements
2 years ago
dependabot[bot]
3f49fadb64
Bump jidicula/clang-format-action from 4.11.0 to 4.12.0
...
Bumps [jidicula/clang-format-action](https://github.com/jidicula/clang-format-action ) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/jidicula/clang-format-action/releases )
- [Commits](https://github.com/jidicula/clang-format-action/compare/v4.11.0...v4.12.0 )
---
updated-dependencies:
- dependency-name: jidicula/clang-format-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Eric Robinson
557fd2a4a3
Fix illegal spell levels ( #7112 )
2 years ago
staphen
22150018ae
Don't dereference nullopt in DebugCmdLevelUp()
2 years ago
Gleb Mazovetskiy
15791ee6ad
Demomode: Set scancode for keyboard events
...
We were previously not setting it all which was incorrect but did not
cause any issues because we had not used it. We do check scancode for
the debug console key. This caused a sanitizer warning when running the
demo in debug mode.
2 years ago
staphen
af07b71127
Fix crash loading game with Search missile
2 years ago
staphen
ce60a17fd5
Fix OOB when debugging megatile data near the edge of the dungeon
2 years ago
staphen
d5a38618f4
Revert CI runners for MacOS/iOS to macos-11
2 years ago
Oleksandr Kalko
1b29ade394
General Android upgrades
...
* SDL2 to 2.30.2 bugfix
* Gradle to 8.7
* Android Gradle plugin to 8.3.2
Playtested to my Google Pixel 2, Android 11
2 years ago
staphen
2ddcc7118a
Hiddens are no longer omniscient
2 years ago
staphen
eb5e32aee5
Fix level conversion when migrating saves between Diablo and Hellfire
2 years ago
Eric Robinson
692365fe8c
Clean up: MakeLightTable() ( #7089 )
2 years ago
matheusgomes28
7848ab731e
Splitting CheckInvPaste() into smaller functions ( #6984 )
2 years ago
Eric Robinson
a4d8aea921
Clean up: AddShrine() [Second attempt] ( #7094 )
2 years ago
Eric Robinson
9f6055a4a1
Clean up CalcPlrItemVals() ( #4052 )
2 years ago
Anders Jenbo
d36347f162
Record new timedemo with updated south walk behaviour
2 years ago
Eric Robinson
0ac30d101d
Refactor TileHasAny() ( #7085 )
2 years ago
Eric Robinson
368fa7f7e8
Clean up: DrawDungeon() ( #7090 )
2 years ago
Eric Robinson
5ee75b1fc7
Fix Hammer of Jholm ( #7069 )
2 years ago
KPhoenix
fc6f9edad3
Update pack_test.cpp
2 years ago
Tully-B
59ae17dff5
Patch up wrong tree tile near Hive entrance ( #7061 )
2 years ago
Eric Robinson
ed0b3fde14
Bugfix: Invisible monsters/towners in solid tiles in vision range ( #7084 )
2 years ago
djvs
a6e2481a3e
Option to not pause the game when the window loses focus ( #7046 )
2 years ago
KPhoenix
2f9c75e911
Clean up: ProjectileTrapDamage()
...
Removed unused function parameter
2 years ago
KPhoenix
459aa0d20c
Clean up: DrawView()
2 years ago
KPhoenix
b00bf4e5d3
Clean up: DrawMain()
...
Remove unused function parameter
2 years ago
KPhoenix
3505ec1e18
Clean up: DrawFPS()
...
Change `lastFpsUpdateInMs` to `uint32_t` to harmonize the logic in `DrawFPS()` with `SDL_GetTicks()`. Fixes compiler warnings.
2 years ago
dependabot[bot]
bc9298f3a3
Bump microsoft/setup-msbuild from 1.3 to 2
...
Bumps [microsoft/setup-msbuild](https://github.com/microsoft/setup-msbuild ) from 1.3 to 2.
- [Release notes](https://github.com/microsoft/setup-msbuild/releases )
- [Changelog](https://github.com/microsoft/setup-msbuild/blob/main/building-release.md )
- [Commits](https://github.com/microsoft/setup-msbuild/compare/v1.3...v2 )
---
updated-dependencies:
- dependency-name: microsoft/setup-msbuild
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2 years ago
Eric Robinson
f67fbfeaca
Conditionally set cursor graphic for unique items ( #7067 )
2 years ago
KPhoenix
36aca86bd8
fix stormshield
2 years ago
hiperiondev
941f4c85df
Correct some translations. Add one missing translation
2 years ago
KPhoenix
66ec4de7e4
Fix outdated item values
2 years ago
Eric Robinson
1dd6b317a2
Fix typo in playerdat ( #7072 )
2 years ago
KPhoenix
889d07b355
Clean up store inferface
2 years ago
KPhoenix
04828c08a7
Fix rendering monsters in solid tiles
2 years ago
KPhoenix
039a6c91bc
Remove obsolete values from unique item data
2 years ago
Eric Robinson
ebe353f105
Revise how unique cursor graphic is obtained ( #7066 )
2 years ago
Tully
ba529feb3e
Fix infravision monsters flickering when manipulating inventory ( #6687 )
2 years ago
Tully-B
8fa95a1740
Add Hungarian translation ( #7062 )
2 years ago