Changeset - r15927:e47dbd2576e2
[Not reviewed]
master
0 3 0
rubidium - 14 years ago 2010-08-26 16:53:06
rubidium@openttd.org
(svn r20625) -Add: AirportTileSpec::GetByTile to simplify accessing the AirportTileSpec
3 files changed with 12 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_airporttiles.cpp
Show inline comments
 
@@ -48,6 +48,16 @@ AirportTileOverrideManager _airporttile_
 
}
 

	
 
/**
 
 * 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()
src/newgrf_airporttiles.h
Show inline comments
 
@@ -29,6 +29,7 @@ struct AirportTileSpec {
 
	GRFFileProps grf_prop;                ///< properties related the the grf file
 

	
 
	static const AirportTileSpec *Get(StationGfx gfx);
 
	static const AirportTileSpec *GetByTile(TileIndex tile);
 

	
 
	static void ResetAirportTiles();
 

	
src/station_cmd.cpp
Show inline comments
 
@@ -2807,7 +2807,7 @@ static void GetTileDesc_Station(TileInde
 
	}
 

	
 
	if (IsAirport(tile)) {
 
		const AirportTileSpec *ats = AirportTileSpec::Get(GetAirportGfx(tile));
 
		const AirportTileSpec *ats = AirportTileSpec::GetByTile(tile);
 
		td->airport_tile_name = ats->name;
 

	
 
		if (ats->grf_prop.grffile != NULL) {
0 comments (0 inline, 0 general)