From ae6ac413632b427e31a26020a94864669af1ba10 Mon Sep 17 00:00:00 2001 From: Leander Scherer Date: Thu, 12 Mar 2026 01:34:36 +0100 Subject: feat(marker): implement map markers --- include/map.h | 9 +++++++++ include/marker.h | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 include/marker.h (limited to 'include') diff --git a/include/map.h b/include/map.h index 6106dc1..d1587fa 100644 --- a/include/map.h +++ b/include/map.h @@ -3,11 +3,18 @@ #include "raylib.h" #include "raytmx.h" +#include "marker.h" + +#define MAX_MARKERS 25 + typedef struct { TmxMap *map; TmxLayer *wallLayer; TmxLayer *groundLayer; TmxLayer *decorLayer; + + Marker markers[MAX_MARKERS]; + int markersCount; } Map; typedef struct Entities Entities; @@ -20,4 +27,6 @@ void DrawMap(Map *map); void DrawPickups(Entities *entities, Map *map); void DrawKeys(Entities *entities, Map *map); +Marker *FindMarker(Map *map, const char *name); + void UnloadMap(Map *map); diff --git a/include/marker.h b/include/marker.h new file mode 100644 index 0000000..5a6e302 --- /dev/null +++ b/include/marker.h @@ -0,0 +1,10 @@ +#pragma once + +#include "raylib.h" + +typedef struct { + Vector2 position; + const char* name; +} Marker; + + -- cgit v1.3.1