summaryrefslogtreecommitdiff
path: root/tile.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-05 12:22:20 +0000
committertron <tron@openttd.org>2006-03-05 12:22:20 +0000
commitf007ad282c60cc1b2529b44c3e0b4c1bdab3d685 (patch)
treec60df54ca959b2f8cbb49252a82727e5496e5f5f /tile.h
parentebec656110fc5f868421f76a6acbc800c5dc77c6 (diff)
downloadopenttd-f007ad282c60cc1b2529b44c3e0b4c1bdab3d685.tar.xz
(svn r3766) Add a function to get the RoadBits from an arbitrary tile
Diffstat (limited to 'tile.h')
-rw-r--r--tile.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tile.h b/tile.h
index bb5698f4c..aacda662a 100644
--- a/tile.h
+++ b/tile.h
@@ -44,6 +44,12 @@ typedef enum DiagonalDirections {
INVALID_DIAGDIR = 0xFF,
} DiagDirection;
+static inline DiagDirection ReverseDiagDir(DiagDirection d)
+{
+ return 2 ^ d;
+}
+
+
/* the 2 axis */
typedef enum Axis {
AXIS_X = 0,