summaryrefslogtreecommitdiff
path: root/src/rail.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-13 20:57:02 +0000
committerrubidium <rubidium@openttd.org>2007-02-13 20:57:02 +0000
commitfd645aa845388e379cf6cf78c20187a1edc42132 (patch)
treeca4c0d8b0a30187508a25fc036c1f853d4ed82c4 /src/rail.h
parent72e74c29d45bc81c4d7a5ba84e42b26bf11a4ffb (diff)
downloadopenttd-fd645aa845388e379cf6cf78c20187a1edc42132.tar.xz
(svn r8712) -Codechange/cleanup: replace 'magic' constants with enums, use proper types instead of byte, uint etc., give variables more descriptive names and add some comments.
Diffstat (limited to 'src/rail.h')
-rw-r--r--src/rail.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/rail.h b/src/rail.h
index 7c59711c9..ae651ebe5 100644
--- a/src/rail.h
+++ b/src/rail.h
@@ -106,7 +106,11 @@ static inline TrackBits AxisToTrackBits(Axis a)
/** These are a combination of tracks and directions. Values are 0-5 in one
- * direction (corresponding to the Track enum) and 8-13 in the other direction. */
+ * direction (corresponding to the Track enum) and 8-13 in the other direction.
+ * 6, 7, 14 and 15 are used to encode the reversing of road vehicles. Those
+ * reversing track dirs are not considered to be 'valid' except in a small
+ * corner in the road vehicle controller.
+ */
typedef enum Trackdirs {
TRACKDIR_BEGIN = 0,
TRACKDIR_X_NE = 0,
@@ -115,14 +119,16 @@ typedef enum Trackdirs {
TRACKDIR_LOWER_E = 3,
TRACKDIR_LEFT_S = 4,
TRACKDIR_RIGHT_S = 5,
- /* Note the two missing values here. This enables trackdir -> track
- * conversion by doing (trackdir & 7) */
+ TRACKDIR_RVREV_NE = 6,
+ TRACKDIR_RVREV_SE = 7,
TRACKDIR_X_SW = 8,
TRACKDIR_Y_NW = 9,
TRACKDIR_UPPER_W = 10,
TRACKDIR_LOWER_W = 11,
TRACKDIR_LEFT_N = 12,
TRACKDIR_RIGHT_N = 13,
+ TRACKDIR_RVREV_SW = 14,
+ TRACKDIR_RVREV_NW = 15,
TRACKDIR_END,
INVALID_TRACKDIR = 0xFF,
} Trackdir;