1
0
Fork 0

Codechange: Be consistent with how we name common parameters

TileIndex is always tile and Town is always *t. Don't use t and *town.
pull/11513/head
Tyler Trahan 2023-10-22 18:58:10 -04:00
parent 1b14eca9d9
commit 745945c4d3
1 changed files with 14 additions and 14 deletions

View File

@ -2346,26 +2346,26 @@ static inline void ClearMakeHouseTile(TileIndex tile, Town *t, byte counter, byt
/** /**
* Write house information into the map. For houses > 1 tile, all tiles are marked. * Write house information into the map. For multi-tile houses, all tiles are marked.
* @param t tile index
* @param town The town related to this house * @param town The town related to this house
* @param counter of construction step * @param t The tile to build on. If a multi-tile house, this is the northern-most tile.
* @param stage of construction (used for drawing) * @param counter The counter of the construction stage.
* @param type of house. Index into house specs array * @param stage The current construction stage.
* @param random_bits required for newgrf houses * @param The type of house.
* @pre house can be built here * @param random_bits Random bits for newgrf houses to use.
* @pre The house can be built here.
*/ */
static void MakeTownHouse(TileIndex t, Town *town, byte counter, byte stage, HouseID type, byte random_bits) static void MakeTownHouse(TileIndex tile, Town *t, byte counter, byte stage, HouseID type, byte random_bits)
{ {
BuildingFlags size = HouseSpec::Get(type)->building_flags; BuildingFlags size = HouseSpec::Get(type)->building_flags;
ClearMakeHouseTile(t, town, counter, stage, type, random_bits); ClearMakeHouseTile(tile, t, counter, stage, type, random_bits);
if (size & BUILDING_2_TILES_Y) ClearMakeHouseTile(t + TileDiffXY(0, 1), town, counter, stage, ++type, random_bits); if (size & BUILDING_2_TILES_Y) ClearMakeHouseTile(tile + TileDiffXY(0, 1), t, counter, stage, ++type, random_bits);
if (size & BUILDING_2_TILES_X) ClearMakeHouseTile(t + TileDiffXY(1, 0), town, counter, stage, ++type, random_bits); if (size & BUILDING_2_TILES_X) ClearMakeHouseTile(tile + TileDiffXY(1, 0), t, counter, stage, ++type, random_bits);
if (size & BUILDING_HAS_4_TILES) ClearMakeHouseTile(t + TileDiffXY(1, 1), town, counter, stage, ++type, random_bits); if (size & BUILDING_HAS_4_TILES) ClearMakeHouseTile(tile + TileDiffXY(1, 1), t, counter, stage, ++type, random_bits);
ForAllStationsAroundTiles(TileArea(t, (size & BUILDING_2_TILES_X) ? 2 : 1, (size & BUILDING_2_TILES_Y) ? 2 : 1), [town](Station *st, TileIndex) { ForAllStationsAroundTiles(TileArea(tile, (size & BUILDING_2_TILES_X) ? 2 : 1, (size & BUILDING_2_TILES_Y) ? 2 : 1), [t](Station *st, TileIndex) {
town->stations_near.insert(st); t->stations_near.insert(st);
return true; return true;
}); });
} }