blob: 20103019d3a86128b72cc28a5f376dfbd37b4535 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include "animation.h"
#include "rect.h"
int update_anim(const Animation* a, int* f, Rect* r) {
int done = 0;
f[0]++;
if (f[0] >= a->fc * a->s) {
f[0] = 0;
done = 1;
}
*r = ((const Rect*)&a[1])[f[0] / a->s];
return done;
}
|