(svn r4280) -Codechange: Add and make use of map accessors concerning railway waypoints
This commit is contained in:
14
rail_map.h
14
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
|
||||
|
||||
Reference in New Issue
Block a user