(svn r13929) -Codechange [YAPP]: Reserving and unreserving of single tracks is now possible. (michi_cc)

This commit is contained in:
rubidium
2008-08-02 22:48:01 +00:00
parent 2bb8825538
commit f6555cf6f8
3 changed files with 166 additions and 1 deletions

View File

@@ -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 */