summaryrefslogtreecommitdiff
path: root/src/road_func.h
diff options
context:
space:
mode:
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