--- a/src/ai/api/ai_road.hpp Thu Feb 28 00:43:30 2008 +0000
+++ b/src/ai/api/ai_road.hpp Thu Feb 28 00:59:01 2008 +0000
@@ -22,7 +22,7 @@
* can be used to traverse a tile. This excludes road depots and
* 'normal' road stations, but includes drive through stations.
* @param tile the tile to check.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
* @return true if and only if the tile has road.
*/
static bool IsRoadTile(TileIndex tile);
@@ -30,7 +30,7 @@
/**
* Checks whether the given tile is actually a tile with a road depot.
* @param tile the tile to check.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
* @return true if and only if the tile has a road depot.
*/
static bool IsRoadDepotTile(TileIndex tile);
@@ -38,7 +38,7 @@
/**
* Checks whether the given tile is actually a tile with a road station.
* @param tile the tile to check.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
* @return true if and only if the tile has a road station.
*/
static bool IsRoadStationTile(TileIndex tile);
@@ -47,7 +47,7 @@
* Checks whether the given tile is actually a tile with a drive through
* road station.
* @param tile the tile to check.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
* @return true if and only if the tile has a drive through road station.
*/
static bool IsDriveThroughRoadStationTile(TileIndex tile);
@@ -58,8 +58,8 @@
* center of the second tile.
* @param t1 the source tile.
* @param t2 the destination tile.
- * @pre t1 is always positive and smaller than AIMap::GetMapSize().
- * @pre t2 is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(t1).
+ * @pre AIMap::IsValidTile(t2).
* @pre t1 and t2 are directly neighbouring tiles.
* @return true if and only if a road vehicle can go from t1 to t2.
*/
@@ -67,8 +67,8 @@
/**
* Count how many neighbours are road.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
* @param tile the tile to check on.
+ * @pre AIMap::IsValidTile(tile).
* @return 0 means no neighbour road; max value is 4.
*/
static int32 GetNeighbourRoadCount(TileIndex tile);
@@ -105,8 +105,8 @@
* @param start the start tile of the road.
* @param end the end tile of the road.
* @pre start is not equal to end
- * @pre start is always positive and smaller than AIMap::GetMapSize().
- * @pre end is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(start).
+ * @pre AIMap::IsValidTile(end).
* @pre start and end are in a straight line, i.e.
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
@@ -120,8 +120,8 @@
* @param start the start tile of the road.
* @param end the end tile of the road.
* @pre start is not equal to end
- * @pre start is always positive and smaller than AIMap::GetMapSize().
- * @pre end is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(start).
+ * @pre AIMap::IsValidTile(end).
* @pre start and end are in a straight line, i.e.
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
@@ -133,8 +133,8 @@
* Builds a road depot.
* @param tile place to build the depot.
* @param front the tile exactly in front of the depot
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
- * @pre front is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
+ * @pre AIMap::IsValidTile(front).
* @pre tile is not equal to front
* @return whether the road depot has been/can be build or not.
*/
@@ -147,8 +147,8 @@
* For drive-through stations either entrance side can be used.
* @param truck whether to build a truck (true) or bus (false) station.
* @param drive_through whether to make the station drive through or not.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
- * @pre front is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
+ * @pre AIMap::IsValidTile(front).
* @pre tile is not equal to front
* @return whether the station has been/can be build or not.
*/
@@ -159,8 +159,8 @@
* center of tile end.
* @param start the start tile of the road.
* @param end the end tile of the road.
- * @pre start is always positive and smaller than AIMap::GetMapSize().
- * @pre end is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(start).
+ * @pre AIMap::IsValidTile(end).
* @pre start and end are in a straight line, i.e.
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
@@ -173,8 +173,8 @@
* edge of tile end (both included).
* @param start the start tile of the road.
* @param end the end tile of the road.
- * @pre start is always positive and smaller than AIMap::GetMapSize().
- * @pre end is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(start).
+ * @pre AIMap::IsValidTile(end).
* @pre start and end are in a straight line, i.e.
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
@@ -185,7 +185,7 @@
/**
* Removes a road depot.
* @param tile place to remove the depot from.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
* @pre tile is a road depot.
* @return whether the road depot has been/can be removed or not.
*/
@@ -194,7 +194,7 @@
/**
* Removes a road bus or truck station.
* @param tile place to remove the station from.
- * @pre tile is always positive and smaller than AIMap::GetMapSize().
+ * @pre AIMap::IsValidTile(tile).
* @pre tile is a road station.
* @return whether the station has been/can be removed or not.
*/