Allow drive-through road stops to be one-way

This commit is contained in:
Jonathan G Rennison
2020-10-24 20:39:15 +01:00
parent 3fa92f5d8e
commit 3a75f13874
16 changed files with 333 additions and 50 deletions

View File

@@ -235,6 +235,29 @@ static inline bool IsDriveThroughStopTile(TileIndex t)
return IsRoadStopTile(t) && GetStationGfx(t) >= GFX_TRUCK_BUS_DRIVETHROUGH_OFFSET;
}
/**
* Gets the disallowed directions
* @param t the tile to get the directions from
* @return the disallowed directions
*/
static inline DisallowedRoadDirections GetDriveThroughStopDisallowedRoadDirections(TileIndex t)
{
assert_tile(IsDriveThroughStopTile(t), t);
return (DisallowedRoadDirections)GB(_m[t].m3, 0, 2);
}
/**
* Sets the disallowed directions
* @param t the tile to set the directions for
* @param drd the disallowed directions
*/
static inline void SetDriveThroughStopDisallowedRoadDirections(TileIndex t, DisallowedRoadDirections drd)
{
assert_tile(IsDriveThroughStopTile(t), t);
assert(drd < DRD_END);
SB(_m[t].m3, 0, 2, drd);
}
/**
* Get the station graphics of this airport tile
* @param t the tile to query