diff options
author | rubidium <rubidium@openttd.org> | 2010-08-26 16:53:06 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-26 16:53:06 +0000 |
commit | 82ef98a90a2579927df4479b63d3ad9f555d0057 (patch) | |
tree | 45fe6708a636470d8e883ca65c55aa46e41bb19e /src/newgrf_airporttiles.cpp | |
parent | 9982b5fd00620345b3d905407acf6ad21ec5c6c9 (diff) | |
download | openttd-82ef98a90a2579927df4479b63d3ad9f555d0057.tar.xz |
(svn r20625) -Add: AirportTileSpec::GetByTile to simplify accessing the AirportTileSpec
Diffstat (limited to 'src/newgrf_airporttiles.cpp')
-rw-r--r-- | src/newgrf_airporttiles.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/newgrf_airporttiles.cpp b/src/newgrf_airporttiles.cpp index 9de3f38fd..22e739eed 100644 --- a/src/newgrf_airporttiles.cpp +++ b/src/newgrf_airporttiles.cpp @@ -48,6 +48,16 @@ AirportTileOverrideManager _airporttile_mngr(NEW_AIRPORTTILE_OFFSET, NUM_AIRPORT } /** + * 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 */ void AirportTileSpec::ResetAirportTiles() |