Moved logic from window to map, inside loops that already existed.

This commit is contained in:
Hielke Morsink 2016-04-04 12:54:02 +02:00 committed by Gymnasiast
parent 15727b68a9
commit 1dbd313fb4
2 changed files with 4 additions and 7 deletions

View File

@ -1349,12 +1349,6 @@ static void map_window_increase_map_size()
map_extend_boundary_surface();
window_map_init_map();
window_map_center_on_view_point();
// Recalculate fences
for (int y = 0; y < RCT2_GLOBAL(RCT2_ADDRESS_MAP_MAX_XY, uint16); y += 32) {
for (int x = 0; x < RCT2_GLOBAL(RCT2_ADDRESS_MAP_MAX_XY, uint16); x += 32) {
update_park_fences(x, y);
}
}
gfx_invalidate_screen();
}

View File

@ -4432,6 +4432,8 @@ void map_extend_boundary_surface()
newMapElement->properties.surface.slope |= slope;
newMapElement->base_height = z;
newMapElement->clearance_height = z;
update_park_fences(x << 5, y << 5);
}
x = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) - 2;
@ -4466,8 +4468,9 @@ void map_extend_boundary_surface()
newMapElement->properties.surface.slope |= slope;
newMapElement->base_height = z;
newMapElement->clearance_height = z;
}
update_park_fences(x << 5, y << 5);
}
}
/**