summaryrefslogtreecommitdiff
path: root/src/station.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-06-23 21:12:48 +0000
committersmatz <smatz@openttd.org>2009-06-23 21:12:48 +0000
commit8bb88e5f7236738f2101b96a3d23a4252464a615 (patch)
tree57c754d10e6fdf5f338ee7ef890dafd0e7c71343 /src/station.cpp
parent64455d14eab7bc58f5b6714a692cfc6acd23a224 (diff)
downloadopenttd-8bb88e5f7236738f2101b96a3d23a4252464a615.tar.xz
(svn r16639) -Codechange: enumify RoadStop::status, move definition of short functions to header file
Diffstat (limited to 'src/station.cpp')
-rw-r--r--src/station.cpp63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/station.cpp b/src/station.cpp
index 04a535e6e..d55618751 100644
--- a/src/station.cpp
+++ b/src/station.cpp
@@ -465,69 +465,6 @@ RoadStop::~RoadStop()
assert(num_vehicles == 0);
}
-/** Checks whether there is a free bay in this road stop */
-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
- * @pre this->HasFreeBay()
- */
-uint RoadStop::AllocateBay()
-{
- assert(HasFreeBay());
-
- /* Find the first free bay. If the bit is set, the bay is free. */
- uint bay_nr = 0;
- while (!HasBit(status, bay_nr)) bay_nr++;
-
- ClrBit(status, bay_nr);
- return bay_nr;
-}
-
-/**
- * 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
- */
-void RoadStop::FreeBay(uint nr)
-{
- assert(nr < MAX_BAY_COUNT);
- SetBit(status, nr);
-}
-
-
-/** Checks whether the entrance of the road stop is occupied by a vehicle */
-bool RoadStop::IsEntranceBusy() const
-{
- return HasBit(status, 7);
-}
-
-/** Makes an entrance occupied or free */
-void RoadStop::SetEntranceBusy(bool busy)
-{
- SB(status, 7, 1, busy);
-}
-
/**
* Get the next road stop accessible by this vehicle.
* @param v the vehicle to get the next road stop for.