From 28a57ee3f8b5fabb8d6994065bc1334d3ae4e566 Mon Sep 17 00:00:00 2001 From: terkhen Date: Sun, 25 Apr 2010 13:44:49 +0000 Subject: (svn r19716) -Documentation: Add comments for lock building and removal functions. --- src/water_cmd.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 8a0046036..d6ce6c482 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -190,7 +190,12 @@ static CommandCost RemoveShipDepot(TileIndex tile, DoCommandFlag flags) return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_DEPOT_SHIP]); } -/** build a lock */ +/** Builds a lock. + * @param tile Central tile of the lock. + * @param dir Uphill direction. + * @param flags Operation to perform. + * @return The cost in case of success, or an error code if it failed. + */ static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag flags) { /* middle tile */ @@ -234,6 +239,11 @@ static CommandCost DoBuildLock(TileIndex tile, DiagDirection dir, DoCommandFlag return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_WATER] * 22 >> 3); } +/** Remove a lock. + * @param tile Central tile of the lock. + * @param flags Operation to perform. + * @return The cost in case of success, or an error code if it failed. + */ static CommandCost RemoveLock(TileIndex tile, DoCommandFlag flags) { if (GetTileOwner(tile) != OWNER_NONE) { @@ -262,7 +272,7 @@ static CommandCost RemoveLock(TileIndex tile, DoCommandFlag flags) return CommandCost(EXPENSES_CONSTRUCTION, _price[PR_CLEAR_WATER] * 2); } -/** Builds a lock (ship-lift) +/** Builds a lock. * @param tile tile where to place the lock * @param flags type of operation * @param p1 unused -- cgit v1.2.3-70-g09d2