1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Replace hard coded max map size

This commit is contained in:
Michael Steenbeek
2018-02-22 10:22:47 +01:00
parent f0805c3f59
commit c86dfe5f1b
4 changed files with 8 additions and 8 deletions

View File

@@ -65,8 +65,8 @@ static void cheat_set_grass_length(sint32 length)
sint32 x, y;
rct_tile_element *tileElement;
for (y = 0; y < 256; y++) {
for (x = 0; x < 256; x++) {
for (y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) {
for (x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) {
tileElement = map_get_surface_element_at(x, y);
if (!(tileElement->properties.surface.ownership & OWNERSHIP_OWNED))
continue;

View File

@@ -1258,9 +1258,9 @@ void game_fix_save_vars()
// Fixes broken saves where a surface element could be null
// and broken saves with incorrect invisible map border tiles
for (sint32 y = 0; y < 256; y++)
for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++)
{
for (sint32 x = 0; x < 256; x++)
for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++)
{
rct_tile_element * tileElement = map_get_surface_element_at(x, y);

View File

@@ -102,8 +102,8 @@ void track_design_save_select_nearby_scenery(sint32 rideIndex)
{
rct_tile_element *tileElement;
for (sint32 y = 0; y < 256; y++) {
for (sint32 x = 0; x < 256; x++) {
for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) {
for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) {
tileElement = map_get_first_element_at(x, y);
do {
if (track_design_save_should_select_scenery_around(rideIndex, tileElement)) {

View File

@@ -683,8 +683,8 @@ void scenario_fix_ghosts(rct_s6_data *s6)
// Remove all ghost elements
rct_tile_element *destinationElement = s6->tile_elements;
for (sint32 y = 0; y < 256; y++) {
for (sint32 x = 0; x < 256; x++) {
for (sint32 y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++) {
for (sint32 x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++) {
rct_tile_element *originalElement = map_get_first_element_at(x, y);
do {
if (originalElement->flags & TILE_ELEMENT_FLAG_GHOST) {