diff options
author | tron <tron@openttd.org> | 2006-03-05 12:34:55 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-05 12:34:55 +0000 |
commit | 586388c9f17a39b4d3a7e7706fe6b40191a922b4 (patch) | |
tree | 113bde0444e78799f198050654eba4d96e28702e /rail.h | |
parent | f007ad282c60cc1b2529b44c3e0b4c1bdab3d685 (diff) | |
download | openttd-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.h | 16 |
1 files changed, 1 insertions, 15 deletions
@@ -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); } |