Initial support for NewGRF road stops (bus and lorry stops)
This commit is contained in:
@@ -605,6 +605,42 @@ static inline uint GetCustomStationSpecIndex(TileIndex t)
|
||||
return _m[t].m4;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is there a custom road stop spec on this tile?
|
||||
* @param t Tile to query
|
||||
* @pre IsAnyRoadStopTile(t)
|
||||
* @return True if this station is part of a newgrf station.
|
||||
*/
|
||||
static inline bool IsCustomRoadStopSpecIndex(TileIndex t)
|
||||
{
|
||||
assert_tile(IsAnyRoadStopTile(t), t);
|
||||
return GB(_me[t].m8, 0, 6) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the custom road stop spec for this tile.
|
||||
* @param t Tile to set the stationspec of.
|
||||
* @param specindex The new spec.
|
||||
* @pre IsAnyRoadStopTile(t)
|
||||
*/
|
||||
static inline void SetCustomRoadStopSpecIndex(TileIndex t, byte specindex)
|
||||
{
|
||||
assert_tile(IsAnyRoadStopTile(t), t);
|
||||
SB(_me[t].m8, 0, 6, specindex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the custom road stop spec for this tile.
|
||||
* @param t Tile to query
|
||||
* @pre IsAnyRoadStopTile(t)
|
||||
* @return The custom station spec of this tile.
|
||||
*/
|
||||
static inline uint GetCustomRoadStopSpecIndex(TileIndex t)
|
||||
{
|
||||
assert_tile(IsAnyRoadStopTile(t), t);
|
||||
return GB(_me[t].m8, 0, 6);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the random bits for a station tile.
|
||||
* @param t Tile to set random bits for.
|
||||
|
Reference in New Issue
Block a user