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 | 0e8f006dc18e8faff93382fe8044d046c36e86f4 (patch) | |
tree | 1a15ba2c92fafbb76de3d76a96583953c41b088b /src/station.cpp | |
parent | 39b73119cabcaa793856b441461fd77e37c491ef (diff) | |
download | openttd-0e8f006dc18e8faff93382fe8044d046c36e86f4.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 */ |