12 #ifndef TUNNELBRIDGE_MAP_H 13 #define TUNNELBRIDGE_MAP_H 71 SB(
_me[t].m7, 5, 1, snow_or_desert);
110 SB(
_m[t].m5, 4, 1, b ? 1 : 0);
TileIndex GetOtherBridgeEnd(TileIndex tile)
Starting at one bridge end finds the other bridge end.
static TransportType GetTunnelBridgeTransportType(TileIndex t)
Tunnel: Get the transport type of the tunnel (road or rail) Bridge: Get the transport type of the bri...
static void SetTunnelBridgeReservation(TileIndex t, bool b)
Set the reservation state of the rail tunnel/bridge.
Tile * _m
Tiles of the map.
static void SetTunnelBridgeSnowOrDesert(TileIndex t, bool snow_or_desert)
Tunnel: Places this tunnel entrance in a snowy or desert area, or takes it out of there...
static TrackBits DiagDirToDiagTrackBits(DiagDirection diagdir)
Maps a (4-way) direction to the diagonal track bits incidating with that diagdir. ...
static T SB(T &x, const uint8 s, const uint8 n, const U d)
Set n bits in x starting at bit s to d.
TrackBits
Bitfield corresponding to Track.
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a give tiletype.
TileExtended * _me
Extended Tiles of the map.
Map accessor functions for bridges.
DiagDirection
Enumeration for diagonal directions.
static DiagDirection GetTunnelBridgeDirection(TileIndex t)
Get the direction pointing to the other end.
static TileIndex GetOtherTunnelBridgeEnd(TileIndex t)
Determines type of the wormhole and returns its other end.
static bool HasTunnelBridgeSnowOrDesert(TileIndex t)
Tunnel: Is this tunnel entrance in a snowy or desert area? Bridge: Does the bridge ramp lie in a snow...
Tunnel entry/exit and bridge heads.
static bool HasTunnelBridgeReservation(TileIndex t)
Get the reservation state of the rail tunnel/bridge.
uint32 TileIndex
The index/ID of a Tile.
TransportType
Available types of transport.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
TileIndex GetOtherTunnelEnd(TileIndex tile)
Gets the other end of the tunnel.
static TrackBits GetTunnelBridgeReservationTrackBits(TileIndex t)
Get the reserved track bits for a rail tunnel/bridge.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
Map accessors for tunnels.
static bool IsTunnel(TileIndex t)
Is this a tunnel (entrance)?