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
37
38
39
40
41
42
43
|
#ifndef sprite_h
#define sprite_h
#include "asset.h"
#include "components.h"
#include "rect.h"
typedef enum {
sprite_player_bullet_left = 0,
sprite_player_bullet_right,
sprite_player_bullet_up,
sprite_player_bullet_down,
sprite_skull,
sprite_skull_damaged,
sprite_skull_debris_1,
sprite_skull_debris_2,
sprite_skull_debris_3,
sprite_skull_debris_4,
sprite_skull_debris_5,
sprite_enemy_bullet,
sprite_author,
sprite_free,
sprite_floor_tile_1,
sprite_floor_tile_2,
sprite_floor_tile_3,
sprite_floor_tile_4,
sprite_bricks,
sprite_heart_empty,
sprite_heart_full,
sprite_ram_empty,
sprite_ram_full,
sprite_logo
} Sprite_ID;
typedef struct {
Asset_ID bitmap;
Rectangle rect;
} Sprite;
void init_csprite(CSprite* sprite, Sprite_ID id);
const Sprite* get_sprite(Sprite_ID id);
#endif
|