(svn r4280) -Codechange: Add and make use of map accessors concerning railway waypoints

This commit is contained in:
celestar
2006-04-05 05:22:42 +00:00
parent 99a6b9b8f2
commit 8362990f8c
2 changed files with 17 additions and 5 deletions

View File

@@ -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