From b694a83655d97bb93318c4523a40c1915f3c05ee Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Mon, 1 May 2023 09:12:20 +0200 Subject: work --- src/map.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map.c') diff --git a/src/map.c b/src/map.c index 441cc81..499bf60 100644 --- a/src/map.c +++ b/src/map.c @@ -94,6 +94,9 @@ static int get_height_of_tile_tr(int current_height, int x, int y) { } void load_mapdata_into_world() { + loaded_map.width = map_to_load.width; + loaded_map.height = map_to_load.height; + // Load heightmap for (int y = 0; y < MAP_SIZE_Y; y++) { for (int x = MAP_SIZE_X-1; x >= 0; x--) { @@ -111,8 +114,8 @@ void load_mapdata_into_world() { } void create_empty_map() { - loaded_map.width = MAP_SIZE_X; - loaded_map.height = MAP_SIZE_Y; + map_to_load.width = MAP_SIZE_X; + map_to_load.height = MAP_SIZE_Y; memset(map_to_load.tiles, TILE_COBBLESTONE1, sizeof(map_to_load.tiles)); memset(map_to_load.heightmap, 0, sizeof(loaded_map.heightmap)); -- cgit v1.2.3-70-g09d2