#include "animation.h" #include "rect.h" void update_anim(const Animation* a, int* f, Rect* r) { f[0]++; if (f[0] >= a->fc * a->s) f[0] = 0; *r = ((const Rect*)&a[1])[f[0] / a->s]; }