diff options
-rw-r--r-- | Doxyfile | 3 | ||||
-rw-r--r-- | src/aircraft_cmd.cpp | 12 | ||||
-rw-r--r-- | src/autoreplace_cmd.cpp | 2 | ||||
-rw-r--r-- | src/command.cpp | 1 | ||||
-rw-r--r-- | src/company_cmd.cpp | 4 | ||||
-rw-r--r-- | src/economy.cpp | 6 | ||||
-rw-r--r-- | src/engine.cpp | 4 | ||||
-rw-r--r-- | src/group_cmd.cpp | 21 | ||||
-rw-r--r-- | src/industry_cmd.cpp | 3 | ||||
-rw-r--r-- | src/landscape.cpp | 4 | ||||
-rw-r--r-- | src/misc_cmd.cpp | 18 | ||||
-rw-r--r-- | src/order_cmd.cpp | 17 | ||||
-rw-r--r-- | src/rail_cmd.cpp | 26 | ||||
-rw-r--r-- | src/road_cmd.cpp | 10 | ||||
-rw-r--r-- | src/roadveh_cmd.cpp | 11 | ||||
-rw-r--r-- | src/settings.cpp | 4 | ||||
-rw-r--r-- | src/ship_cmd.cpp | 9 | ||||
-rw-r--r-- | src/signs_cmd.cpp | 5 | ||||
-rw-r--r-- | src/station_cmd.cpp | 16 | ||||
-rw-r--r-- | src/terraform_cmd.cpp | 6 | ||||
-rw-r--r-- | src/timetable_cmd.cpp | 7 | ||||
-rw-r--r-- | src/town_cmd.cpp | 6 | ||||
-rw-r--r-- | src/train_cmd.cpp | 17 | ||||
-rw-r--r-- | src/tree_cmd.cpp | 2 | ||||
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 4 | ||||
-rw-r--r-- | src/unmovable_cmd.cpp | 8 | ||||
-rw-r--r-- | src/vehicle_cmd.cpp | 15 | ||||
-rw-r--r-- | src/water_cmd.cpp | 6 | ||||
-rw-r--r-- | src/waypoint_cmd.cpp | 8 |
29 files changed, 231 insertions, 24 deletions
@@ -33,7 +33,6 @@ STRIP_FROM_INC_PATH = SHORT_NAMES = NO JAVADOC_AUTOBRIEF = YES MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO INHERIT_DOCS = YES DISTRIBUTE_GROUP_DOC = NO TAB_SIZE = 2 @@ -95,7 +94,7 @@ FILE_PATTERNS = *.c \ RECURSIVE = YES EXCLUDE = EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = */3rdparty */.svn EXAMPLE_PATH = EXAMPLE_PATTERNS = * EXAMPLE_RECURSIVE = NO diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index df8b91b25..8038876af 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -253,7 +253,8 @@ uint16 AircraftDefaultCargoCapacity(CargoID cid, const AircraftVehicleInfo *avi) * @param flags for command * @param p1 aircraft type being built (engine) * @param p2 unused - * return result of operation. Could be cost, error + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -449,7 +450,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uin * @param flags for command type * @param p1 vehicle ID to be sold * @param p2 unused - * @return result of operation. Error or sold value + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSellAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -495,7 +497,8 @@ bool Aircraft::FindClosestDepot(TileIndex *location, DestinationID *destination, * @param p2 various bitmasked elements * - p2 bit 0-3 - DEPOT_ flags (see vehicle.h) * - p2 bit 8-10 - VLW flag (for mass goto depot) - * @return o if everything went well + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSendAircraftToHangar(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -520,7 +523,8 @@ CommandCost CmdSendAircraftToHangar(TileIndex tile, DoCommandFlag flags, uint32 * - p2 = (bit 0-7) - the new cargo type to refit to * - p2 = (bit 8-15) - the new cargo subtype to refit to * - p2 = (bit 16) - refit only this vehicle (ignored) - * @return cost of refit or error + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRefitAircraft(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index e6a870b60..ef16183a3 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -614,6 +614,8 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlag flags, bool wagon * @param flags type of operation * @param p1 Index of vehicle * @param p2 not used + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdAutoreplaceVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/command.cpp b/src/command.cpp index 003f13cbf..d2cc9aca7 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -399,6 +399,7 @@ CommandCost DoCommand(const CommandContainer *container, DoCommandFlag flags) * @param p2 Additional data for the command (for the #CommandProc) * @param flags Flags for the command and how to execute the command * @param cmd The command-id to execute (a value of the CMD_* enums) + * @param text The text to pass * @see CommandProc * @return the cost */ diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index c3dd10f1c..bc249dd92 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -618,6 +618,7 @@ void CompaniesYearlyLoop() * - bits 0-15 = old engine type * - bits 16-31 = new engine type * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSetAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -680,6 +681,9 @@ void CompanyNewsInformation::FillData(const Company *c, const Company *other) * - p1 = 0 - ClientID of the newly created client * - p1 = 1 - CompanyID to start AI (INVALID_COMPANY for first available) * - p1 = 2 - CompanyID of the that is getting deleted + * @param text unused + * @return the cost of this operation or an error + * * @todo In the case of p1=0, create new company, the clientID of the new client is in parameter * p2. This parameter is passed in at function DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND) * on the server itself. First of all this is unbelievably ugly; second of all, well, diff --git a/src/economy.cpp b/src/economy.cpp index c5b3666f5..a217fc595 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -1460,6 +1460,8 @@ extern int GetAmountOwnedBy(const Company *c, Owner owner); * @param flags type of operation * @param p1 company to buy the shares from * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1505,6 +1507,8 @@ CommandCost CmdBuyShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, * @param flags type of operation * @param p1 company to sell the shares from * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1538,6 +1542,8 @@ CommandCost CmdSellShareInCompany(TileIndex tile, DoCommandFlag flags, uint32 p1 * @param flags type of operation * @param p1 company to buy up * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuyCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/engine.cpp b/src/engine.cpp index 3430e48fb..8d0983380 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -604,6 +604,8 @@ void EnginesDailyLoop() * @param flags operation to perfom * @param p1 engine-prototype offered * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdWantEnginePreview(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -713,6 +715,8 @@ static bool IsUniqueEngineName(const char *name) * @param flags operation to perfom * @param p1 engine ID to rename * @param p2 unused + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameEngine(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 69f39cca3..0d4bb2e53 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -75,8 +75,11 @@ void InitializeGroup() /** * Create a new vehicle group. * @param tile unused + * @param flags type of operation * @param p1 vehicle type * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -102,9 +105,12 @@ CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 /** * Add all vehicles in the given group to the default group and then deletes the group. * @param tile unused + * @param flags type of operation * @param p1 index of array group * - p1 bit 0-15 : GroupID * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -159,9 +165,12 @@ static bool IsUniqueGroupName(const char *name) /** * Rename a group * @param tile unused + * @param flags type of operation * @param p1 index of array group * - p1 bit 0-15 : GroupID * @param p2 unused + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -191,10 +200,13 @@ CommandCost CmdRenameGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 /** * Add a vehicle to a group * @param tile unused + * @param flags type of operation * @param p1 index of array group * - p1 bit 0-15 : GroupID * @param p2 vehicle to add to a group * - p2 bit 0-15 : VehicleID + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -238,9 +250,12 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u /** * Add all shared vehicles of all vehicles from a group * @param tile unused + * @param flags type of operation * @param p1 index of group array * - p1 bit 0-15 : GroupID * @param p2 type of vehicles + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -275,9 +290,12 @@ CommandCost CmdAddSharedVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 /** * Remove all vehicles from a group * @param tile unused + * @param flags type of operation * @param p1 index of group array * - p1 bit 0-15 : GroupID * @param p2 type of vehicles + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -310,10 +328,13 @@ CommandCost CmdRemoveAllVehiclesGroup(TileIndex tile, DoCommandFlag flags, uint3 /** * (Un)set global replace protection from a group * @param tile unused + * @param flags type of operation * @param p1 index of group array * - p1 bit 0-15 : GroupID * @param p2 * - p2 bit 0 : 1 to set or 0 to clear protection. + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSetGroupReplaceProtection(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 24d8f280c..7ef620559 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1692,7 +1692,8 @@ static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, DoCo * - p1 = (bit 0 - 7) - industry type see build_industry.h and see industry.h * - p1 = (bit 8 - 15) - first layout to try * @param p2 seed to use for variable 8F - * @return index of the newly create industry, or CMD_ERROR if it failed + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/landscape.cpp b/src/landscape.cpp index 6677d0526..1877f9be8 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -594,6 +594,8 @@ void ClearSnowLine() * @param flags of operation to conduct * @param p1 unused * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -605,6 +607,8 @@ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, ui * @param p1 start tile of area dragging * @param flags of operation to conduct * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp index a3428d356..22c40f2ff 100644 --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -34,6 +34,8 @@ * @param flags operation to perform * @param p1 unused * @param p2 face bitmasked + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSetCompanyManagerFace(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -55,6 +57,8 @@ CommandCost CmdSetCompanyManagerFace(TileIndex tile, DoCommandFlag flags, uint32 * p1 bits 0-7 scheme to set * p1 bits 8-9 set in use state or first/second colour * @param p2 new colour for vehicles, property, etc. + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -142,6 +146,8 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, * @param p2 when 0: loans LOAN_INTERVAL * when 1: loans the maximum loan permitting money (press CTRL), * when 2: loans the amount specified in p1 + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdIncreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -186,6 +192,8 @@ CommandCost CmdIncreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint * @param p2 when 0: pays back LOAN_INTERVAL * when 1: pays back the maximum loan permitting money (press CTRL), * when 2: pays back the amount specified in p1 + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdDecreaseLoan(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -238,6 +246,8 @@ static bool IsUniqueCompanyName(const char *name) * @param flags operation to perform * @param p1 unused * @param p2 unused + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameCompany(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -274,6 +284,8 @@ static bool IsUniquePresidentName(const char *name) * @param flags operation to perform * @param p1 unused * @param p2 unused + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenamePresident(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -326,6 +338,8 @@ static void AskUnsafeUnpauseCallback(Window *w, bool confirmed) * @param flags operation to perform * @param p1 the pause mode to change * @param p2 1 pauses, 0 unpauses this mode + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdPause(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -367,6 +381,8 @@ CommandCost CmdPause(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, * @param flags operation to perform * @param p1 the amount of money to receive (if negative), or spend (if positive) * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdMoneyCheat(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -384,6 +400,8 @@ CommandCost CmdMoneyCheat(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 * @param flags operation to perform * @param p1 the amount of money to transfer; max 20.000.000 * @param p2 the company to transfer the money to + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdGiveMoney(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 2b0c09e5d..121a80990 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -450,6 +450,8 @@ static uint GetOrderDistance(const Order *prev, const Order *cur, const Vehicle * the order will be inserted before that one * the maximum vehicle order id is 254. * @param p2 packed order to insert + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdInsertOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -706,6 +708,8 @@ static CommandCost DecloneOrder(Vehicle *dst, DoCommandFlag flags) * @param flags operation to perform * @param p1 the ID of the vehicle * @param p2 the order to delete (max 255) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdDeleteOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -771,6 +775,8 @@ CommandCost CmdDeleteOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 * @param flags operation to perform * @param p1 The ID of the vehicle which order is skipped * @param p2 the selected order to which we want to skip + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSkipToOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -804,10 +810,13 @@ CommandCost CmdSkipToOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 /** * Move an order inside the orderlist * @param tile unused + * @param flags operation to perform * @param p1 the ID of the vehicle * @param p2 order to move and target * bit 0-15 : the order to move * bit 16-31 : the target order + * @param text unused + * @return the cost of this operation or an error * @note The target order will move one place down in the orderlist * if you move the order upwards else it'll move it one place down */ @@ -886,6 +895,8 @@ CommandCost CmdMoveOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 * @param p2 various bitstuffed elements * - p2 = (bit 0 - 3) - what data to modify (@see ModifyOrderFlags) * - p2 = (bit 4 - 15) - the data to modify + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1111,6 +1122,8 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3 * - p1 = (bit 0-15) - destination vehicle to clone orders to (p1 & 0xFFFF) * - p1 = (bit 16-31) - source vehicle to clone orders from, if any (none for CO_UNSHARE) * @param p2 mode of cloning: CO_SHARE, CO_COPY, or CO_UNSHARE + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1233,6 +1246,8 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 * - bit 0-7 CargoID * - bit 8-15 Cargo subtype * - bit 16-23 number of order to modify + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdOrderRefit(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1378,6 +1393,8 @@ void RestoreVehicleOrders(const Vehicle *v, const BackuppedOrders *bak) * @param p2 various bistuffed elements * - p2 = (bit 0-15) - current order-index (p2 & 0xFFFF) * - p2 = (bit 16-31) - service interval (p2 >> 16) + * @param text unused + * @return the cost of this operation or an error * @todo Unfortunately you cannot safely restore the unitnumber or the old vehicle * as far as I can see. We can store it in BackuppedOrders, and restore it, but * but we have no way of seeing it has been tampered with or not, as we have no diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index c2633bcf7..86c1de53a 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -310,6 +310,8 @@ static inline bool ValParamTrackOrientation(Track track) {return IsValidTrack(tr * @param flags operation to perform * @param p1 railtype of being built piece (normal, mono, maglev) * @param p2 rail track to build + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -447,6 +449,8 @@ CommandCost CmdBuildSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, u * @param flags operation to perform * @param p1 unused * @param p2 rail orientation + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRemoveSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -675,6 +679,8 @@ static CommandCost ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileInd * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev) * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum) * - p2 = (bit 7) - 0 = build, 1 = remove tracks + * @param text unused + * @return the cost of this operation or an error */ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -722,6 +728,8 @@ static CommandCost CmdRailTrackHelper(TileIndex tile, DoCommandFlag flags, uint3 * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev) * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum) * - p2 = (bit 7) - 0 = build, 1 = remove tracks + * @param text unused + * @return the cost of this operation or an error * @see CmdRailTrackHelper */ CommandCost CmdBuildRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) @@ -738,6 +746,8 @@ CommandCost CmdBuildRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p1 * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev) * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum) * - p2 = (bit 7) - 0 = build, 1 = remove tracks + * @param text unused + * @return the cost of this operation or an error * @see CmdRailTrackHelper */ CommandCost CmdRemoveRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) @@ -750,6 +760,8 @@ CommandCost CmdRemoveRailroadTrack(TileIndex tile, DoCommandFlag flags, uint32 p * @param flags operation to perform * @param p1 rail type * @param p2 bit 0..1 entrance direction (DiagDirection) + * @param text unused + * @return the cost of this operation or an error * * @todo When checking for the tile slope, * distingush between "Flat land required" and "land sloped in wrong direction" @@ -817,7 +829,9 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u * - p1 = (bit 15-16)-cycle the signal direction this many times * - p1 = (bit 17) - 1 = don't modify an existing signal but don't fail either, 0 = always set new signal type * @param p2 used for CmdBuildManySignals() to copy direction of first signal - * TODO: p2 should be replaced by two bits for "along" and "against" the track. + * @param text unused + * @return the cost of this operation or an error + * @todo p2 should be replaced by two bits for "along" and "against" the track. */ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1033,6 +1047,8 @@ static bool CheckSignalAutoFill(TileIndex &tile, Trackdir &trackdir, int &signal * - p2 = (bit 6) - 0 = selected stretch, 1 = auto fill * - p2 = (bit 7- 9) - default signal type * - p2 = (bit 24-31) - user defined signals_density + * @param text unused + * @return the cost of this operation or an error */ static CommandCost CmdSignalTrackHelper(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1159,6 +1175,8 @@ static CommandCost CmdSignalTrackHelper(TileIndex tile, DoCommandFlag flags, uin * - p2 = (bit 6) - 0 = selected stretch, 1 = auto fill * - p2 = (bit 7- 9) - default signal type * - p2 = (bit 24-31) - user defined signals_density + * @param text unused + * @return the cost of this operation or an error * @see CmdSignalTrackHelper */ CommandCost CmdBuildSignalTrack(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) @@ -1174,6 +1192,8 @@ CommandCost CmdBuildSignalTrack(TileIndex tile, DoCommandFlag flags, uint32 p1, * - (bit 3) - override signal/semaphore, or pre/exit/combo signal (CTRL-toggle) * - (bit 4) - 0 = signals, 1 = semaphores * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1228,6 +1248,8 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1 * - p2 = (bit 6) - 0 = selected stretch, 1 = auto fill * - p2 = (bit 7- 9) - default signal type * - p2 = (bit 24-31) - user defined signals_density + * @param text unused + * @return the cost of this operation or an error * @see CmdSignalTrackHelper */ CommandCost CmdRemoveSignalTrack(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) @@ -1257,6 +1279,8 @@ Vehicle *UpdateTrainPowerProc(Vehicle *v, void *data) * @param flags operation to perform * @param p1 start tile of drag * @param p2 new railtype to convert to + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index e94d9bb0e..e9f21f56f 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -357,6 +357,8 @@ static CommandCost RemoveRoad(TileIndex tile, DoCommandFlag flags, RoadBits piec * @param p1 bit 0..3 road pieces to remove (RoadBits) * bit 4..5 road type * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRemoveRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -451,6 +453,8 @@ static CommandCost CheckRoadSlope(Slope tileh, RoadBits *pieces, RoadBits existi * bit 4..5 road type * bit 6..7 disallowed directions to toggle * @param p2 the town that is building the road (0 if not applicable) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildRoad(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -703,6 +707,8 @@ do_clear:; * - p2 = (bit 2) - direction: 0 = along x-axis, 1 = along y-axis (p2 & 4) * - p2 = (bit 3 + 4) - road type * - p2 = (bit 5) - set road direction + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildLongRoad(TileIndex end_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -789,6 +795,8 @@ CommandCost CmdBuildLongRoad(TileIndex end_tile, DoCommandFlag flags, uint32 p1, * - p2 = (bit 1) - end tile starts in the 2nd half of tile (p2 & 2) * - p2 = (bit 2) - direction: 0 = along x-axis, 1 = along y-axis (p2 & 4) * - p2 = (bit 3 + 4) - road type + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRemoveLongRoad(TileIndex end_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -851,6 +859,8 @@ CommandCost CmdRemoveLongRoad(TileIndex end_tile, DoCommandFlag flags, uint32 p1 * @param p1 bit 0..1 entrance direction (DiagDirection) * bit 2..3 road type * @param p2 unused + * @param text unused + * @return the cost of this operation or an error * * @todo When checking for the tile slope, * distingush between "Flat land required" and "land sloped in wrong direction" diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index f48a09b38..5a71b2abc 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -185,6 +185,8 @@ void RoadVehUpdateCache(RoadVehicle *v) * @param flags operation to perform * @param p1 bus/truck type being built (engine) * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -340,6 +342,8 @@ bool RoadVehicle::IsStoppedInDepot() const * @param flags operation to perform * @param p1 vehicle ID to be sold * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSellRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -448,6 +452,8 @@ bool RoadVehicle::FindClosestDepot(TileIndex *location, DestinationID *destinati * @param p2 various bitmasked elements * - p2 bit 0-3 - DEPOT_ flags (see vehicle.h) * - p2 bit 8-10 - VLW flag (for mass goto depot) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSendRoadVehToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -468,6 +474,8 @@ CommandCost CmdSendRoadVehToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1 * @param flags operation to perform * @param p1 vehicle ID to turn * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdTurnRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1992,7 +2000,8 @@ Trackdir RoadVehicle::GetVehicleTrackdir() const * - p2 = (bit 0-7) - the new cargo type to refit to * - p2 = (bit 8-15) - the new cargo subtype to refit to * - p2 = (bit 16) - refit only this vehicle - * @return cost of refit or error + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRefitRoadVeh(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/settings.cpp b/src/settings.cpp index 61b58d354..e702476f9 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1410,6 +1410,8 @@ static const SettingDesc *GetSettingDescription(uint index) * @param p1 the index of the setting in the SettingDesc array which identifies it * @param p2 the new value for the setting * The new value is properly clamped to its minimum/maximum when setting + * @param text unused + * @return the cost of this operation or an error * @see _settings */ CommandCost CmdChangeSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) @@ -1458,6 +1460,8 @@ CommandCost CmdChangeSetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uin * @param p1 the index of the setting in the _company_settings array which identifies it * @param p2 the new value for the setting * The new value is properly clamped to its minimum/maximum when setting + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdChangeCompanySetting(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index b612c6ec9..7d2fd7b54 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -735,6 +735,8 @@ bool Ship::Tick() * @param flags type of operation * @param p1 ship type being built (engine) * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -834,6 +836,8 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 * @param flags type of operation * @param p1 vehicle ID to be sold * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSellShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -874,6 +878,8 @@ bool Ship::FindClosestDepot(TileIndex *location, DestinationID *destination, boo * @param p2 various bitmasked elements * - p2 bit 0-3 - DEPOT_ flags (see vehicle.h) * - p2 bit 8-10 - VLW flag (for mass goto depot) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSendShipToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -898,7 +904,8 @@ CommandCost CmdSendShipToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u * - p2 = (bit 0-7) - the new cargo type to refit to (p2 & 0xFF) * - p2 = (bit 8-15) - the new cargo subtype to refit to * - p2 = (bit 16) - refit only this vehicle (ignored) - * @return cost of refit or error + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRefitShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/signs_cmd.cpp b/src/signs_cmd.cpp index 3f734f0bc..5704f4e1c 100644 --- a/src/signs_cmd.cpp +++ b/src/signs_cmd.cpp @@ -32,6 +32,8 @@ SignID _new_sign_id; * @param flags type of operation * @param p1 unused * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -68,7 +70,8 @@ CommandCost CmdPlaceSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 * @param flags type of operation * @param p1 index of the sign to be renamed/removed * @param p2 unused - * @return 0 if succesfull, otherwise CMD_ERROR + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 75ec83561..de7cffa02 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -950,6 +950,8 @@ CommandCost FindJoiningWaypoint(StationID existing_waypoint, StationID waypoint_ * - p2 = (bit 0- 7) - custom station class * - p2 = (bit 8-15) - custom station id * - p2 = (bit 16-31) - station ID to join (NEW_STATION if build new one) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1328,7 +1330,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected * @param p2 various bitstuffed elements * - p2 = bit 0 - if set keep the rail * @param text unused - * @return cost of operation or error + * @return the cost of this operation or an error */ CommandCost CmdRemoveFromRailStation(TileIndex start, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1362,7 +1364,7 @@ CommandCost CmdRemoveFromRailStation(TileIndex start, DoCommandFlag flags, uint3 * @param p2 various bitstuffed elements * - p2 = bit 0 - if set keep the rail * @param text unused - * @return cost of operation or error + * @return the cost of this operation or an error */ CommandCost CmdRemoveFromRailWaypoint(TileIndex start, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1508,6 +1510,8 @@ static RoadStop **FindRoadStopSpot(bool truck_station, Station *st) * bit 2..3: the roadtypes * bit 5: allow stations directly adjacent to other stations. * bit 16..31: station ID to join (NEW_STATION if build new one) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1729,6 +1733,8 @@ static CommandCost RemoveRoadStop(TileIndex tile, DoCommandFlag flags) * @param flags operation to perform * @param p1 not used * @param p2 bit 0: 0 for Bus stops, 1 for truck stops + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRemoveRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1866,6 +1872,8 @@ void UpdateAirportsNoise() * @param p2 various bitstuffed elements * - p2 = (bit 0) - allow airports directly adjacent to other airports. * - p2 = (bit 16-31) - station ID to join (NEW_STATION if build new one) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -2116,6 +2124,8 @@ static const byte _dock_h_chk[4] = { 1, 2, 1, 2 }; * @param flags operation to perform * @param p1 (bit 0) - allow docks directly adjacent to other docks. * @param p2 bit 16-31: station ID to join (NEW_STATION if build new one) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -2929,6 +2939,8 @@ static bool IsUniqueStationName(const char *name) * @param flags operation to perform * @param p1 station ID that is to be renamed * @param p2 unused + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameStation(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp index 742db1cc4..d569b15b9 100644 --- a/src/terraform_cmd.cpp +++ b/src/terraform_cmd.cpp @@ -233,7 +233,8 @@ static CommandCost TerraformTileHeight(TerraformerState *ts, TileIndex tile, int * @param flags for this command type * @param p1 corners to terraform (SLOPE_xxx) * @param p2 direction; eg up (non-zero) or down (zero) - * @return error or cost of terraforming + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -359,7 +360,8 @@ CommandCost CmdTerraformLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uin * @param flags for this command type * @param p1 start tile of area drag * @param p2 height difference; eg raise (+1), lower (-1) or level (0) - * @return error or cost of terraforming + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index 00b96533f..2175b884d 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -58,6 +58,8 @@ static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time * - p2 = (bit 0-15) - Waiting or travelling time as specified by p1 bit 24 if p1 bit 25 is not set, * Travelling time if p1 bit 25 is set. * - p2 = (bit 16-31) - Waiting time if p1 bit 25 is set + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdChangeTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -115,6 +117,9 @@ CommandCost CmdChangeTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1, u * @param flags Operation to perform. * @param p1 Various bitstuffed elements * - p1 = (bit 0-15) - Vehicle with the orders to change. + * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSetVehicleOnTime(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -142,6 +147,8 @@ CommandCost CmdSetVehicleOnTime(TileIndex tile, DoCommandFlag flags, uint32 p1, * @param p2 Various bitstuffed elements * - p2 = (bit 0) - Set to 1 to enable, 0 to disable autofill. * - p2 = (bit 1) - Set to 1 to preserve waiting times in non-destructive mode + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdAutofillTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 246313663..ba40f247e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1592,6 +1592,8 @@ static CommandCost TownCanBePlacedHere(TileIndex tile) * 2 true iff it should be a city * 3..5 town road layout (@see TownLayout) * @param p2 town name parts + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -2304,6 +2306,8 @@ static bool IsUniqueTownName(const char *name) * @param flags type of operation * @param p1 town ID to rename * @param p2 unused + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameTown(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -2576,6 +2580,8 @@ uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t) * @param flags type of operation * @param p1 town to do the action at * @param p2 action to perform, @see _town_action_proc for the list of available actions + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdDoTownAction(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 162f3ae12..280912a63 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -832,6 +832,8 @@ static void AddRearEngineToMultiheadedTrain(Train *v) * @param flags type of operation * @param p1 engine type id * @param p2 bit 1 prevents any free cars from being added to the train + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1087,6 +1089,8 @@ static void NormaliseTrainConsist(Train *v) * - p1 (bit 0 - 15) source vehicle index * - p1 (bit 16 - 31) what wagon to put the source wagon AFTER, XXX - INVALID_VEHICLE to make a new line * @param p2 (bit 0) move all vehicles following the source vehicle + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1440,6 +1444,8 @@ CommandCost CmdMoveRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, u * - p2 = 0: only sell the single dragged wagon/engine (and any belonging rear-engines) * - p2 = 1: sell the vehicle and all vehicles following it in the chain * if the wagon is dragged, don't delete the possibly belonging rear-engine to some front + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSellRailWagon(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -1997,6 +2003,8 @@ static void ReverseTrainDirection(Train *v) * @param flags type of operation * @param p1 train to reverse * @param p2 if true, reverse a unit in a train (needs to be in a depot) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdReverseTrainDirection(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -2055,6 +2063,8 @@ CommandCost CmdReverseTrainDirection(TileIndex tile, DoCommandFlag flags, uint32 * @param flags type of operation * @param p1 train to ignore the red signal * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdForceTrainProceed(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -2070,11 +2080,12 @@ CommandCost CmdForceTrainProceed(TileIndex tile, DoCommandFlag flags, uint32 p1, * @param tile unused * @param flags type of operation * @param p1 vehicle ID of the train to refit - * param p2 various bitstuffed elements + * @param p2 various bitstuffed elements * - p2 = (bit 0-7) - the new cargo type to refit to * - p2 = (bit 8-15) - the new cargo subtype to refit to * - p2 = (bit 16) - refit only this vehicle - * @return cost of refit or error + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdRefitRailVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -2277,6 +2288,8 @@ bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bo * @param p2 various bitmasked elements * - p2 bit 0-3 - DEPOT_ flags (see vehicle.h) * - p2 bit 8-10 - VLW flag (for mass goto depot) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSendTrainToDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 962b486ae..42ca04b82 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -328,6 +328,8 @@ void GenerateTrees() * @param flags type of operation * @param p1 tree type, -1 means random. * @param p2 end tile of area-drag + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdPlantTree(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index c705e5a70..24f9eeb59 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -183,6 +183,8 @@ bool CheckBridge_Stuff(BridgeType bridge_type, uint bridge_len, DoCommandFlag fl * - p2 = (bit 0- 7) - bridge type (hi bh) * - p2 = (bit 8-14) - rail type or road types. * - p2 = (bit 15-16) - transport type. + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -452,6 +454,8 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u * @param flags type of operation * @param p1 railtype or roadtypes. bit 9 set means road tunnel * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp index 4fa528b40..98963a56f 100644 --- a/src/unmovable_cmd.cpp +++ b/src/unmovable_cmd.cpp @@ -106,6 +106,8 @@ extern CommandCost CheckFlatLandBelow(TileIndex tile, uint w, uint h, DoCommandF * @param flags type of operation * @param p1 unused * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildCompanyHQ(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -139,7 +141,8 @@ CommandCost CmdBuildCompanyHQ(TileIndex tile, DoCommandFlag flags, uint32 p1, ui * @param flags for this command type * @param p1 unused * @param p2 unused - * @return error of cost of operation + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdPurchaseLandArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -166,7 +169,8 @@ CommandCost CmdPurchaseLandArea(TileIndex tile, DoCommandFlag flags, uint32 p1, * @param flags for this command type * @param p1 unused * @param p2 unused - * @return error or cost of operation + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdSellLandArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp index 3dd58ec6b..8e4af9a42 100644 --- a/src/vehicle_cmd.cpp +++ b/src/vehicle_cmd.cpp @@ -65,7 +65,8 @@ const uint32 _send_to_depot_proc_table[] = { * @param flags type of operation * @param p1 vehicle to start/stop * @param p2 bit 0: Shall the start/stop newgrf callback be evaluated (only valid with DC_AUTOREPLACE for network safety) - * @return result of operation. Nothing if everything went well + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -122,6 +123,8 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, * - bit 5 false = start vehicles, true = stop vehicles * - bit 6 if set, then it's a vehicle list window, not a depot and Tile is ignored in this case * - bit 8-11 Vehicle List Window type (ignored unless bit 1 is set) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdMassStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -172,6 +175,8 @@ CommandCost CmdMassStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 * @param flags type of operation * @param p1 Vehicle type * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdDepotSellAllVehicles(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -201,6 +206,8 @@ CommandCost CmdDepotSellAllVehicles(TileIndex tile, DoCommandFlag flags, uint32 * @param flags type of operation * @param p1 Type of vehicle * @param p2 If bit 0 is set, then either replace all or nothing (instead of replacing until money runs out) + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdDepotMassAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -314,6 +321,8 @@ static void CloneVehicleName(const Vehicle *src, Vehicle *dst) * @param flags type of operation * @param p1 the original vehicle's index * @param p2 1 = shared orders, else copied orders + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -527,6 +536,8 @@ CommandCost SendAllVehiclesToDepot(VehicleType type, DoCommandFlag flags, bool s * @param flags type of operation * @param p1 vehicle ID to name * @param p2 unused + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -556,6 +567,8 @@ CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uin * @param flags type of operation * @param p1 vehicle ID that is being service-interval-changed * @param p2 new service interval + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdChangeServiceInt(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 3857536a4..147df8909 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -106,6 +106,8 @@ static void MarkCanalsAndRiversAroundDirty(TileIndex tile) * @param flags type of operation * @param p1 bit 0 depot orientation (Axis) * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildShipDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -270,6 +272,8 @@ static CommandCost RemoveShiplift(TileIndex tile, DoCommandFlag flags) * @param flags type of operation * @param p1 unused * @param p2 unused + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildLock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -287,6 +291,8 @@ CommandCost CmdBuildLock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 * @param flags type of operation * @param p1 start tile of stretch-dragging * @param p2 specifies canal (0), water (1) or river (2); last two can only be built in scenario editor + * @param text unused + * @return the cost of this operation or an error */ CommandCost CmdBuildCanal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index 131244f79..792649491 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -210,7 +210,7 @@ extern bool CanExpandRailStation(const BaseStation *st, TileArea &new_ta, Axis a * - p2 = (bit 0- 7) - custom station class * - p2 = (bit 8-15) - custom station id * @param text unused - * @return cost of operation or error + * @return the cost of this operation or an error */ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -330,7 +330,7 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint * @param p1 unused * @param p2 unused * @param text unused - * @return cost of operation or error + * @return the cost of this operation or an error */ CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { @@ -427,8 +427,8 @@ static bool IsUniqueWaypointName(const char *name) * @param flags type of operation * @param p1 id of waypoint * @param p2 unused - * @param text the new name of the waypoint or an empty string when resetting to the default - * @return cost of operation or error + * @param text the new name or an empty string when resetting to the default + * @return the cost of this operation or an error */ CommandCost CmdRenameWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) { |