diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/map.h | 23 | ||||
| -rw-r--r-- | include/map_manager.h | 18 |
2 files changed, 23 insertions, 18 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); diff --git a/include/map_manager.h b/include/map_manager.h deleted file mode 100644 index 46ec63e..0000000 --- a/include/map_manager.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef MAP_MANAGER_H -#define MAP_MANAGER_H - -#include "raytmx.h" - -typedef struct MapManager { - TmxMap *map; - TmxLayer *wallLayer; - TmxLayer *solidLayer; - TmxLayer *pickupLayer; -} MapManager; - -MapManager LoadGameMap(const char *fileName); -void UnloadGameMap(MapManager *mgr); -bool IsWallCollision(MapManager *mgr, Rectangle rect); -void DrawMap(MapManager *mgr); - -#endif |
