]> git.lizzy.rs Git - nothing.git/blob - src/game/level/platforms.h
a3c8cb57b6d43436f4010daa571c7938bc66625b
[nothing.git] / src / game / level / platforms.h
1 #ifndef PLATFORMS_H_
2 #define PLATFORMS_H_
3
4 #include <SDL.h>
5
6 #include "game/camera.h"
7 #include "math/rect.h"
8
9 typedef struct Platforms Platforms;
10 typedef struct RectLayer RectLayer;
11
12 Platforms *create_platforms_from_rect_layer(const RectLayer *layer);
13 void destroy_platforms(Platforms *platforms);
14
15 int platforms_render(const Platforms *platforms,
16                      const Camera *camera);
17
18 void platforms_touches_rect_sides(const Platforms *platforms,
19                                   Rect object,
20                                   int sides[RECT_SIDE_N]);
21 Vec2f platforms_snap_rect(const Platforms *platforms,
22                           Rect *object);
23
24 #endif  // PLATFORMS_H_