src/rail.h
changeset 8199 00ee9637c0a0
parent 8097 68eefbb4ff46
child 8226 c66a40c8e9bf
--- a/src/rail.h	Tue Oct 09 20:53:25 2007 +0000
+++ b/src/rail.h	Tue Oct 09 21:11:23 2007 +0000
@@ -120,6 +120,19 @@
 	return TrackToTrackBits(AxisToTrack(a));
 }
 
+/**
+ * Returns a single horizontal/vertical trackbit, that is in a specific tile corner.
+ *
+ * @param corner The corner of a tile.
+ * @return The TrackBits of the track in the corner.
+ */
+static inline TrackBits CornerToTrackBits(Corner corner)
+{
+	extern const TrackBits _corner_to_trackbits[];
+	assert(IsValidCorner(corner));
+	return _corner_to_trackbits[corner];
+}
+
 
 /**
  * Enumeration for tracks and directions.