diff options
author | tron <tron@openttd.org> | 2006-07-22 08:59:52 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-07-22 08:59:52 +0000 |
commit | 7ec704564a35940442d5ad52b39c850465685f31 (patch) | |
tree | 3cd7af50d593f93b4699b58b3293d63c0a9c7eef /rail_map.h | |
parent | 475f2767691da03e22cdcd6eb7bfd305c093166c (diff) | |
download | openttd-7ec704564a35940442d5ad52b39c850465685f31.tar.xz |
(svn r5582) Add and use AxisToTrack{Bits,}()
Diffstat (limited to 'rail_map.h')
-rw-r--r-- | rail_map.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rail_map.h b/rail_map.h index 23aba71f6..df897c91d 100644 --- a/rail_map.h +++ b/rail_map.h @@ -126,20 +126,20 @@ static inline DiagDirection GetRailDepotDirection(TileIndex t) return (DiagDirection)GB(_m[t].m5, 0, 2); } -static inline Track GetRailWaypointTrack(TileIndex t) + +static inline Axis GetWaypointAxis(TileIndex t) { - return HASBIT(_m[t].m5, 0) ? TRACK_Y : TRACK_X; + return HASBIT(_m[t].m5, 0) ? AXIS_Y : AXIS_X; } -static inline TrackBits GetRailWaypointBits(TileIndex t) +static inline Track GetRailWaypointTrack(TileIndex t) { - return _m[t].m5 & 1 ? TRACK_BIT_Y : TRACK_BIT_X; + return AxisToTrack(GetWaypointAxis(t)); } - -static inline Axis GetWaypointAxis(TileIndex t) +static inline TrackBits GetRailWaypointBits(TileIndex t) { - return HASBIT(_m[t].m5, 0) ? AXIS_Y : AXIS_X; + return TrackToTrackBits(GetRailWaypointTrack(t)); } |