aboutsummaryrefslogtreecommitdiff
path: root/include/map.h
diff options
context:
space:
mode:
authorLeander Scherer <leander@schererleander.de>2026-03-11 23:16:32 +0100
committerLeander Scherer <leander@schererleander.de>2026-03-11 23:16:32 +0100
commit9fb384552cb0a036a5978dfc40cddbbe2d29727c (patch)
tree4814b228a5b94fee3d300221531d466bf5c0990d /include/map.h
parente32c1eeed3427832b40d1e9f43a17dbec8cb56ae (diff)
refactor(map): replace MapManager with typed Map and object-layer loading
Diffstat (limited to 'include/map.h')
-rw-r--r--include/map.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/map.h b/include/map.h
new file mode 100644
index 0000000..6106dc1
--- /dev/null
+++ b/include/map.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "raylib.h"
+#include "raytmx.h"
+
+typedef struct {
+ TmxMap *map;
+ TmxLayer *wallLayer;
+ TmxLayer *groundLayer;
+ TmxLayer *decorLayer;
+} Map;
+
+typedef struct Entities Entities;
+
+Map *LoadMap(const char *filename, Entities *entities);
+
+bool isCollision(Map *map, Rectangle bounds);
+
+void DrawMap(Map *map);
+void DrawPickups(Entities *entities, Map *map);
+void DrawKeys(Entities *entities, Map *map);
+
+void UnloadMap(Map *map);