mirror of https://git.sr.ht/~kikoodx/crystal-tower
21 lines
432 B
C
21 lines
432 B
C
#pragma once
|
|
#include "raygint/display.h"
|
|
#include "vec.h"
|
|
|
|
struct Anim {
|
|
bopti_image_t *texture;
|
|
struct Vec pos;
|
|
struct Vec frame_dim;
|
|
int frame_duration;
|
|
int frame;
|
|
int life_ini;
|
|
int life;
|
|
int loop;
|
|
void (*callback)(struct Anim *);
|
|
};
|
|
|
|
struct Anim anim_new(bopti_image_t *, int x, int y, int frame_width,
|
|
int frame_duration, int loop);
|
|
void anim_update(struct Anim *);
|
|
void anim_draw(struct Anim *);
|