qndel
efaf334965
typos and code cleanup
3 years ago
obligaron
5b11dfa2ed
Fix preview frame shown fragment overflow
3 years ago
obligaron
eca1a68bec
AnimationInfo: Use fixed point math for fractions
3 years ago
Gleb Mazovetskiy
b5d3f3561b
AnimationInfo: Reorder to save 8 bytes (32->24)
...
```
pahole --reorganize --show_reorg_steps --show_only_data_members -C AnimationInfo build/test/liblibdevilutionx_so.so
```
3 years ago
obligaron
925e13d22a
Introduce AnimationInfo::isLastFrame and use it instead of _pXYZFrames
4 years ago
Gleb Mazovetskiy
961866e1c4
CLX: A new graphics format
...
The format is almost identical to CL2, except it uses the frame header
to store frame width and height instead of 5 32-line offsets.
This means we always have access to frame dimensions, so we can use it
as an on-disk format for our graphics as well.
Additionally, we may be able to optimize the rendering even more
in the future now that we have guaranteed knowledge of frame dimensions.
4 years ago
Cesar Canassa
e538acb248
📝 Fixes Doxygen warnings ( #4904 )
4 years ago
obligaron
3c571bf64b
Avoid overflow of tickCounterOfCurrentFrame ( #4893 )
...
* When MFLAG_ALLOW_SPECIAL is set, don't call processAnimation (avoid overflow of tickCounterOfCurrentFrame)
4 years ago
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]]
4 years ago
Gleb Mazovetskiy
21dc7f553d
Add OptionalCelSprite: smaller than std::optional
...
`CelSprite` data pointer can never be `nullptr`.
We implement a smaller `optional` for it by taking advantage of that.
4 years ago
obligaron
e87aca38bb
Change animation frames and tick per frame to int8_t
4 years ago
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.
4 years ago
obligaron
75760382ef
Regard preview frame in AnimationInfo
4 years ago
obligaron
a7f361de41
AnimationInfo: Change TicksSinceSequenceStarted and relevantAnimationTicksWithSkipping to float
4 years ago
Gleb Mazovetskiy
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 <anders@jenbo.dk>
4 years ago
obligaron
551645060b
Fix item swapping and AnimationInfo::ChangeAnimationData
5 years ago
obligaron
54d63e2edd
Change AnimationInfo.pCelSprite to const
5 years ago
Anders Jenbo
2ca6e37c46
Clean up sub folders using clang-tidy/Android Studio
5 years ago
obligaron
3a9cc631c7
Rename DelayLen -> TicksPerFrame
...
Rename DelayCounter -> TickCounterOfCurrentFrame
5 years ago
obligaron
d4bda3c13e
ADL: correct comment typo
5 years ago
obligaron
fb23521288
Introduce AnimationInfo.IsPetrified to handle Stone Curse Spell
5 years ago
obligaron
a4cacfbcbe
Enable ADL for Monsters
5 years ago
Gleb Mazovetskiy
e40b1963f9
🚚 engine.h: Extract `CelSprite` and file loading
5 years ago
obligaron
61ba5009ac
Convert to CelSprite
5 years ago
obligaron
a295586636
Support changing animation data on-the-fly even if the number of frames differ
5 years ago
obligaron
19615c6976
AnimationInfo: Add GetAnimationProgress()
5 years ago
Anders Jenbo
c11945e62b
🎨 Fix line endings
5 years ago
obligaron
e3e3d02da7
Correct Doxygen comments
5 years ago
Anders Jenbo
f579b2f287
Handle cel/cl2 files as byte arrays
5 years ago
obligaron
cb7819a75c
Introduce AnimationDistributionFlags::RepeatedAction
5 years ago
obligaron
b5954eb34b
Change AnimationDistributionParams to AnimationDistributionFlags
5 years ago
obligaron
b08e0c20dc
In repeated Animations show skipped Frames from previous Animation (repeated Attack/RangeAttack/Spell)
5 years ago
obligaron
401a820998
Rename GameTick to Tick (for variables)
5 years ago
obligaron
26601c98dc
Simplify GetFrameToUseForRendering (remove local variables and use member variables)
5 years ago
obligaron
ff995adc2b
Move ProcessPlayerAnimation to AnimationInfo
5 years ago
obligaron
16b3b38908
Move NewPlrAnim logic to AnimationInfo
...
Adjust SetNewAnimation-Parameter Names to Class Member
Adjust NewPlrAnim-Parameter Names to SetNewAnimation-Parameter Names
5 years ago
obligaron
3b87433fc2
Move GetFrameToUseForPlayerRendering to AnimationInfo
5 years ago
obligaron
1de46a8495
Rename member variables
5 years ago
obligaron
0b5183f63e
Introduce AnimationInfo
...
Update AnimationInfo.DelayLen comment
5 years ago