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
commitedd384c12136a8f0446ea7645a48688257dbfd9b (patch)
treec70cc515d076c09e820b06aa4af1dbdb1fe37307 /src/road_func.h
parentfedb33d69776943b00853e4c2769daf328ff708d (diff)
downloadopenttd-edd384c12136a8f0446ea7645a48688257dbfd9b.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