// sprites.h
#pragma once

#include "lib.h"
#include "include/raylib.h"

typedef struct {
    u8 loop;
    u8 total_frames;
} SpriteAnimation;

typedef struct {
    f32 time_elapsed;
    u8 row;
    u8 total_frames;
    u8 current_frame;
    u8 loop;
} SpriteAnimationPlayback;

void PlayAnimation(int animation, SpriteAnimation *anims, SpriteAnimationPlayback *playback);
void TickSpriteAnimations(SpriteAnimationPlayback *playbacks, int len);
bool IsAnimationFinished(SpriteAnimationPlayback playback);
