From d055cf69c8925e895cfcb726a4339f843f3ccfc1 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Tue, 27 Dec 2022 09:05:33 +0100 Subject: work --- include/map.h | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'include/map.h') diff --git a/include/map.h b/include/map.h index 8f153f8..6109c5a 100644 --- a/include/map.h +++ b/include/map.h @@ -23,7 +23,7 @@ typedef struct t_tile { } tile; #define MAP_SIZE_X 40 -#define MAP_SIZE_Y 20 +#define MAP_SIZE_Y 40 tile map_loaded[MAP_SIZE_Y][MAP_SIZE_X]; @@ -34,6 +34,21 @@ typedef struct t_map_info { float px_incline; } map_info; +typedef struct t_map_data { + int width; + int height; + int heightmap[MAP_SIZE_Y][MAP_SIZE_X]; +} map_data; + +typedef struct t_extracted_map_data { + int width; + int height; + tile heightmap[MAP_SIZE_Y][MAP_SIZE_X]; +} extracted_map_data; + +map_data map_to_load = {0}; +extracted_map_data loaded_map = {0}; + // data data that is stored on disk int map[MAP_SIZE_Y][MAP_SIZE_X] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, @@ -55,6 +70,26 @@ int map[MAP_SIZE_Y][MAP_SIZE_X] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, + {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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