Gleb Mazovetskiy
bf2e6cd262
Fix disappearing portal
...
Fixes a regression introduced in ca69237d59 .
Fixes #5609
3 years ago
obligaron
5b11dfa2ed
Fix preview frame shown fragment overflow
3 years ago
Gleb Mazovetskiy
36c4a89f3e
Clean up a few position types
3 years ago
Gleb Mazovetskiy
fab6f362c3
Point: Avoid construction in distance functions
...
This reduces the runtime of timedemo_test by 25% in debug mode.
Makes no difference to optimized mode of course.
3 years ago
Gleb Mazovetskiy
6654a26345
IsPlayerMinion: Faster check
...
Debug profile cost: 2.5% -> 1.5%
This should be as robust as the other check. If not, we have a bug
elsewhere.
3 years ago
Gleb Mazovetskiy
3910c2e56a
UpdateEnemy: Swap the M_Talker check
...
The `otherMonster.talkMsg != TEXT_NONE` check is a lot cheaper and is
almost always false.
This eliminates the M_Talker cost from the debug profile.
3 years ago
Gleb Mazovetskiy
4b5c853896
Use fold expressions for IsAny/NoneOf on C++17
...
This is much faster in debug mode than the non-C++17 version.
For example, with timedemo_test in debug mode, `M_Talker` goes from 11%
of the total time to just 3.5%.
3 years ago
Gleb Mazovetskiy
ca69237d59
Big-endian support for multiplayer
...
Not sure if this works but it's a start
3 years ago
Gleb Mazovetskiy
9b1ff3d50b
demomode.cpp: Fix creating a bogus event
...
The `eof()` does not return true until a failed read attempt.
> Note that the value returned by this function depends on the last operation performed on the stream (and not on the next).
3 years ago
Gleb Mazovetskiy
ef4a547954
msg.cpp: Log received commands debug define
3 years ago
Gleb Mazovetskiy
45757856c1
DemoMode: Add a debug define to log events
3 years ago
obligaron
4cec35ea77
Update timedemo test
3 years ago
obligaron
b3a9968c90
Timedemo: Support switching player equipment
3 years ago
obligaron
5180bd02b4
Timedemo: don't update ProgressToNextGameTick in pause menu
3 years ago
obligaron
028f630848
Timedemo: don't play and record messages in loading screens
3 years ago
obligaron
6e08ad658f
Timedemo: represent game tick progress as uint8_t
3 years ago
obligaron
79f423191c
Introduce GetItemIndexForDroppableItem
3 years ago
obligaron
75a81c6f11
Change RndVendorItem to ItemData
3 years ago
Gleb Mazovetskiy
f4b8edb5dc
Surface.pitch(): int -> uint16_t
3 years ago
Gleb Mazovetskiy
e06ca9a016
dun_render: Remove unused argument from RenderTile
...
Now that we pass the mask into `RenderTile`, we no longer need to pass
`levelPieceId`.
3 years ago
staphen
99a1230ee6
Reintroduce code to burn random number when spawning pinned books in Adria's shop
3 years ago
Gleb Mazovetskiy
9baf20d54e
Update SDL2
...
The new version fixes audio resampler quality issues and improves
support for various controllers.
3 years ago
Gleb Mazovetskiy
56f94c7471
Add a `--lang` command line argument
...
This allows forcing the locale without changing the settings.
The `forceLocale` option also lets us avoid changing the locale in settings if fonts.mpq is missing, fixing the following scenario:
1. System locale is ja
2. Launch the game -- fonts are missing
3. Close the game, download fonts.mpq
4. Launch the game again -- it is now in English because the settings have changed
3 years ago
Gleb Mazovetskiy
c7338f2f48
language.cpp: Load whole translations file if MPQ
...
Fixes very slow translation loading from MPQs.
Compressed MPQs files are very slow to seek in.
If the RWops is and MPQ, load the whole file first.
3 years ago
Gleb Mazovetskiy
aa9c0f9401
language.cpp: Minor cleanups
3 years ago
Gleb Mazovetskiy
eb45753c4d
Fix writehero_test on big-endian
...
`PlayerPack` struct should be little-endian even on big-endian systems.
3 years ago
Gleb Mazovetskiy
9a1587060d
Use real `CalculateSoundPosition` with NOSOUND
...
Fixes big-endian tests, which currently build with `-DNOSOUND`
to reduce build time.
3 years ago
Gleb Mazovetskiy
b13f413fc2
Add tools/run_big_endian_tests.sh
...
A tool to run tests on a big-endian system.
Uses an Alpine s390x Docker container.
3 years ago
Gleb Mazovetskiy
cffb2566df
Fix timedemo on SDL1
3 years ago
Gleb Mazovetskiy
09d7f99c32
Optimize IsTileSafe
...
Add dungeon flags for Fire/Lightning Wall and use them to check if the
monster considers the tile safe.
3 years ago
Gleb Mazovetskiy
5fa554c2e6
GitHub Actions: Test on a big-endian platform
...
Run tests on a big-endian platform (s390x) via qemu.
The test suite takes ~50m to run so we only trigger it manually.
3 years ago
Anders Jenbo
281d3c3fa0
Switch tests back to 20.04 to fix coverage
...
gcov appears broken in 22.04 (results have been 0% since the image was upgraded)
3 years ago
Gleb Mazovetskiy
aa2f88e5f6
Remove software cursor state for hardware cursor
...
Switching between software and hardware cursor could cause a glitch
as described in #5560 .
Fixes #5560
3 years ago
Gleb Mazovetskiy
cea6a01de7
More item packing fix on big-endian
...
Refs #5573
3 years ago
Anders Jenbo
d67dec05e1
Update timedemo test
3 years ago
Anders Jenbo
a0ee51183b
Correctly initialize the control pannel in headless mode
3 years ago
Anders Jenbo
f9c785335f
Correct default bookMessage
3 years ago
staphen
ce413ec4a6
Round to the nearest integer when computing missile coordinates
3 years ago
Gleb Mazovetskiy
44c3bc4038
pack_test: Make fixtures little-endian on BE
...
Packed items are supposed to be little-endian even on big-endian
systems. Makes all test fixtures little-endian.
Refs #5573
3 years ago
Gleb Mazovetskiy
25a2b59f89
drlg_test: fix LoadExpectedLevelData on BE
3 years ago
Gleb Mazovetskiy
529a1631de
Findsodium.cmake: Fix pkg-config checks
...
Test the correct variables for `pkg_check_modules`.
Per https://cmake.org/cmake/help/latest/module/FindPkgConfig.html
3 years ago
Gleb Mazovetskiy
652af23dd1
Findsodium.cmake: Fix line endings
3 years ago
Etienne Chanaron
15a22d0210
French typo
3 years ago
Gleb Mazovetskiy
037b7913e9
Remove `-fsigned-char`
3 years ago
Gleb Mazovetskiy
38e37e0d53
Fix warnings/errors with `-funsigned-char`
3 years ago
Gleb Mazovetskiy
1addfc9e54
dun_render: Deduplicate trapezoid upper half
3 years ago
Gleb Mazovetskiy
63a042d0e3
dun_render: Simplify non-masked primitives
...
As we recently confirmed, Square and Left/RightTriangle primitives
never use masks other than Transparent and Solid.
Simplify the code to take advantage of that.
3 years ago
Gleb Mazovetskiy
55d25fd079
dun_render: Swap32LE the data offset
3 years ago
staphen
b66b6c611b
Produce multiple controller button events for SDL_JOYHATMOTION events
3 years ago
Gleb Mazovetskiy
79b330825d
dun_render: Avoid `Invalid` tile type
...
1. Do not call `RenderTile` with invalid values to begin with.
2. Move mask selection out of `RenderTile`.
3 years ago