(svn r18860) -Codechange: introduce a wrapper to get an hangar tile from a station

This commit is contained in:
yexo
2010-01-18 14:32:47 +00:00
parent 565ad802b1
commit a1f28ec88b
6 changed files with 15 additions and 11 deletions

View File

@@ -121,11 +121,18 @@ public:
return IsRailStationTile(tile) && GetStationIndex(tile) == this->index;
}
/* virtual */ FORCEINLINE bool TileBelongsToAirport(TileIndex tile) const
FORCEINLINE bool TileBelongsToAirport(TileIndex tile) const
{
return IsAirportTile(tile) && GetStationIndex(tile) == this->index;
}
FORCEINLINE TileIndex GetHangarTile(uint hangar_num) const
{
assert(this->airport_tile != INVALID_TILE);
assert(hangar_num < this->GetAirportSpec()->nof_depots);
return this->airport_tile + ToTileIndexDiff(this->GetAirportSpec()->depot_table[hangar_num]);
}
/* virtual */ uint32 GetNewGRFVariable(const ResolverObject *object, byte variable, byte parameter, bool *available) const;
/* virtual */ void GetTileArea(TileArea *ta, StationType type) const;