summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-02-19 09:01:34 +0000
committeryexo <yexo@openttd.org>2009-02-19 09:01:34 +0000
commit9a507acf377cc14ff7bf0ab50b34b23aed98d218 (patch)
tree6aae9b77e5e75e74e7759c8d491e82f67ffbc901 /src
parent69df9f278732429ea2a1c66897c15bb53a5e4c15 (diff)
downloadopenttd-9a507acf377cc14ff7bf0ab50b34b23aed98d218.tar.xz
(svn r15520) -Cleanup [NoAI]: Fix some typos, unify the comment style and update some documentation since a few enums have been renamed.
Diffstat (limited to 'src')
-rw-r--r--src/ai/api/ai_abstractlist.hpp4
-rw-r--r--src/ai/api/ai_airport.hpp8
-rw-r--r--src/ai/api/ai_bridge.hpp4
-rw-r--r--src/ai/api/ai_cargo.hpp32
-rw-r--r--src/ai/api/ai_company.hpp8
-rw-r--r--src/ai/api/ai_engine.hpp16
-rw-r--r--src/ai/api/ai_event_types.hpp12
-rw-r--r--src/ai/api/ai_group.hpp16
-rw-r--r--src/ai/api/ai_grouplist.hpp2
-rw-r--r--src/ai/api/ai_marine.hpp2
-rw-r--r--src/ai/api/ai_order.hpp6
-rw-r--r--src/ai/api/ai_road.hpp2
-rw-r--r--src/ai/api/ai_town.hpp33
-rw-r--r--src/ai/api/ai_tunnel.hpp2
-rw-r--r--src/ai/api/ai_vehicle.hpp16
15 files changed, 81 insertions, 82 deletions
diff --git a/src/ai/api/ai_abstractlist.hpp b/src/ai/api/ai_abstractlist.hpp
index 55a4559f8..d99791fd4 100644
--- a/src/ai/api/ai_abstractlist.hpp
+++ b/src/ai/api/ai_abstractlist.hpp
@@ -21,8 +21,8 @@ public:
/** Type of sorter */
enum SorterType {
- SORT_BY_VALUE, ///< Sort the list based on the value of the item.
- SORT_BY_ITEM, ///< Sort the list based on the item itself.
+ SORT_BY_VALUE, //!< Sort the list based on the value of the item.
+ SORT_BY_ITEM, //!< Sort the list based on the item itself.
};
private:
diff --git a/src/ai/api/ai_airport.hpp b/src/ai/api/ai_airport.hpp
index 88d208043..245661364 100644
--- a/src/ai/api/ai_airport.hpp
+++ b/src/ai/api/ai_airport.hpp
@@ -62,10 +62,10 @@ public:
static bool IsHangarTile(TileIndex tile);
/**
- * Checks whether the given tile is actually a tile with a airport.
+ * Checks whether the given tile is actually a tile with an airport.
* @param tile The tile to check.
* @pre AIMap::IsValidTile(tile).
- * @return True if and only if the tile has a airport.
+ * @return True if and only if the tile has an airport.
*/
static bool IsAirportTile(TileIndex tile);
@@ -128,7 +128,7 @@ public:
static bool BuildAirport(TileIndex tile, AirportType type, StationID station_id);
/**
- * Removes a airport.
+ * Removes an airport.
* @param tile Any tile of the airport.
* @pre AIMap::IsValidTile(tile).
* @exception AIError::ERR_OWNED_BY_ANOTHER_COMPANY
@@ -151,7 +151,7 @@ public:
* @param tile The tile to check.
* @param type The AirportType to check.
* @return The amount of noise added to the nearest town.
- * @note The noise will be added to the town with TownID GetNearestTown(itle, type).
+ * @note The noise will be added to the town with TownID GetNearestTown(tile, type).
*/
static int GetNoiseLevelIncrease(TileIndex tile, AirportType type);
diff --git a/src/ai/api/ai_bridge.hpp b/src/ai/api/ai_bridge.hpp
index befb7a02a..f53ee2339 100644
--- a/src/ai/api/ai_bridge.hpp
+++ b/src/ai/api/ai_bridge.hpp
@@ -121,8 +121,8 @@ public:
* @pre 'start' and 'end' are in a straight line, i.e.
* AIMap::GetTileX(start) == AIMap::GetTileX(end) or
* AIMap::GetTileY(start) == AIMap::GetTileY(end).
- * @pre vehicle_type == AIVehicle::VEHICLE_ROAD || (vehicle_type == AIVehicle::VEHICLE_RAIL &&
- * AIRail::IsRailTypeAvailable(AIRail::GetCurrentRailType())) || vehicle_type == AIVehicle::VEHICLE_WATER.
+ * @pre vehicle_type == AIVehicle::VT_ROAD || vehicle_type == AIVehicle::VT_WATER ||
+ * (vehicle_type == AIVehicle::VT_RAIL && AIRail::IsRailTypeAvailable(AIRail::GetCurrentRailType())).
* @exception AIError::ERR_ALREADY_BUILT
* @exception AIError::ERR_AREA_NOT_CLEAR
* @exception AIError::ERR_LAND_SLOPED_WRONG
diff --git a/src/ai/api/ai_cargo.hpp b/src/ai/api/ai_cargo.hpp
index c8f8a04dd..381f4f7e2 100644
--- a/src/ai/api/ai_cargo.hpp
+++ b/src/ai/api/ai_cargo.hpp
@@ -18,28 +18,28 @@ public:
* The classes of cargo (from newgrf_cargo.h).
*/
enum CargoClass {
- CC_PASSENGERS = 1 << 0, ///< Passengers
- CC_MAIL = 1 << 1, ///< Mail
- CC_EXPRESS = 1 << 2, ///< Express cargo (Goods, Food, Candy, but also possible for passengers)
- CC_ARMOURED = 1 << 3, ///< Armoured cargo (Valuables, Gold, Diamonds)
- CC_BULK = 1 << 4, ///< Bulk cargo (Coal, Grain etc., Ores, Fruit)
- CC_PIECE_GOODS = 1 << 5, ///< Piece goods (Livestock, Wood, Steel, Paper)
- CC_LIQUID = 1 << 6, ///< Liquids (Oil, Water, Rubber)
- CC_REFRIGERATED = 1 << 7, ///< Refrigerated cargo (Food, Fruit)
- CC_HAZARDOUS = 1 << 8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
- CC_COVERED = 1 << 9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
+ CC_PASSENGERS = 1 << 0, //!< Passengers
+ CC_MAIL = 1 << 1, //!< Mail
+ CC_EXPRESS = 1 << 2, //!< Express cargo (Goods, Food, Candy, but also possible for passengers)
+ CC_ARMOURED = 1 << 3, //!< Armoured cargo (Valuables, Gold, Diamonds)
+ CC_BULK = 1 << 4, //!< Bulk cargo (Coal, Grain etc., Ores, Fruit)
+ CC_PIECE_GOODS = 1 << 5, //!< Piece goods (Livestock, Wood, Steel, Paper)
+ CC_LIQUID = 1 << 6, //!< Liquids (Oil, Water, Rubber)
+ CC_REFRIGERATED = 1 << 7, //!< Refrigerated cargo (Food, Fruit)
+ CC_HAZARDOUS = 1 << 8, //!< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
+ CC_COVERED = 1 << 9, //!< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
};
/**
* The effects a cargo can have on a town.
*/
enum TownEffect {
- TE_NONE = 0, ///< This cargo has no effect on a town
- TE_PASSENGERS = 1, ///< This cargo supplies passengers to a town
- TE_MAIL = 2, ///< This cargo supplies mail to a town
- TE_GOODS = 3, ///< This cargo supplies goods to a town
- TE_WATER = 4, ///< This cargo supplies water to a town
- TE_FOOD = 5, ///< This cargo supplies food to a town
+ TE_NONE = 0, //!< This cargo has no effect on a town
+ TE_PASSENGERS = 1, //!< This cargo supplies passengers to a town
+ TE_MAIL = 2, //!< This cargo supplies mail to a town
+ TE_GOODS = 3, //!< This cargo supplies goods to a town
+ TE_WATER = 4, //!< This cargo supplies water to a town
+ TE_FOOD = 5, //!< This cargo supplies food to a town
};
/**
diff --git a/src/ai/api/ai_company.hpp b/src/ai/api/ai_company.hpp
index 18b0bc0d8..e528a2f95 100644
--- a/src/ai/api/ai_company.hpp
+++ b/src/ai/api/ai_company.hpp
@@ -56,7 +56,7 @@ public:
/**
* Get the name of the given company.
* @param company The company to get the name for.
- * @pre ResolveCompanyID(company) != COMPANY_INVALID
+ * @pre ResolveCompanyID(company) != COMPANY_INVALID.
* @return The name of the given company.
*/
static char *GetName(CompanyID company);
@@ -73,7 +73,7 @@ public:
/**
* Get the name of the president of the given company.
* @param company The company to get the president's name for.
- * @pre ResolveCompanyID(company) != COMPANY_INVALID
+ * @pre ResolveCompanyID(company) != COMPANY_INVALID.
* @return The name of the president of the given company.
*/
static char *GetPresidentName(CompanyID company);
@@ -124,7 +124,7 @@ public:
/**
* Gets the current value of the given company.
* @param company The company to get the company value of.
- * @pre ResolveCompanyID(company) != COMPANY_INVALID
+ * @pre ResolveCompanyID(company) != COMPANY_INVALID.
* @return The current value of the given company.
*/
static Money GetCompanyValue(CompanyID company);
@@ -132,7 +132,7 @@ public:
/**
* Gets the bank balance. In other words, the amount of money the given company can spent.
* @param company The company to get the bank balance of.
- * @pre ResolveCompanyID(company) != COMPANY_INVALID
+ * @pre ResolveCompanyID(company) != COMPANY_INVALID.
* @return The actual bank balance.
*/
static Money GetBankBalance(CompanyID company);
diff --git a/src/ai/api/ai_engine.hpp b/src/ai/api/ai_engine.hpp
index 6fe865327..f28f4ffcd 100644
--- a/src/ai/api/ai_engine.hpp
+++ b/src/ai/api/ai_engine.hpp
@@ -59,7 +59,7 @@ public:
* @param engine_id The engine to check.
* @param cargo_id The cargo to check.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle.VEHICLE_RAIL.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL.
* @pre AICargo::IsValidCargo(cargo_id).
* @return True if the engine can pull wagons carrying this cargo.
* @note This function is not exhaustive; a true here does not mean
@@ -135,7 +135,7 @@ public:
* Check if an engine is a wagon.
* @param engine_id The engine to check.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle.VEHICLE_RAIL.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL.
* @return Whether or not the engine is a wagon.
*/
static bool IsWagon(EngineID engine_id);
@@ -145,7 +145,7 @@ public:
* @param engine_id The engine to check.
* @param track_rail_type The type you want to check.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle::VEHICLE_RAIL.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL.
* @pre AIRail::IsRailTypeAvailable(track_rail_type).
* @return Whether an engine of type 'engine_id' can run on 'track_rail_type'.
* @note Even if a train can run on a RailType that doesn't mean that it'll be
@@ -158,7 +158,7 @@ public:
* @param engine_id The engine to check.
* @param track_rail_type Another RailType.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle::VEHICLE_RAIL.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL.
* @pre AIRail::IsRailTypeAvailable(track_rail_type).
* @return Whether an engine of type 'engine_id' has power on 'track_rail_type'.
*/
@@ -168,7 +168,7 @@ public:
* Get the RoadType of the engine.
* @param engine_id The engine to get the RoadType of.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle.VEHICLE_ROAD.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_ROAD.
* @return The RoadType the engine has.
*/
static AIRoad::RoadType GetRoadType(EngineID engine_id);
@@ -177,7 +177,7 @@ public:
* Get the RailType of the engine.
* @param engine_id The engine to get the RailType of.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle.VEHICLE_RAIL.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_RAIL.
* @return The RailType the engine has.
*/
static AIRail::RailType GetRailType(EngineID engine_id);
@@ -186,7 +186,7 @@ public:
* Check if the engine is articulated.
* @param engine_id The engine to check.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle.VEHICLE_ROAD || GetVehicleType(engine_id) == AIVehicle.VEHICLE_RAIL.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_ROAD || GetVehicleType(engine_id) == AIVehicle::VT_RAIL.
* @return True if the engine is articulated.
*/
static bool IsArticulated(EngineID engine_id);
@@ -195,7 +195,7 @@ public:
* Get the PlaneType of the engine.
* @param engine_id The engine to get the PlaneType of.
* @pre IsValidEngine(engine_id).
- * @pre GetVehicleType(engine_id) == AIVehicle.VEHICLE_AIR.
+ * @pre GetVehicleType(engine_id) == AIVehicle::VT_AIR.
* @return The PlaneType the engine has.
*/
static AIAirport::PlaneType GetPlaneType(EngineID engine_id);
diff --git a/src/ai/api/ai_event_types.hpp b/src/ai/api/ai_event_types.hpp
index 2e6c526b4..26ab49010 100644
--- a/src/ai/api/ai_event_types.hpp
+++ b/src/ai/api/ai_event_types.hpp
@@ -24,12 +24,12 @@ public:
* The reasons for vehicle crashes
*/
enum CrashReason {
- CRASH_TRAIN, ///< Two trains collided
- CRASH_RV_LEVEL_CROSSING, ///< Road vehicle got under a train
- CRASH_RV_UFO, ///< Road vehicle got under a landing ufo
- CRASH_PLANE_LANDING, ///< Plane crashed on landing
- CRASH_AIRCRAFT_NO_AIRPORT, ///< Aircraft crashed after it found not a single airport for landing
- CRASH_FLOODED, ///< Vehicle was flooded
+ CRASH_TRAIN, //!< Two trains collided
+ CRASH_RV_LEVEL_CROSSING, //!< Road vehicle got under a train
+ CRASH_RV_UFO, //!< Road vehicle got under a landing ufo
+ CRASH_PLANE_LANDING, //!< Plane crashed on landing
+ CRASH_AIRCRAFT_NO_AIRPORT, //!< Aircraft crashed after it found not a single airport for landing
+ CRASH_FLOODED, //!< Vehicle was flooded
};
/**
diff --git a/src/ai/api/ai_group.hpp b/src/ai/api/ai_group.hpp
index 85202d2f0..dff7b6554 100644
--- a/src/ai/api/ai_group.hpp
+++ b/src/ai/api/ai_group.hpp
@@ -28,7 +28,7 @@ public:
/**
* Checks whether the given group is valid.
* @param group_id The group to check.
- * @pre group_id != DEFAULT_GROUP && group_id != ALL_GROUP.
+ * @pre group_id != GROUP_DEFAULT && group_id != GROUP_ALL.
* @return True if and only if the group is valid.
*/
static bool IsValidGroup(GroupID group_id);
@@ -44,7 +44,7 @@ public:
/**
* Delete the given group. When the deletion succeeds all vehicles in the
- * given group will move to the DEFAULT_GROUP.
+ * given group will move to the GROUP_DEFAULT.
* @param group_id The group to delete.
* @pre IsValidGroup(group_id).
* @return True if and only if the group was succesfully deleted.
@@ -101,7 +101,7 @@ public:
* Get the number of engines in a given group.
* @param group_id The group to get the number of engines in.
* @param engine_id The engine id to count.
- * @pre IsValidGroup(group_id) || group_id == ALL_GROUP || group_id == DEFAULT_GROUP.
+ * @pre IsValidGroup(group_id) || group_id == GROUP_ALL || group_id == GROUP_DEFAULT.
* @return The number of engines with id engine_id in the group with id group_id.
*/
static int32 GetNumEngines(GroupID group_id, EngineID engine_id);
@@ -110,11 +110,11 @@ public:
* Move a vehicle to a group.
* @param group_id The group to move the vehicel to.
* @param vehicle_id The vehicle to move to the group.
- * @pre IsValidGroup(group_id) || group_id == DEFAULT_GROUP.
+ * @pre IsValidGroup(group_id) || group_id == GROUP_DEFAULT.
* @pre AIVehicle::IsValidVehicle(vehicle_id).
* @return True if and only if the vehicle was succesfully moved to the group.
* @note A vehicle can be in only one group at the same time. To remove it from
- * a group, move it to another or to DEFAULT_GROUP. Moving the vehicle to the
+ * a group, move it to another or to GROUP_DEFAULT. Moving the vehicle to the
* given group means removing it from another group.
*/
static bool MoveVehicle(GroupID group_id, VehicleID vehicle_id);
@@ -141,7 +141,7 @@ public:
* vehicles from all groups that haven't set autoreplace protection.
* @param engine_id_old The engine id to start replacing.
* @param engine_id_new The engine id to replace with.
- * @pre IsValidGroup(group_id) || group_id == ALL_GROUP.
+ * @pre IsValidGroup(group_id) || group_id == GROUP_ALL.
* @pre AIEngine.IsValidEngine(engine_id_new).
* @note To stop autoreplacing engine_id_old, call StopAutoReplace(group_id, engine_id_old).
*/
@@ -151,7 +151,7 @@ public:
* Get the EngineID the given EngineID is replaced with.
* @param group_id The group to get the replacement from.
* @param engine_id The engine that is being replaced.
- * @pre IsValidGroup(group_id) || group_id == ALL_GROUP.
+ * @pre IsValidGroup(group_id) || group_id == GROUP_ALL.
* @return The EngineID that is replacing engine_id or an invalid EngineID
* in case engine_id is not begin replaced.
*/
@@ -161,7 +161,7 @@ public:
* Stop replacing a certain engine in the specified group.
* @param group_id The group to stop replacing the engine in.
* @param engine_id The engine id to stop replacing with another engine.
- * @pre IsValidGroup(group_id) || group_id == ALL_GROUP.
+ * @pre IsValidGroup(group_id) || group_id == GROUP_ALL.
* @return True if and if the replacing was succesfully stopped.
*/
static bool StopAutoReplace(GroupID group_id, EngineID engine_id);
diff --git a/src/ai/api/ai_grouplist.hpp b/src/ai/api/ai_grouplist.hpp
index d97ef85c7..d1cf191f0 100644
--- a/src/ai/api/ai_grouplist.hpp
+++ b/src/ai/api/ai_grouplist.hpp
@@ -9,7 +9,7 @@
/**
* Creates a list of groups of which you are the owner.
- * @note Neither AIGroup.ALL_GROUP nor AIGroup.DEFAULT_GROUP is in this list.
+ * @note Neither AIGroup::GROUP_ALL nor AIGroup::GROUP_DEFAULT is in this list.
* @ingroup AIList
*/
class AIGroupList : public AIAbstractList {
diff --git a/src/ai/api/ai_marine.hpp b/src/ai/api/ai_marine.hpp
index 6b8223392..24cb40b8a 100644
--- a/src/ai/api/ai_marine.hpp
+++ b/src/ai/api/ai_marine.hpp
@@ -82,7 +82,7 @@ public:
/**
* Builds a water depot on tile.
* @param tile The tile where the water depot will be build.
- * @param front A tile on the same axis with 'tile' as the depot shall be oriented
+ * @param front A tile on the same axis with 'tile' as the depot shall be oriented.
* @pre AIMap::IsValidTile(tile).
* @pre AIMap::IsValidTile(front).
* @exception AIError::ERR_AREA_NOT_CLEAR
diff --git a/src/ai/api/ai_order.hpp b/src/ai/api/ai_order.hpp
index 07df6b778..e5b2cd000 100644
--- a/src/ai/api/ai_order.hpp
+++ b/src/ai/api/ai_order.hpp
@@ -86,7 +86,7 @@ public:
/**
* Resolves the given order index to the correct index for the given vehicle.
- * If the order index was CURRENT_ORDER it will be resolved to the index of
+ * If the order index was ORDER_CURRENT it will be resolved to the index of
* the current order (as shown in the order list). If the order with the
* given index does not exist it will return ORDER_INVALID.
* @param vehicle_id The vehicle to check the order index for.
@@ -118,7 +118,7 @@ public:
* @param vehicle_id The vehicle to get the destination for.
* @param order_position The order to get the destination for.
* @pre IsValidVehicleOrder(vehicle_id, order_position).
- * @note Giving CURRENT_ORDER as order_position will give the order that is
+ * @note Giving ORDER_CURRENT as order_position will give the order that is
* currently being executed by the vehicle. This is not necessarily the
* current order as given by ResolveOrderPosition (the current index in the
* order list) as manual or autoservicing depot orders do not show up
@@ -132,7 +132,7 @@ public:
* @param vehicle_id The vehicle to get the destination for.
* @param order_position The order to get the destination for.
* @pre IsValidVehicleOrder(vehicle_id, order_position).
- * @note Giving CURRENT_ORDER as order_position will give the order that is
+ * @note Giving ORDER_CURRENT as order_position will give the order that is
* currently being executed by the vehicle. This is not necessarily the
* current order as given by ResolveOrderPosition (the current index in the
* order list) as manual or autoservicing depot orders do not show up
diff --git a/src/ai/api/ai_road.hpp b/src/ai/api/ai_road.hpp
index 1e3c84bde..e899af771 100644
--- a/src/ai/api/ai_road.hpp
+++ b/src/ai/api/ai_road.hpp
@@ -49,7 +49,7 @@ public:
};
/**
- * Type of road station
+ * Type of road station.
*/
enum RoadVehicleType {
ROADVEHTYPE_BUS, //!< Build objects useable for busses and passenger trams
diff --git a/src/ai/api/ai_town.hpp b/src/ai/api/ai_town.hpp
index c132beea3..c6476145b 100644
--- a/src/ai/api/ai_town.hpp
+++ b/src/ai/api/ai_town.hpp
@@ -72,16 +72,16 @@ public:
* Different ratings one could have in a town.
*/
enum TownRating {
- TOWN_RATING_NONE, ///< The company got no rating in the town.
- TOWN_RATING_APPALLING, ///< The company got an appalling rating in the town .
- TOWN_RATING_VERY_POOR, ///< The company got an very poor rating in the town.
- TOWN_RATING_POOR, ///< The company got an poor rating in the town.
- TOWN_RATING_MEDIOCRE, ///< The company got an mediocre rating in the town.
- TOWN_RATING_GOOD, ///< The company got an good rating in the town.
- TOWN_RATING_VERY_GOOD, ///< The company got an very good rating in the town.
- TOWN_RATING_EXCELLENT, ///< The company got an excellent rating in the town.
- TOWN_RATING_OUTSTANDING, ///< The company got an outstanding rating in the town.
- TOWN_RATING_INVALID = -1, ///< The town rating for invalid towns/companies.
+ TOWN_RATING_NONE, //!< The company got no rating in the town.
+ TOWN_RATING_APPALLING, //!< The company got an appalling rating in the town .
+ TOWN_RATING_VERY_POOR, //!< The company got an very poor rating in the town.
+ TOWN_RATING_POOR, //!< The company got an poor rating in the town.
+ TOWN_RATING_MEDIOCRE, //!< The company got an mediocre rating in the town.
+ TOWN_RATING_GOOD, //!< The company got an good rating in the town.
+ TOWN_RATING_VERY_GOOD, //!< The company got an very good rating in the town.
+ TOWN_RATING_EXCELLENT, //!< The company got an excellent rating in the town.
+ TOWN_RATING_OUTSTANDING, //!< The company got an outstanding rating in the town.
+ TOWN_RATING_INVALID = -1, //!< The town rating for invalid towns/companies.
};
/**
@@ -89,16 +89,15 @@ public:
*/
enum RoadLayout {
/* Order IS important, as it matches an in-game value */
- ROAD_LAYOUT_ORIGINAL, ///< Original algorithm (min. 1 distance between roads).
- ROAD_LAYOUT_BETTER_ROADS, ///< Extended original algorithm (min. 2 distance between roads).
- ROAD_LAYOUT_2x2, ///< Geometric 2x2 grid algorithm
- ROAD_LAYOUT_3x3, ///< Geometric 3x3 grid algorithm
- ROAD_LAYOUT_INVALID = -1, ///< The layout for invalid towns.
+ ROAD_LAYOUT_ORIGINAL, //!< Original algorithm (min. 1 distance between roads).
+ ROAD_LAYOUT_BETTER_ROADS, //!< Extended original algorithm (min. 2 distance between roads).
+ ROAD_LAYOUT_2x2, //!< Geometric 2x2 grid algorithm
+ ROAD_LAYOUT_3x3, //!< Geometric 3x3 grid algorithm
+ ROAD_LAYOUT_INVALID = -1, //!< The layout for invalid towns.
};
/**
- * Gets the number of towns. This is different than GetMaxTownID()
- * because of the way OpenTTD works internally.
+ * Gets the number of towns.
* @return The number of towns.
* @post Return value is always non-negative.
*/
diff --git a/src/ai/api/ai_tunnel.hpp b/src/ai/api/ai_tunnel.hpp
index 2288f2537..f069c5f49 100644
--- a/src/ai/api/ai_tunnel.hpp
+++ b/src/ai/api/ai_tunnel.hpp
@@ -76,7 +76,7 @@ public:
* @param start Where to start the tunnel.
* @param vehicle_type The vehicle-type of tunnel to build.
* @pre AIMap::IsValidTile(start).
- * @pre vehicle_type == AIVehicle::VEHICLE_ROAD || (vehicle_type == AIVehicle::VEHICLE_RAIL &&
+ * @pre vehicle_type == AIVehicle::VT_ROAD || (vehicle_type == AIVehicle::VT_RAIL &&
* AIRail::IsRailTypeAvailable(AIRail::GetCurrentRailType())).
* @exception AIError::ERR_AREA_NOT_CLEAR
* @exception AITunnel::ERR_TUNNEL_CANNOT_BUILD_ON_WATER
diff --git a/src/ai/api/ai_vehicle.hpp b/src/ai/api/ai_vehicle.hpp
index 5c363e4f4..43c993637 100644
--- a/src/ai/api/ai_vehicle.hpp
+++ b/src/ai/api/ai_vehicle.hpp
@@ -268,7 +268,7 @@ public:
* Get the RoadType of the vehicle.
* @param vehicle_id The vehicle to get the RoadType of.
* @pre IsValidVehicle(vehicle_id).
- * @pre GetVehicleType(vehicle_id) == VEHICLE_ROAD.
+ * @pre GetVehicleType(vehicle_id) == VT_ROAD.
* @return The RoadType the vehicle has.
*/
static AIRoad::RoadType GetRoadType(VehicleID vehicle_id);
@@ -333,8 +333,8 @@ public:
* @pre IsValidVehicle(source_vehicle_id).
* @pre source_wagon < GetNumWagons(source_vehicle_id).
* @pre dest_vehicle_id == -1 || (IsValidVehicle(dest_vehicle_id) && dest_wagon < GetNumWagons(dest_vehicle_id)).
- * @pre GetVehicleType(source_vehicle_id) == VEHICLE_RAIL.
- * @pre dest_vehicle_id == -1 || GetVehicleType(dest_vehicle_id) == VEHICLE_RAIL.
+ * @pre GetVehicleType(source_vehicle_id) == VT_RAIL.
+ * @pre dest_vehicle_id == -1 || GetVehicleType(dest_vehicle_id) == VT_RAIL.
* @return Whether or not moving the wagon succeeded.
*/
static bool MoveWagon(VehicleID source_vehicle_id, int source_wagon, int dest_vehicle_id, int dest_wagon);
@@ -348,8 +348,8 @@ public:
* @pre IsValidVehicle(source_vehicle_id).
* @pre source_wagon < GetNumWagons(source_vehicle_id).
* @pre dest_vehicle_id == -1 || (IsValidVehicle(dest_vehicle_id) && dest_wagon < GetNumWagons(dest_vehicle_id)).
- * @pre GetVehicleType(source_vehicle_id) == VEHICLE_RAIL.
- * @pre dest_vehicle_id == -1 || GetVehicleType(dest_vehicle_id) == VEHICLE_RAIL.
+ * @pre GetVehicleType(source_vehicle_id) == VT_RAIL.
+ * @pre dest_vehicle_id == -1 || GetVehicleType(dest_vehicle_id) == VT_RAIL.
* @return Whether or not moving the wagons succeeded.
*/
static bool MoveWagonChain(VehicleID source_vehicle_id, int source_wagon, int dest_vehicle_id, int dest_wagon);
@@ -454,7 +454,7 @@ public:
* Turn the given vehicle so it'll drive the other way.
* @param vehicle_id The vehicle to turn.
* @pre IsValidVehicle(vehicle_id).
- * @pre GetVehicleType(vehicle_id) == VEHICLE_ROAD || GetVehicleType(vehicle_id) == VEHICLE_RAIL.
+ * @pre GetVehicleType(vehicle_id) == VT_ROAD || GetVehicleType(vehicle_id) == VT_RAIL.
* @return True if and only if the vehicle has started to turn.
* @note Vehicles cannot always be reversed. For example busses and trucks need to be running
* and not be inside a depot.
@@ -475,7 +475,7 @@ public:
* Get the length of a the total vehicle in 1/16's of a tile.
* @param vehicle_id The vehicle to get the length of.
* @pre IsValidVehicle(vehicle_id).
- * @pre GetVehicleType(vehicle_id) == AIVehicle.VEHICLE_ROAD || GetVehicleType(vehicle_id) == AIVehicle.VEHICLE_RAIL.
+ * @pre GetVehicleType(vehicle_id) == VT_ROAD || GetVehicleType(vehicle_id) == VT_RAIL.
* @return The length of the engine.
*/
static int GetLength(VehicleID vehicle_id);
@@ -501,7 +501,7 @@ public:
* Check if the vehicle is articulated.
* @param vehicle_id The vehicle to check.
* @pre IsValidVehicle(vehicle_id).
- * @pre GetVehicleType(vehicle_id) == VEHICLE_ROAD || GetVehicleType(vehicle_id) == VEHICLE_RAIL.
+ * @pre GetVehicleType(vehicle_id) == VT_ROAD || GetVehicleType(vehicle_id) == VT_RAIL.
* @return True if the vehicle is articulated.
*/
static bool IsArticulated(VehicleID vehicle_id);