summaryrefslogtreecommitdiff
path: root/src/water_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/water_map.h')
-rw-r--r--src/water_map.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/water_map.h b/src/water_map.h
index 55e2730a5..83c3a055f 100644
--- a/src/water_map.h
+++ b/src/water_map.h
@@ -198,6 +198,19 @@ static inline DiagDirection GetShipDepotDirection(TileIndex t)
}
/**
+ * Get the most northern tile of a ship depot.
+ * @param tile One of the tiles of the ship depot.
+ * @return The northern tile of the depot.
+ */
+static TileIndex GetShipDepotNorthTile(TileIndex t)
+{
+ assert(IsShipDepot(t));
+ TileIndex tile2 = GetOtherShipDepotTile(t);
+
+ return t < tile2 ? t : tile2;
+}
+
+/**
* Is it a water lock tile?
* @param t Water tile to query.
* @return \c true if it is a water lock tile.