summaryrefslogtreecommitdiff
path: root/direction.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-08 06:55:33 +0000
committertron <tron@openttd.org>2006-03-08 06:55:33 +0000
commitfbe939b31f8c7ea4e6e47d6d903625dd25c5e856 (patch)
tree5dc0e72ac096a8404e81f92e3e1480cb29c96061 /direction.h
parent313754011d04ad4913bf4028b78d75ceb359e9b3 (diff)
downloadopenttd-fbe939b31f8c7ea4e6e47d6d903625dd25c5e856.tar.xz
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
Diffstat (limited to 'direction.h')
-rw-r--r--direction.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/direction.h b/direction.h
index fb99071f3..e29fb3c49 100644
--- a/direction.h
+++ b/direction.h
@@ -17,6 +17,11 @@ typedef enum Direction {
INVALID_DIR = 0xFF,
} Direction;
+static inline Direction ReverseDir(Direction d)
+{
+ return (Direction)(4 ^ d);
+}
+
/* Direction commonly used as the direction of entering and leaving tiles, 4-way */
typedef enum DiagDirection {