1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 11:15:13 +01:00

Use gMapSize instead of MAXIMUM_MAP_SIZE_TECHNICAL in appropriate places

Backported from my map size refactors.

These functions previously scanned the whole map,
so this might also provide a slight performance boost (not tested).
This commit is contained in:
Gymnasiast
2022-09-22 00:22:45 +02:00
parent 31e2d7692c
commit f5f4a8a2f6
8 changed files with 18 additions and 19 deletions

View File

@@ -445,9 +445,9 @@ void map_count_remaining_land_rights()
gLandRemainingOwnershipSales = 0;
gLandRemainingConstructionSales = 0;
for (int32_t y = 0; y < MAXIMUM_MAP_SIZE_TECHNICAL; y++)
for (int32_t y = 0; y < gMapSize.y; y++)
{
for (int32_t x = 0; x < MAXIMUM_MAP_SIZE_TECHNICAL; x++)
for (int32_t x = 0; x < gMapSize.x; x++)
{
auto* surfaceElement = map_get_surface_element_at(TileCoordsXY{ x, y }.ToCoordsXY());
// Surface elements are sometimes hacked out to save some space for other map elements