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

This commit is contained in:
Hielke Morsink authored and Gymnasiast committed 2016-04-18 20:28:34 +02:00
1 parent 15727b68a9
commit 1dbd313fb4
2 files changed
+4 -7

No files matched your search

-6
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();
}
+4 -1
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);
}
}
/**