summaryrefslogtreecommitdiff
path: root/src/newgrf_station.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-11-20 14:15:02 +0000
committeralberth <alberth@openttd.org>2010-11-20 14:15:02 +0000
commit3b0ee6557113104416f465fb780d9900fb7a842a (patch)
tree4c6600efd2700df08b38c84cd594dd11043ee501 /src/newgrf_station.cpp
parent5d72befbcd0486900062a4163c3eb52d5d27f7d5 (diff)
downloadopenttd-3b0ee6557113104416f465fb780d9900fb7a842a.tar.xz
(svn r21270) -Doc: Doxyment updates and additions. Removal of doxyment in code.
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r--src/newgrf_station.cpp39
1 files changed, 28 insertions, 11 deletions
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);