]> git.lizzy.rs Git - nothing.git/blob - src/game/level/level_editor/proto_rect.h
Merge pull request #1 from tsoding/master
[nothing.git] / src / game / level / level_editor / proto_rect.h
1 #ifndef PROTO_RECT_H_
2 #define PROTO_RECT_H_
3
4 typedef struct Layer Layer;
5
6 typedef struct {
7     bool active;
8     Sint32 x, y;
9     Vec begin, end;
10
11     Color *color_current;
12     Layer **layer_current;
13 } ProtoRect;
14
15 int proto_rect_render(const ProtoRect *proto_rect,
16                       Camera *camera);
17 int proto_rect_update(ProtoRect *proto_rect,
18                       float delta_time);
19 int proto_rect_event(ProtoRect *proto_rect,
20                      const SDL_Event *event,
21                      const Camera *camera);
22 int proto_rect_mouse_button(ProtoRect *proto_rect,
23                             const SDL_MouseButtonEvent *event,
24                             const Camera *camera);
25 int proto_rect_mouse_motion(ProtoRect *proto_rect,
26                             const SDL_MouseMotionEvent *event,
27                             const Camera *camera);
28
29 #endif  // PROTO_RECT_H_