diff options
author | celestar <celestar@openttd.org> | 2006-04-05 05:22:42 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2006-04-05 05:22:42 +0000 |
commit | 8362990f8c6d02791b5edcadf09e4a37150e1144 (patch) | |
tree | ea719df2c077a18b54477935bc5fc8d2b7d84445 /rail_map.h | |
parent | 99a6b9b8f239b43924282ea6b1775ee3850ca551 (diff) | |
download | openttd-8362990f8c6d02791b5edcadf09e4a37150e1144.tar.xz |
(svn r4280) -Codechange: Add and make use of map accessors concerning railway waypoints
Diffstat (limited to 'rail_map.h')
-rw-r--r-- | rail_map.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rail_map.h b/rail_map.h index a74982cf1..539b31d64 100644 --- a/rail_map.h +++ b/rail_map.h @@ -124,12 +124,26 @@ static inline DiagDirection GetRailDepotDirection(TileIndex t) return (DiagDirection)GB(_m[t].m5, 0, 2); } +static inline TrackBits GetRailWaypointTrack(TileIndex t) +{ + return HASBIT(_m[t].m5, 0) ? TRACK_Y : TRACK_X; +} static inline TrackBits GetRailWaypointBits(TileIndex t) { return _m[t].m5 & 1 ? TRACK_BIT_Y : TRACK_BIT_X; } +static inline void SetCustomWaypointSprite(TileIndex t) +{ + SETBIT(_m[t].m3, 4); +} + +static inline void ClearCustomWaypointSprite(TileIndex t) +{ + CLRBIT(_m[t].m3, 4); +} + typedef enum SignalType { SIGTYPE_NORMAL = 0, // normal signal |