aboutsummaryrefslogtreecommitdiff
path: root/animation.h
blob: 1b877b48d036a256a4abd7c45368c2b3292d662e (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
26
27
#ifndef animation_h
#define animation_h

#include "config.h"
#include "rect.h"

typedef enum {
	animation_player_walk_left = 0,
	animation_player_walk_right,
	animation_player_idle_left,
	animation_player_idle_right,
	animation_enemy_bullet_explode,
	animation_player_bullet_explode,
	animation_heart_break,
	animation_spawn,
	animation_fade
} Animation_ID;

typedef struct {
	Rectangle frames[animation_max_frames];
	int frame_count;
	int slowness;
} Animation;

const Animation* get_animation(Animation_ID id);

#endif