summaryrefslogtreecommitdiff
path: root/src/tunnelbridge.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-04-06 07:46:15 +0100
committerMichael Lutz <michi@icosahedron.de>2019-05-01 21:36:27 +0200
commitc02ef3e4564b7b54d49f0827d2d7625cbc38f335 (patch)
tree1c0ee62b6ce55124b247daaafa42300bfaa932e7 /src/tunnelbridge.h
parent21edf67f89c60351d5a0d84625455aa296b6b950 (diff)
downloadopenttd-c02ef3e4564b7b54d49f0827d2d7625cbc38f335.tar.xz
Feature: Add NotRoadTypes (NRT)
Diffstat (limited to 'src/tunnelbridge.h')
-rw-r--r--src/tunnelbridge.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tunnelbridge.h b/src/tunnelbridge.h
index 0a2c2293d..93603acb5 100644
--- a/src/tunnelbridge.h
+++ b/src/tunnelbridge.h
@@ -13,6 +13,7 @@
#define TUNNELBRIDGE_H
#include "map_func.h"
+#include "tile_map.h"
void MarkBridgeDirty(TileIndex begin, TileIndex end, DiagDirection direction, uint bridge_height);
void MarkBridgeDirty(TileIndex tile);
@@ -33,6 +34,18 @@ static inline uint GetTunnelBridgeLength(TileIndex begin, TileIndex end)
return abs(x2 + y2 - x1 - y1) - 1;
}
+/**
+ * Sets the ownership of the bridge/tunnel ramps
+ * @param begin The begin of the tunnel or bridge.
+ * @param end The end of the tunnel or bridge.
+ * @param owner The new owner to set
+ */
+static inline void SetTunnelBridgeOwner(TileIndex begin, TileIndex end, Owner owner)
+{
+ SetTileOwner(begin, owner);
+ SetTileOwner(end, owner);
+}
+
extern TileIndex _build_tunnel_endtile;
#endif /* TUNNELBRIDGE_H */