2021-11-10 14:05:00 +01:00
|
|
|
#pragma once
|
2021-11-16 23:11:16 +01:00
|
|
|
#include "raygint/display.h"
|
2021-11-10 14:05:00 +01:00
|
|
|
#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;
|
2021-11-10 20:44:53 +01:00
|
|
|
void (*callback)(struct Anim *);
|
2021-11-10 14:05:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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 *);
|