@@ -38,13 +38,15 @@ AirportTileOverrideManager _airporttile_
* Retrieve airport tile spec for the given airport tile
* @param gfx index of airport tile
* @return A pointer to the corresponding AirportTileSpec
*/
/* static */ const AirportTileSpec *AirportTileSpec::Get(StationGfx gfx)
{
assert((size_t)gfx < lengthof(AirportTileSpec::tiles));
/* should be assert(gfx < lengthof(tiles)), but that gives compiler warnings
* since it's always true if the following holds: */
assert_compile(MAX_UVALUE(StationGfx) + 1 == lengthof(tiles));
return &AirportTileSpec::tiles[gfx];
}
/**
* This function initializes the tile array of AirportTileSpec
@@ -85,13 +87,12 @@ void AirportTileOverrideManager::SetEnti
* Do airporttile gfx ID translation for NewGRFs.
* @param gfx the type to get the override for.
* @return the gfx to actually work with.
StationGfx GetTranslatedAirportTileID(StationGfx gfx)
assert((size_t)gfx < NUM_AIRPORTTILES);
const AirportTileSpec *it = AirportTileSpec::Get(gfx);
return it->grf_prop.override == INVALID_AIRPORTTILE ? gfx : it->grf_prop.override;
static const SpriteGroup *AirportTileResolveReal(const ResolverObject *object, const RealSpriteGroup *group)