Codechange: migrate size related functions to Map structure

This commit is contained in:
Rubidium
2023-01-21 10:43:03 +01:00
committed by rubidium42
parent d481f78b24
commit fe2bcd2a58
56 changed files with 334 additions and 343 deletions

View File

@@ -38,7 +38,7 @@ void RebuildTownCaches()
town->cache.num_houses = 0;
}
for (TileIndex t = 0; t < MapSize(); t++) {
for (TileIndex t = 0; t < Map::Size(); t++) {
if (!IsTileType(t, MP_HOUSE)) continue;
HouseID house_id = GetHouseType(t);
@@ -66,7 +66,7 @@ void RebuildTownCaches()
*/
void UpdateHousesAndTowns()
{
for (TileIndex t = 0; t < MapSize(); t++) {
for (TileIndex t = 0; t < Map::Size(); t++) {
if (!IsTileType(t, MP_HOUSE)) continue;
HouseID house_id = GetCleanHouseType(t);
@@ -79,7 +79,7 @@ void UpdateHousesAndTowns()
}
/* Check for cases when a NewGRF has set a wrong house substitute type. */
for (TileIndex t = 0; t < MapSize(); t++) {
for (TileIndex t = 0; t < Map::Size(); t++) {
if (!IsTileType(t, MP_HOUSE)) continue;
HouseID house_type = GetCleanHouseType(t);