summaryrefslogtreecommitdiff
path: root/src/map.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2023-05-01 09:12:20 +0200
committerAldrik Ramaekers <aldrik@amftech.nl>2023-05-01 09:12:20 +0200
commitb694a83655d97bb93318c4523a40c1915f3c05ee (patch)
tree49c23560bdcc0837eb4726770eac4a4735b527fe /src/map.c
parent3767d1ce3e2b90d4eb667985c0997cb5293cc27e (diff)
work
Diffstat (limited to 'src/map.c')
-rw-r--r--src/map.c7
1 files changed, 5 insertions, 2 deletions
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));