diff options
author | rubidium <rubidium@openttd.org> | 2007-02-14 16:37:16 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-02-14 16:37:16 +0000 |
commit | a2999dadc91fd95fae93c3063d9db7c99245c7ad (patch) | |
tree | 1a15ba2c92fafbb76de3d76a96583953c41b088b /src/station.cpp | |
parent | ca310e5a2684e8a3f905ba59219fc5c24c089f78 (diff) | |
download | openttd-a2999dadc91fd95fae93c3063d9db7c99245c7ad.tar.xz |
(svn r8735) -Feature: drive-through road stops made possible by the hard work of mart3p.
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 */ |