From 9fb384552cb0a036a5978dfc40cddbbe2d29727c Mon Sep 17 00:00:00 2001 From: Leander Scherer Date: Wed, 11 Mar 2026 23:16:32 +0100 Subject: refactor(map): replace MapManager with typed Map and object-layer loading --- include/map.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/map.h (limited to 'include/map.h') 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); -- cgit v1.3.1