-#include <SDL2/SDL.h>
+#include <SDL.h>
#include "system/stacktrace.h"
#include <stdio.h>
#include <stdlib.h>
#include "platforms.h"
#include "system/lt.h"
-#include "system/lt/lt_adapters.h"
#include "system/line_stream.h"
#include "system/nth_alloc.h"
#include "system/log.h"
-#include "game/level/level_editor/layer.h"
+#include "game/level/level_editor/rect_layer.h"
struct Platforms {
Lt *lt;
trace_assert(layer);
Lt *lt = create_lt();
- if (lt == NULL) {
- return NULL;
- }
Platforms *platforms = PUSH_LT(
lt,
}
platforms->lt = lt;
- platforms->rects_size = layer_count(layer);
+ platforms->rects_size = rect_layer_count(layer);
platforms->rects = PUSH_LT(lt, nth_calloc(1, sizeof(Rect) * platforms->rects_size), free);
if (platforms->rects == NULL) {
RETURN_LT(lt, NULL);
}
- memcpy(platforms->rects, layer_rects(layer), sizeof(Rect) * platforms->rects_size);
+ memcpy(platforms->rects, rect_layer_rects(layer), sizeof(Rect) * platforms->rects_size);
platforms->colors = PUSH_LT(lt, nth_calloc(1, sizeof(Color) * platforms->rects_size), free);
if (platforms->colors == NULL) {
RETURN_LT(lt, NULL);
}
- memcpy(platforms->colors, layer_colors(layer), sizeof(Color) * platforms->rects_size);
+ memcpy(platforms->colors, rect_layer_colors(layer), sizeof(Color) * platforms->rects_size);
return platforms;
}