summaryrefslogtreecommitdiff
path: root/src/track_func.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/track_func.h')
-rw-r--r--src/track_func.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/track_func.h b/src/track_func.h
index 0cd3dcf31..d34d90f88 100644
--- a/src/track_func.h
+++ b/src/track_func.h
@@ -28,6 +28,17 @@
#define FOR_EACH_SET_TRACK(var, track_bits) FOR_EACH_SET_BIT_EX(Track, var, TrackBits, track_bits)
/**
+ * Iterate through each set Trackdir in a TrackdirBits value.
+ * For more informations see FOR_EACH_SET_BIT_EX.
+ *
+ * @param var Loop index variable that stores fallowing set track. Must be of type Track.
+ * @param trackdir_bits The value to iterate through (any expression).
+ *
+ * @see FOR_EACH_SET_BIT_EX
+ */
+#define FOR_EACH_SET_TRACKDIR(var, trackdir_bits) FOR_EACH_SET_BIT_EX(Trackdir, var, TrackdirBits, trackdir_bits)
+
+/**
* Convert an Axis to the corresponding Track
* AXIS_X -> TRACK_X
* AXIS_Y -> TRACK_Y