src/ai/api/ai_map.hpp
branchnoai
changeset 9836 54afebfded49
parent 9834 9abe20fc83e5
--- a/src/ai/api/ai_map.hpp	Mon Mar 31 07:21:39 2008 +0000
+++ b/src/ai/api/ai_map.hpp	Mon Mar 31 07:37:51 2008 +0000
@@ -16,102 +16,102 @@
 
 	/**
 	 * Checks whether the given tile is valid.
-	 * @param t the tile to check.
-	 * @return true is the tile it within the boundaries of the map.
+	 * @param tile The tile to check.
+	 * @return True is the tile it within the boundaries of the map.
 	 */
-	static bool IsValidTile(TileIndex t);
+	static bool IsValidTile(TileIndex tile);
 
 	/**
 	 * Gets the number of tiles in the map.
-	 * @return the size of the map in tiles.
-	 * @post return value is always positive.
+	 * @return The size of the map in tiles.
+	 * @post Return value is always positive.
 	 */
 	static TileIndex GetMapSize();
 
 	/**
 	 * Gets the amount of tiles along the SW and NE border.
-	 * @return the length along the SW and NE borders.
-	 * @post return value is always positive.
+	 * @return The length along the SW and NE borders.
+	 * @post Return value is always positive.
 	 */
 	static uint32 GetMapSizeX();
 
 	/**
 	 * Gets the amount of tiles along the SE and NW border.
-	 * @return the length along the SE and NW borders.
-	 * @post return value is always positive.
+	 * @return The length along the SE and NW borders.
+	 * @post Return value is always positive.
 	 */
 	static uint32 GetMapSizeY();
 
 	/**
 	 * Gets the place along the SW/NE border (X-value).
-	 * @param t the tile to get the X-value of.
-	 * @pre t has to be valid (use IsValidTile(t)).
-	 * @return the X-value.
-	 * @post return value is lower than GetMapSizeX().
+	 * @param tile The tile to get the X-value of.
+	 * @pre IsValidTile(tile).
+	 * @return The X-value.
+	 * @post Return value is always lower than GetMapSizeX().
 	 */
-	static uint32 GetTileX(TileIndex t);
+	static uint32 GetTileX(TileIndex tile);
 
 	/**
 	 * Gets the place along the SE/NW border (Y-value).
-	 * @param t the tile to get the Y-value of.
-	 * @pre t has to be valid (use IsValidTile(t)).
-	 * @return the Y-value.
-	 * @post return value is lower than GetMapSizeY().
+	 * @param tile The tile to get the Y-value of.
+	 * @pre IsValidTile(tile).
+	 * @return The Y-value.
+	 * @post Return value is always lower than GetMapSizeY().
 	 */
-	static uint32 GetTileY(TileIndex t);
+	static uint32 GetTileY(TileIndex tile);
 
 	/**
 	 * Gets the TileIndex given a x,y-coordinate.
-	 * @param x the X coordinate.
-	 * @param y the Y coordinate.
-	 * @pre x has to be lower than GetMapSizeX().
-	 * @pre y has to be lower than GetMapSizeY().
-	 * @return the TileIndex for the given x,y coordinate.
+	 * @param x The X coordinate.
+	 * @param y The Y coordinate.
+	 * @pre x < GetMapSizeX().
+	 * @pre y < GetMapSizeY().
+	 * @return The TileIndex for the given (x,y) coordinate.
 	 */
 	static TileIndex GetTileIndex(uint32 x, uint32 y);
 
 	/**
 	 * Calculates the Manhattan distance; the difference of
-	 * the X and Y added together.
-	 * @param t1 the start.
-	 * @param t2 the destination.
-	 * @pre t1 has to be valid (use IsValidTile(t1)).
-	 * @pre t2 has to be valid (use IsValidTile(t2)).
-	 * @return the Manhattan distance.
+	 *  the X and Y added together.
+	 * @param tile_from The start tile.
+	 * @param tile_to The destination tile.
+	 * @pre IsValidTile(tile_from).
+	 * @pre IsValidTile(tile_to).
+	 * @return The Manhattan distance between the tiles.
 	 */
-	static uint32 DistanceManhattan(TileIndex t1, TileIndex t2);
+	static uint32 DistanceManhattan(TileIndex tile_from, TileIndex tile_to);
 
 	/**
-	 * Calculates the distance between xy1 and xy2 via 1D calculation.
-	 *  (so the distance between X or the distance between Y, depending
-	 *    on which one is bigger).
-	 * @param t1 the start.
-	 * @param t2 the destination.
-	 * @pre t1 has to be valid (use IsValidTile(t1)).
-	 * @pre t2 has to be valid (use IsValidTile(t2)).
-	 * @return the maximum distance of X and Y.
+	 * Calculates the distance between two tiles via 1D calculation.
+	 *  This means the distance between X or the distance between Y, depending
+	 *  on which one is bigger.
+	 * @param tile_from The start tile.
+	 * @param tile_to The destination tile.
+	 * @pre IsValidTile(tile_from).
+	 * @pre IsValidTile(tile_to).
+	 * @return The maximum distance between the tiles.
 	 */
-	static uint32 DistanceMax(TileIndex t1, TileIndex t2);
+	static uint32 DistanceMax(TileIndex tile_from, TileIndex tile_to);
 
 	/**
 	 * The squared distance between the two tiles.
-	 * This is the distance is the length of the shortest straight
-	 * line between both points.
-	 * @param t1 the start.
-	 * @param t2 the destination.
-	 * @pre t1 has to be valid (use IsValidTile(t1)).
-	 * @pre t2 has to be valid (use IsValidTile(t2)).
-	 * @return the distance.
+	 *  This is the distance is the length of the shortest straight line
+	 *  between both points.
+	 * @param tile_from The start tile.
+	 * @param tile_to The destination tile.
+	 * @pre IsValidTile(tile_from).
+	 * @pre IsValidTile(tile_to).
+	 * @return The squared distance between the tiles.
 	 */
-	static uint32 DistanceSquare(TileIndex t1, TileIndex t2);
+	static uint32 DistanceSquare(TileIndex tile_from, TileIndex tile_to);
 
 	/**
 	 * Calculates the shortest distance to the edge.
-	 * @param t from where the distance has to be calculated.
-	 * @pre t has to be valid (use IsValidTile(t)).
-	 * @return the distances to the closest edge.
+	 * @param tile From where the distance has to be calculated.
+	 * @pre IsValidTile(tile).
+	 * @return The distances to the closest edge.
 	 */
-	static uint32 DistanceFromEdge(TileIndex t);
+	static uint32 DistanceFromEdge(TileIndex tile);
 };
 
 #endif /* AI_MAP_HPP */