summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-04-25 13:44:49 +0000
committerterkhen <terkhen@openttd.org>2010-04-25 13:44:49 +0000
commit28a57ee3f8b5fabb8d6994065bc1334d3ae4e566 (patch)
tree0261ca1979c53bf8a4f04a9ea537bf44d7ffc188 /src
parent1d60eac1686167b508bff2acb655364c5598ac86 (diff)
downloadopenttd-28a57ee3f8b5fabb8d6994065bc1334d3ae4e566.tar.xz
(svn r19716) -Documentation: Add comments for lock building and removal functions.
Diffstat (limited to 'src')
-rw-r--r--src/water_cmd.cpp14
1 files changed, 12 insertions, 2 deletions
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