aboutsummaryrefslogtreecommitdiff
path: root/include/map.h
blob: d1587fa08a706e4955219f55bcb01d4f8a4dc2fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#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;

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);

Marker *FindMarker(Map *map, const char *name);

void UnloadMap(Map *map);