OpenTTD Source
1.11.0-beta2
|
Go to the documentation of this file.
10 #ifndef TUNNELBRIDGE_MAP_H
11 #define TUNNELBRIDGE_MAP_H
69 SB(
_me[t].m7, 5, 1, snow_or_desert);
108 SB(
_m[t].m5, 4, 1, b ? 1 : 0);
uint32 TileIndex
The index/ID of a Tile.
@ TRACK_BIT_NONE
No track.
TileIndex GetOtherBridgeEnd(TileIndex tile)
Starting at one bridge end finds the other bridge end.
static uint GB(const T x, const uint8 s, const uint8 n)
Fetch n bits from x, started at bit s.
@ TRANSPORT_RAIL
Transport by train.
static bool HasBit(const T x, const uint8 y)
Checks if a bit in a value is set.
TileExtended * _me
Extended Tiles of the map.
TransportType
Available types of transport.
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.
@ MP_TUNNELBRIDGE
Tunnel entry/exit and bridge heads.
DiagDirection
Enumeration for diagonal directions.
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...
static bool IsTileType(TileIndex tile, TileType type)
Checks if a tile is a given tiletype.
static DiagDirection GetTunnelBridgeDirection(TileIndex t)
Get the direction pointing to the other end.
static TrackBits GetTunnelBridgeReservationTrackBits(TileIndex t)
Get the reserved track bits for a rail tunnel/bridge.
static bool IsTunnel(TileIndex t)
Is this a tunnel (entrance)?
static bool HasTunnelBridgeReservation(TileIndex t)
Get the reservation state of the rail tunnel/bridge.
static void SetTunnelBridgeReservation(TileIndex t, bool b)
Set the reservation state of the rail tunnel/bridge.
TileIndex GetOtherTunnelEnd(TileIndex tile)
Gets the other end of the tunnel.
TrackBits
Bitfield corresponding to Track.
static TrackBits DiagDirToDiagTrackBits(DiagDirection diagdir)
Maps a (4-way) direction to the diagonal track bits incidating with that diagdir.
static TileIndex GetOtherTunnelBridgeEnd(TileIndex t)
Determines type of the wormhole and returns its other 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 SetTunnelBridgeSnowOrDesert(TileIndex t, bool snow_or_desert)
Tunnel: Places this tunnel entrance in a snowy or desert area, or takes it out of there.
Tile * _m
Tiles of the map.