#ifndef PLATFORMS_H_
#define PLATFORMS_H_
-#include <SDL2/SDL.h>
+#include <SDL.h>
-#include "camera.h"
+#include "game/camera.h"
#include "math/rect.h"
-typedef struct platforms_t platforms_t;
+typedef struct Platforms Platforms;
+typedef struct LineStream LineStream;
+typedef struct RectLayer RectLayer;
-platforms_t *create_platforms_from_stream(FILE *stream);
-platforms_t *create_platforms_from_file(const char *filename);
-void destroy_platforms(platforms_t *platforms);
+Platforms *create_platforms_from_rect_layer(const RectLayer *layer);
+void destroy_platforms(Platforms *platforms);
-int platforms_save_to_file(const platforms_t *platforms,
- const char *filename);
+int platforms_render(const Platforms *platforms,
+ Camera *camera);
-int platforms_render(const platforms_t *platforms,
- const camera_t *camera);
-
-void platforms_rect_object_collide(const platforms_t *platforms,
- rect_t object,
- int sides[RECT_SIDE_N]);
+void platforms_touches_rect_sides(const Platforms *platforms,
+ Rect object,
+ int sides[RECT_SIDE_N]);
+Vec platforms_snap_rect(const Platforms *platforms,
+ Rect *object);
#endif // PLATFORMS_H_