From 61252071880c625b367623191cc86b3a98b8d562 Mon Sep 17 00:00:00 2001 From: BoredGuy Date: Mon, 23 Dec 2024 12:32:54 +0300 Subject: Work started on adding a level system - Levels load from tiled CSV export - Levels also draw We need to add collisions with the level and adjust the level's width and height to fit well in a 4:3 window --- Week1-Pacman/src/map.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Week1-Pacman/src/map.h (limited to 'Week1-Pacman/src/map.h') diff --git a/Week1-Pacman/src/map.h b/Week1-Pacman/src/map.h new file mode 100644 index 0000000..2161806 --- /dev/null +++ b/Week1-Pacman/src/map.h @@ -0,0 +1,20 @@ +#ifndef MAP_H_ +#define MAP_H_ + +#include "demo.h" + +struct map { + int* contents; + + int width; + int height; +}; + +/* + * Load map exported as CSV file from tiled. +*/ +void load_map(const char* filename, struct map* map); +void draw_map(struct demo* demo, struct map* map); +void map_init(struct demo* demo); + +#endif // MAP_H_ -- cgit v1.2.3