summaryrefslogtreecommitdiff
path: root/rail.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-05 12:34:55 +0000
committertron <tron@openttd.org>2006-03-05 12:34:55 +0000
commit586388c9f17a39b4d3a7e7706fe6b40191a922b4 (patch)
tree113bde0444e78799f198050654eba4d96e28702e /rail.h
parentf007ad282c60cc1b2529b44c3e0b4c1bdab3d685 (diff)
downloadopenttd-586388c9f17a39b4d3a7e7706fe6b40191a922b4.tar.xz
(svn r3767) Move all direction related enums and functions to a separate header
Diffstat (limited to 'rail.h')
-rw-r--r--rail.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/rail.h b/rail.h
index cf75f6842..8bda90441 100644
--- a/rail.h
+++ b/rail.h
@@ -5,6 +5,7 @@
#ifndef RAIL_H
#define RAIL_H
+#include "direction.h"
#include "tile.h"
/*
@@ -464,21 +465,6 @@ static inline TrackdirBits TrackdirCrossesTrackdirs(Trackdir trackdir) {
return _track_crosses_trackdirs[TrackdirToTrack(trackdir)];
}
-/**
- * Maps a (4-way) direction to the reverse.
- */
-static inline DiagDirection ReverseDiagdir(DiagDirection diagdir) {
- extern const DiagDirection _reverse_diagdir[DIAGDIR_END];
- return _reverse_diagdir[diagdir];
-}
-
-/**
- * Maps a (8-way) direction to a (4-way) DiagDirection
- */
-static inline DiagDirection DirToDiagdir(Direction dir) {
- assert(dir < DIR_END);
- return (DiagDirection)(dir >> 1);
-}
/* Checks if a given Track is diagonal */
static inline bool IsDiagonalTrack(Track track) { return (track == TRACK_X) || (track == TRACK_Y); }