From 3b0ee6557113104416f465fb780d9900fb7a842a Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 20 Nov 2010 14:15:02 +0000 Subject: (svn r21270) -Doc: Doxyment updates and additions. Removal of doxyment in code. --- src/newgrf_station.cpp | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'src/newgrf_station.cpp') diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index fd443fe86..749ab0ea8 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -89,12 +89,17 @@ struct ETileArea : TileArea { }; -/* Evaluate a tile's position within a station, and return the result a bit-stuffed format. +/** + * Evaluate a tile's position within a station, and return the result in a bit-stuffed format. * if not centered: .TNLcCpP, if centered: .TNL..CP - * T = Tile layout number (#GetStationGfx), N = Number of platforms, L = Length of platforms - * C = Current platform number from start, c = from end - * P = Position along platform from start, p = from end + * - T = Tile layout number (#GetStationGfx) + * - N = Number of platforms + * - L = Length of platforms + * - C = Current platform number from start, c = from end + * - P = Position along platform from start, p = from end + * . * if centered, C/P start from the centre and c/p are not available. + * @return Platform information in bit-stuffed format. */ uint32 GetPlatformInfo(Axis axis, byte tile, int platforms, int length, int x, int y, bool centred) { @@ -129,9 +134,13 @@ uint32 GetPlatformInfo(Axis axis, byte tile, int platforms, int length, int x, i } -/* Find the end of a railway station, from the tile, in the direction of delta. - * If check_type is set, we stop if the custom station type changes. - * If check_axis is set, we stop if the station direction changes. +/** + * Find the end of a railway station, from the \a tile, in the direction of \a delta. + * @param tile Start tile. + * @param delta Movement direction. + * @param check_type Stop when the custom station type changes. + * @param check_axis Stop when the station direction changes. + * @return Found end of the railway station. */ static TileIndex FindRailStationEnd(TileIndex tile, TileIndexDiff delta, bool check_type, bool check_axis) { @@ -785,8 +794,12 @@ const StationSpec *GetStationSpec(TileIndex t) } -/* Check if a rail station tile is traversable. - * XXX This could be cached (during build) in the map array to save on all the dereferencing */ +/** + * Check whether a rail station tile is NOT traversable. + * @param tile %Tile to test. + * @return Station tile is blocked. + * @note This could be cached (during build) in the map array to save on all the dereferencing. + */ bool IsStationTileBlocked(TileIndex tile) { const StationSpec *statspec = GetStationSpec(tile); @@ -794,8 +807,12 @@ bool IsStationTileBlocked(TileIndex tile) return statspec != NULL && HasBit(statspec->blocked, GetStationGfx(tile)); } -/* Check if a rail station tile is electrifiable. - * XXX This could be cached (during build) in the map array to save on all the dereferencing */ +/** + * Check if a rail station tile can be electrified. + * @param tile %Tile to test. + * @return Tile can be electrified. + * @note This could be cached (during build) in the map array to save on all the dereferencing. + */ bool IsStationTileElectrifiable(TileIndex tile) { const StationSpec *statspec = GetStationSpec(tile); -- cgit v1.2.3-54-g00ecf