OpenTTD Source
20240915-master-g3784a3d3d6
|
Go to the documentation of this file.
10 #ifndef TUNNELBRIDGE_MAP_H
11 #define TUNNELBRIDGE_MAP_H
69 SB(t.
m7(), 5, 1, snow_or_desert);
debug_inline uint8_t & m5()
General purpose.
TileIndex GetOtherBridgeEnd(TileIndex tile)
Starting at one bridge end finds the other bridge end.
void SetTunnelBridgeReservation(Tile t, bool b)
Set the reservation state of the rail tunnel/bridge.
constexpr static debug_inline uint GB(const T x, const uint8_t s, const uint8_t n)
Fetch n bits from x, started at bit s.
bool HasTunnelBridgeReservation(Tile t)
Get the reservation state of the rail tunnel/bridge.
DiagDirection
Enumeration for diagonal directions.
Wrapper class to abstract away the way the tiles are stored.
debug_inline uint8_t & m7()
Primarily used for newgrf support.
TrackBits DiagDirToDiagTrackBits(DiagDirection diagdir)
Maps a (4-way) direction to the diagonal track bits incidating with that diagdir.
@ TRACK_BIT_NONE
No track.
TransportType
Available types of transport.
TrackBits
Allow incrementing of Track variables.
bool HasTunnelBridgeSnowOrDesert(Tile t)
Tunnel: Is this tunnel entrance in a snowy or desert area? Bridge: Does the bridge ramp lie in a snow...
bool IsTunnel(Tile t)
Is this a tunnel (entrance)?
void SetTunnelBridgeSnowOrDesert(Tile t, bool snow_or_desert)
Tunnel: Places this tunnel entrance in a snowy or desert area, or takes it out of there.
@ MP_TUNNELBRIDGE
Tunnel entry/exit and bridge heads.
constexpr T AssignBit(T &x, const uint8_t y, bool value)
Assigns a bit in a variable.
@ TRANSPORT_RAIL
Transport by train.
TrackBits GetTunnelBridgeReservationTrackBits(Tile t)
Get the reserved track bits for a rail tunnel/bridge.
TransportType GetTunnelBridgeTransportType(Tile t)
Tunnel: Get the transport type of the tunnel (road or rail) Bridge: Get the transport type of the bri...
TileIndex GetOtherTunnelBridgeEnd(Tile t)
Determines type of the wormhole and returns its other end.
TileIndex GetOtherTunnelEnd(TileIndex tile)
Gets the other end of the tunnel.
constexpr T SB(T &x, const uint8_t s, const uint8_t n, const U d)
Set n bits in x starting at bit s to d.
static debug_inline bool IsTileType(Tile tile, TileType type)
Checks if a tile is a given tiletype.
DiagDirection GetTunnelBridgeDirection(Tile t)
Get the direction pointing to the other end.
constexpr debug_inline bool HasBit(const T x, const uint8_t y)
Checks if a bit in a value is set.