summaryrefslogtreecommitdiff
path: root/src/road_func.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-03-22 10:56:08 +0000
committerrubidium <rubidium@openttd.org>2008-03-22 10:56:08 +0000
commitf0538b4b622a80a93d27e7dc9f1cb05620eebb90 (patch)
treec70cc515d076c09e820b06aa4af1dbdb1fe37307 /src/road_func.h
parent5d747802f28d6fd6ad2527aa04f418ce09c00f6c (diff)
downloadopenttd-f0538b4b622a80a93d27e7dc9f1cb05620eebb90.tar.xz
(svn r12390) -Fix [FS#1851]: trams failing to turn on bridge heads/tunnel entrances.
Diffstat (limited to 'src/road_func.h')
-rw-r--r--src/road_func.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/road_func.h b/src/road_func.h
index 3139ea022..46269f29d 100644
--- a/src/road_func.h
+++ b/src/road_func.h
@@ -115,6 +115,20 @@ static inline RoadBits DiagDirToRoadBits(DiagDirection d)
}
/**
+ * Create the road-part which belongs to the given Axis
+ *
+ * This function returns a RoadBits value which belongs to
+ * the given Axis.
+ *
+ * @param a The Axis
+ * @return The result RoadBits which the selected road-part set
+ */
+static inline RoadBits AxisToRoadBits(Axis a)
+{
+ return a == AXIS_X ? ROAD_X : ROAD_Y;
+}
+
+/**
* Finds out, whether given player has all given RoadTypes available
* @param PlayerID ID of player
* @param rts RoadTypes to test