diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-27 09:05:33 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-27 09:05:33 +0100 |
| commit | d055cf69c8925e895cfcb726a4339f843f3ccfc1 (patch) | |
| tree | 895f6f7d22272810f7d350f1b5f9b5b2c7dddd30 /include/map.h | |
| parent | 88fb94168c87dd8cc07e16cb988e0ea5c25bc202 (diff) | |
work
Diffstat (limited to 'include/map.h')
| -rw-r--r-- | include/map.h | 37 |
1 files changed, 36 insertions, 1 deletions
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,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