]> git.lizzy.rs Git - nothing.git/blob - src/game/level/platforms.h
35e84feac65534365bccbd991561a1f9f571df07
[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_update(Platforms *platforms, float dt);
19
20 void platforms_touches_rect_sides(const Platforms *platforms,
21                                   Rect object,
22                                   int sides[RECT_SIDE_N]);
23 Vec2f platforms_snap_rect(const Platforms *platforms,
24                           Rect *object);
25
26 void platforms_hide_platform_at(const Platforms *platforms,
27                                 Vec2f position);
28
29 #endif  // PLATFORMS_H_