diff options
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/station.cpp b/src/station.cpp index ec8be930a..fc75d5e97 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -502,6 +502,13 @@ bool RoadStop::HasFreeBay() const return GB(status, 0, MAX_BAY_COUNT) != 0; } +/** Checks whether the given bay is free in this road stop */ +bool RoadStop::IsFreeBay(uint nr) const +{ + assert(nr < MAX_BAY_COUNT); + return HASBIT(status, nr); +} + /** * Allocates a bay * @return the allocated bay number @@ -520,6 +527,16 @@ uint RoadStop::AllocateBay() } /** + * Allocates a bay in a drive-through road stop + * @param nr the number of the bay to allocate + */ +void RoadStop::AllocateDriveThroughBay(uint nr) +{ + assert(nr < MAX_BAY_COUNT); + CLRBIT(status, nr); +} + +/** * Frees the given bay * @param nr the number of the bay to free */ |