Commit Graph
24 Commits
Author SHA1 Message Date
ikonomov d05992da75 Remove "Zen" hit recovery (#5724)
The description of Harmony says "Fastest", clearly implying that this is the fastest recovery bonus that is attainable for a given character and also an indication that the bonus is not cumulative with other items.
2023-01-30 19:15:47 +01:00
obligaron eca1a68bec AnimationInfo: Use fixed point math for fractions 2022-11-06 12:31:40 +00:00
k-bar 26de74f4a2 AnimationInfo class correct style (#4870)
* AnimationInfo class correct case-style for private members

clang-tidy warnings:
readability-identifier-naming    invalid case style for private member

* AnimationInfo class correct case-style for members

clang-tidy warnings:
readability-identifier-naming    invalid case style for member

* AnimationInfo class correct case-style for methods

clang-tidy warnings:
readability-identifier-naming    invalid case style for method

* AnimationInfo class use nodiscard

clang-tidy warnings:
modernize-use-nodiscard    function  should be marked [[nodiscard]]
2022-07-03 16:55:37 +02:00
Gleb Mazovetskiy 39afeaf8b1 CMake: gc-sections + no-rtti/exceptions options
Turns out gc-sections helps significantly even with LTO (-84 KiB for the
MinSizeRel rg99 build).

Also adds options for disabling RTTI and exceptions.
2022-06-21 11:19:41 +01:00
Gleb Mazovetskiy a66ca44695 Zero-based frame indexing
Index frames starting at 0 instead of 1.
2022-04-14 04:39:26 +01:00
Gleb Mazovetskiy 7fede6c4cb Clean up owned/unowned CelSprite ambiguity
Makes `CelSprite` unowned and adds a new `OwnedCelSprite` class for
owned sprites.

This clarifies ownership and makes the code cleaner in a number of
places.

Additionally, because the `CelSprite` class is now tiny (1 less
pointer), we can pass it by-value instead of by-reference, removing a
pointer indirection in the rendering functions.
2022-03-06 04:49:13 +01:00
Gleb Mazovetskiy 076b0c0c05 Overhaul tests
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.

Also:

* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
2021-12-16 20:26:51 +00:00
Gleb MazovetskiyandAnders Jenbo 7e1fea6f76 clang-format all files in {Source,test}/
Also includes a few manual tweaks to comments and newlines for better results.

Co-authored-by: Anders Jenbo <[email protected]>
2021-11-24 23:44:12 +01:00
obligaron 3a9cc631c7 Rename DelayLen -> TicksPerFrame
Rename DelayCounter -> TickCounterOfCurrentFrame
2021-06-27 01:26:49 -07:00
obligaron 3ba4bac5e2 Harmonize DelayLen for Player and Monster (was 1-based on monseter (>= DelayLen) and 0-based on player (> DelayLen). Now both are 1-based (>= DelayLen) 2021-06-27 01:26:49 -07:00
Anders Jenbo c6f6c99add Fix GCC warning 2021-06-13 05:18:08 +02:00
qndel 69b903743a fix typos 2021-05-23 05:52:52 +02:00
obligaron b94e599f5e ADL: Advance skipped Frames in SetNewAnimation and remove logic from PM_XYZ 2021-05-09 09:53:53 +02:00
Anders Jenbo c11945e62b 🎨 Fix line endings 2021-05-07 23:22:51 +02:00
obligaron 8e5996cfca run clang-format 2021-05-07 23:21:01 +02:00
obligaron cb7819a75c Introduce AnimationDistributionFlags::RepeatedAction 2021-05-06 07:52:17 +02:00
obligaron b5954eb34b Change AnimationDistributionParams to AnimationDistributionFlags 2021-05-06 07:52:17 +02:00
obligaron b08e0c20dc In repeated Animations show skipped Frames from previous Animation (repeated Attack/RangeAttack/Spell) 2021-05-06 07:52:17 +02:00
obligaron ffc3c66e68 AnimationInfoTest: Add repeated attack test 2021-05-06 07:52:17 +02:00
obligaron 406a2bd260 Use AnimationInfo directly in tests 2021-04-29 04:33:51 +02:00
obligaron ff995adc2b Move ProcessPlayerAnimation to AnimationInfo 2021-04-29 04:33:51 +02:00
obligaron 3b87433fc2 Move GetFrameToUseForPlayerRendering to AnimationInfo 2021-04-29 04:33:51 +02:00
obligaron 1de46a8495 Rename member variables 2021-04-29 04:33:51 +02:00
obligaron 0b5183f63e Introduce AnimationInfo
Update AnimationInfo.DelayLen comment
2021-04-29 04:33:51 +02:00