Gleb Mazovetskiy
a66ca44695
Zero-based frame indexing
...
Index frames starting at 0 instead of 1.
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
2843d99485
Fix walk stuttering with Preview Frame
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
Andrew James
949206424e
Enable clang-tidy in Visual Studio projects ( #3101 )
4 years ago
ephphatha
b15e08fc3f
Deduplicate logic in GetAnimationProgress
4 years ago
obligaron
e67ea3639f
Fix AnimationInfo::GetAnimationProgress() when normal animation logic is used (for example loaded save games)
5 years ago
ephphatha
67ecea1a42
Always set the monster animation when ChangeAnimationData is called
...
Required updating AnimationInfo to handle being passed 0 for the total framecount, previously it would call clamp with min > max which was invalid.
5 years ago
ephphatha
8e155e011f
Rename helpers on Monster to match AnimationInfo
5 years ago
Anders Jenbo
d523fc1e81
Cleanups
5 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
ephphatha
3520dc4201
Update numeric literals to use appropriate suffix
...
Mainly things like .F for floats instead of doubles in float context.
5 years ago
obligaron
3a9cc631c7
Rename DelayLen -> TicksPerFrame
...
Rename DelayCounter -> TickCounterOfCurrentFrame
5 years ago
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)
5 years ago
Anders Jenbo
fa54499aeb
Clang-tidy: readability-uppercase-literal-suffix
...
Strip suffixes
5 years ago
Anders Jenbo
ec8d7bebe2
Clang-tidy: modernize-use-auto
5 years ago
obligaron
d4bda3c13e
ADL: correct comment typo
5 years ago
obligaron
801207a8ac
ADL: Handle incorrect TicksSinceSequenceStarted better
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
Anders Jenbo
af254601d6
♻️ Apply clang-tidy to engine
5 years ago
qndel
6931c438d3
fix typo ( #2150 )
5 years ago
obligaron
61ba5009ac
Convert to CelSprite
5 years ago
qndel
69b903743a
fix typos
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
obligaron
b94e599f5e
ADL: Advance skipped Frames in SetNewAnimation and remove logic from PM_XYZ
5 years ago
Anders Jenbo
c11945e62b
🎨 Fix line endings
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
0b5183f63e
Introduce AnimationInfo
...
Update AnimationInfo.DelayLen comment
5 years ago