Added timer and animations

This commit is contained in:
2022-12-27 23:54:39 +00:00
parent 2df559aa4c
commit 329e10f2d6
4 changed files with 150 additions and 1 deletions

20
source/engine/anim.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef ANIM_H
#define ANIM_H
struct keyframe {
double time;
double val;
};
struct anim {
struct keyframe *frames;
int loop;
int interp;
};
struct anim make_anim();
struct anim anim_add_keyframe(struct anim a, struct keyframe f);
double anim_val(struct anim anim, double t);
#endif