-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimation.h
36 lines (26 loc) · 846 Bytes
/
animation.h
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
28
29
30
31
32
33
34
35
36
#ifndef ANIMATION_H
#define ANIMATION_H
#include <stdio.h>
#include <stdlib.h>
#include <allegro5/allegro5.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_image.h>
#include <dirent.h>
#include "utils.h"
// every possible animation
enum animation
{
idle, walk_forward, walk_backwards, dash, backdash, crouching,
crLP, crMK, dash_punch, overhead, block_high,block_low,fall, high_hitstun,
low_hitstun, geneijin
};
#define ANIMATIONS_N 16
#define INTERVAL 3 // interval of frames in which a sprite is used
int sprites_on_each_animation[ANIMATIONS_N];
int frames_on_each_animation[ANIMATIONS_N];
char* animation_enum_to_folder(enum animation a);
ALLEGRO_BITMAP*** load_sprites();
void destroy_sprites(ALLEGRO_BITMAP*** animations);
void animation_setup();
int sprite_for_frame(enum animation, int frame);
#endif