1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Support floating-point animation frame numbers

This commit is contained in:
Lars Mueller 2024-09-02 21:11:08 +02:00 committed by Lars Müller
parent 323fc0a798
commit 06907aa99b
22 changed files with 111 additions and 105 deletions

View file

@ -113,14 +113,14 @@ public:
inline void setModified(const bool x) { m_dirty = x; }
void setLocalAnimations(v2s32 frames[4], float frame_speed)
void setLocalAnimations(v2f frames[4], float frame_speed)
{
for (int i = 0; i < 4; i++)
local_animations[i] = frames[i];
local_animation_speed = frame_speed;
}
void getLocalAnimations(v2s32 *frames, float *frame_speed)
void getLocalAnimations(v2f *frames, float *frame_speed)
{
for (int i = 0; i < 4; i++)
frames[i] = local_animations[i];