# HG changeset patch # User truebrain # Date 1212933640 0 # Node ID c4b3ddd2e9da3ce9cfe22d06a37686633d4d0251 # Parent 9a6616a1dce6e1df7934cec2917e74450ab7f8fe (svn r13416) [NoAI] -Fix: make doxygen happy again diff -r 9a6616a1dce6 -r c4b3ddd2e9da src/ai/api/ai_station.hpp --- a/src/ai/api/ai_station.hpp Sun Jun 08 13:56:35 2008 +0000 +++ b/src/ai/api/ai_station.hpp Sun Jun 08 14:00:40 2008 +0000 @@ -40,6 +40,7 @@ * Type of stations known in the game. */ enum StationType { + /* Values are important, as they represent the internal state of the game. */ STATION_ANY = 0x00, //!< All station types STATION_TRAIN = 0x01, //!< Train station STATION_TRUCK_STOP = 0x02, //!< Truck station @@ -112,7 +113,7 @@ /** * Get the coverage radius of this type of station. - * @param type The type of station. + * @param station_type The type of station. * @return The radius in tiles. */ static int32 GetCoverageRadius(AIStation::StationType station_type); diff -r 9a6616a1dce6 -r c4b3ddd2e9da src/ai/api/ai_town.cpp --- a/src/ai/api/ai_town.cpp Sun Jun 08 13:56:35 2008 +0000 +++ b/src/ai/api/ai_town.cpp Sun Jun 08 14:00:40 2008 +0000 @@ -152,17 +152,17 @@ extern uint GetMaskOfTownActions(int *nump, PlayerID pid, const Town *t); -/* static */ bool AITown::IsActionAvailable(TownID town_id, TownAction action) +/* static */ bool AITown::IsActionAvailable(TownID town_id, TownAction town_action) { if (!IsValidTown(town_id)) return false; - return HasBit(::GetMaskOfTownActions(NULL, _current_player, ::GetTown(town_id)), action); + return HasBit(::GetMaskOfTownActions(NULL, _current_player, ::GetTown(town_id)), town_action); } -/* static */ bool AITown::PerformTownAction(TownID town_id, TownAction action) +/* static */ bool AITown::PerformTownAction(TownID town_id, TownAction town_action) { EnforcePrecondition(false, IsValidTown(town_id)); - EnforcePrecondition(false, IsActionAvailable(town_id, action)); + EnforcePrecondition(false, IsActionAvailable(town_id, town_action)); - return AIObject::DoCommand(::GetTown(town_id)->xy, town_id, action, CMD_DO_TOWN_ACTION); + return AIObject::DoCommand(::GetTown(town_id)->xy, town_id, town_action, CMD_DO_TOWN_ACTION); } diff -r 9a6616a1dce6 -r c4b3ddd2e9da src/ai/api/ai_town.hpp --- a/src/ai/api/ai_town.hpp Sun Jun 08 13:56:35 2008 +0000 +++ b/src/ai/api/ai_town.hpp Sun Jun 08 14:00:40 2008 +0000 @@ -19,6 +19,8 @@ * Actions that one can perform on a town. */ enum TownAction { + /* Values are important, as they represent the internal state of the game. */ + /** * The cargo ratings temporary gains 25% of rating (in * absolute percentage, so 10% becomes 35%, with a max of 99%) @@ -228,20 +230,21 @@ /** * Find out if an action can currently be performed on the town. * @param town_id The town to perform the action on. + * @param town_action The action to perform on the town. * @pre IsValidTown(town_id). * @return True if and only if the action can performed. */ - static bool IsActionAvailable(TownID town_id, TownAction action); + static bool IsActionAvailable(TownID town_id, TownAction town_action); /** * Perform a town action on this town. * @param town_id The town to perform the action on. - * @param action The action to perform on the town. + * @param town_action The action to perform on the town. * @pre IsValidTown(town_id). - * @pre IsActionAvailable(town_id, action). + * @pre IsActionAvailable(town_id, town_action). * @return True if the action succeeded. */ - static bool PerformTownAction(TownID town_id, TownAction action); + static bool PerformTownAction(TownID town_id, TownAction town_action); }; #endif /* AI_TOWN_HPP */