(svn r20625) -Add: AirportTileSpec::GetByTile to simplify accessing the AirportTileSpec

This commit is contained in:
rubidium
2010-08-26 16:53:06 +00:00
parent 3a6c4c2f85
commit f4c0e575a8
3 changed files with 12 additions and 1 deletions

View File

@@ -47,6 +47,16 @@ AirportTileOverrideManager _airporttile_mngr(NEW_AIRPORTTILE_OFFSET, NUM_AIRPORT
return &AirportTileSpec::tiles[gfx];
}
/**
* Retrieve airport tile spec for the given airport tile.
* @param tile The airport tile.
* @return A pointer to the corresponding AirportTileSpec.
*/
/* static */ const AirportTileSpec *AirportTileSpec::GetByTile(TileIndex tile)
{
return AirportTileSpec::Get(GetAirportGfx(tile));
}
/**
* This function initializes the tile array of AirportTileSpec
*/