summaryrefslogtreecommitdiff
path: root/src/pbs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pbs.h')
-rw-r--r--src/pbs.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pbs.h b/src/pbs.h
index 51a9ba201..4103f1ebf 100644
--- a/src/pbs.h
+++ b/src/pbs.h
@@ -6,8 +6,26 @@
#define PBS_H
#include "tile_type.h"
+#include "direction_type.h"
#include "track_type.h"
TrackBits GetReservedTrackbits(TileIndex t);
+void SetRailwayStationPlatformReservation(TileIndex start, DiagDirection dir, bool b);
+
+bool TryReserveRailTrack(TileIndex tile, Track t);
+void UnreserveRailTrack(TileIndex tile, Track t);
+
+/**
+ * Check whether some of tracks is reserved on a tile.
+ *
+ * @param tile the tile
+ * @param tracks the tracks to test
+ * @return true if at least on of tracks is reserved
+ */
+static inline bool HasReservedTracks(TileIndex tile, TrackBits tracks)
+{
+ return (GetReservedTrackbits(tile) & tracks) != TRACK_BIT_NONE;
+}
+
#endif /* PBS_H */