diff options
author | BoredGuy <osome3717@gmail.com> | 2024-12-23 12:32:54 +0300 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2024-12-23 12:32:54 +0300 |
commit | 61252071880c625b367623191cc86b3a98b8d562 (patch) | |
tree | 4718d62c7b13e4f7482a6ee7cdb33cec3e5d69b4 /Week1-Pacman/src/map.h | |
parent | ac7ba6dc94f6eb2d8cf9092391714247bb947148 (diff) |
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
Diffstat (limited to 'Week1-Pacman/src/map.h')
-rw-r--r-- | Week1-Pacman/src/map.h | 20 |
1 files changed, 20 insertions, 0 deletions
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_ |