(svn r13929) -Codechange [YAPP]: Reserving and unreserving of single tracks is now possible. (michi_cc)
This commit is contained in:
18
src/pbs.h
18
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 */
|
||||
|
Reference in New Issue
Block a user