blob: 8ec918fba4291f7a5f1f92ff6db96fe844d1c214 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "gameCommon.h"
#define ANIMATION_DEFAULT_DELAY 0.1
#ifndef ANIMATION_H
#define ANIMATION_H
typedef struct Animation {
// Frame stuff.
int frameCount;
int currentFrame;
// The animation is stored in a image and the texture is used for fast rendering.
Image image;
Texture texture;
// Timing the frames.
double delay;
double lastTime;
} Animation;
Animation loadAnimationFromFile(const char* fileName);
void freeAnimation(Animation* animation);
#endif
|