diff options
author | rubidium <rubidium@openttd.org> | 2008-10-19 15:39:12 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-10-19 15:39:12 +0000 |
commit | b0537d271f364486246bdab3be8a2bd44d43022f (patch) | |
tree | 2a5381abe13a96fd46089d41193bd7b605164edc /src/station_map.h | |
parent | e38213b5ef677f2c46c331ecbf6b778cc1e3e6e9 (diff) | |
download | openttd-b0537d271f364486246bdab3be8a2bd44d43022f.tar.xz |
(svn r14491) -Documentation: updates/additions of doxygen docs (Alberth)
Diffstat (limited to 'src/station_map.h')
-rw-r--r-- | src/station_map.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/station_map.h b/src/station_map.h index 0f3ff0721..c7d938f3d 100644 --- a/src/station_map.h +++ b/src/station_map.h @@ -14,6 +14,10 @@ typedef byte StationGfx; +/** Get Station ID from a tile + * @pre Tile \t must be part of the station + * @param t Tile to query station ID from + * @return Station ID of the station at \a t */ static inline StationID GetStationIndex(TileIndex t) { assert(IsTileType(t, MP_STATION)); @@ -97,16 +101,29 @@ static inline bool IsAirport(TileIndex t) bool IsHangar(TileIndex t); +/** + * Is the station at \a t a truck stop? + * @param t Tile to check + * @return \c true if station is a truck stop, \c false otherwise */ static inline bool IsTruckStop(TileIndex t) { return GetStationType(t) == STATION_TRUCK; } +/** + * Is the station at \a t a bus stop? + * @param t Tile to check + * @return \c true if station is a bus stop, \c false otherwise */ static inline bool IsBusStop(TileIndex t) { return GetStationType(t) == STATION_BUS; } +/** + * Is the station at \a t a road station? + * @pre Tile at \a t is a station tile + * @param t Tile to check + * @return \c true if station at the tile is a bus top or a truck stop, \c false otherwise */ static inline bool IsRoadStop(TileIndex t) { assert(IsTileType(t, MP_STATION)); |