]> git.lizzy.rs Git - nothing.git/blob - src/game/level/level_editor/layer.h
Merge pull request #1255 from tsoding/1253
[nothing.git] / src / game / level / level_editor / layer.h
1 #ifndef LAYER_H_
2 #define LAYER_H_
3
4 #include "game/camera.h"
5 #include "undo_history.h"
6
7 typedef enum {
8     LAYER_RECT,
9     LAYER_POINT,
10     LAYER_PLAYER,
11     LAYER_BACKGROUND,
12     LAYER_LABEL
13 } LayerType;
14
15 typedef struct {
16     LayerType type;
17     void *ptr;
18 } LayerPtr;
19
20 typedef struct Game Game;
21
22 int layer_render(LayerPtr layer, const Camera *camera, int active);
23 int layer_event(LayerPtr layer,
24                 const SDL_Event *event,
25                 const Camera *camera,
26                 UndoHistory *undo_history);
27 int layer_dump_stream(LayerPtr layer, FILE *stream);
28
29 #endif  // LAYER_H_