OpenTTD Source 20241224-master-gf74b0cf984
|
Functions that have tunnels and bridges in common. More...
Go to the source code of this file.
Functions | |
DiagDirection | GetTunnelBridgeDirection (Tile t) |
Get the direction pointing to the other end. | |
TransportType | GetTunnelBridgeTransportType (Tile t) |
Tunnel: Get the transport type of the tunnel (road or rail) Bridge: Get the transport type of the bridge's ramp. | |
bool | HasTunnelBridgeSnowOrDesert (Tile t) |
Tunnel: Is this tunnel entrance in a snowy or desert area? Bridge: Does the bridge ramp lie in a snow or desert area? | |
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. | |
TileIndex | GetOtherTunnelBridgeEnd (Tile t) |
Determines type of the wormhole and returns its other end. | |
bool | HasTunnelBridgeReservation (Tile t) |
Get the reservation state of the rail tunnel/bridge. | |
void | SetTunnelBridgeReservation (Tile t, bool b) |
Set the reservation state of the rail tunnel/bridge. | |
TrackBits | GetTunnelBridgeReservationTrackBits (Tile t) |
Get the reserved track bits for a rail tunnel/bridge. | |
Functions that have tunnels and bridges in common.
Definition in file tunnelbridge_map.h.
Determines type of the wormhole and returns its other end.
t | one end |
Definition at line 78 of file tunnelbridge_map.h.
References GetOtherBridgeEnd(), GetOtherTunnelEnd(), IsTileType(), IsTunnel(), and MP_TUNNELBRIDGE.
Referenced by AfterLoadGame(), CcBuildRoadTunnel(), CheckTrainCollision(), ClearPathReservation(), CmdBuildRoad(), CmdConvertRail(), CmdConvertRoad(), CmdSignalTrackHelper(), Train::Crash(), ExploreSegment(), FollowTrainReservation(), GetTrainForReservation(), GrowTownInTile(), MarkBridgeDirty(), PlaceRail_Bridge(), PlaceRoad_Bridge(), RemoveRoad(), TestTownOwnsBridge(), TrainController(), UpdateSignalsInBuffer(), and YapfTrainCheckReverse().
|
inline |
Get the direction pointing to the other end.
Tunnel: Get the direction facing into the tunnel Bridge: Get the direction pointing onto the bridge
t | The tile to analyze |
Definition at line 26 of file tunnelbridge_map.h.
References GB(), IsTileType(), Tile::m5(), and MP_TUNNELBRIDGE.
Referenced by AdjustTileh(), AfterLoadGame(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::CanEnterNewTile(), CanRoadContinueIntoNextTile(), CcBuildBridge(), CcBuildRoadTunnel(), ClearPathReservation(), CmdBuildBridge(), CmdBuildLongRoad(), CmdBuildRoad(), CmdConvertRail(), CmdTurnRoadVeh(), CollectTrackbitsFromCrashedVehiclesEnum(), DeleteLastWagon(), DoClearBridge(), DoClearTunnel(), DrawRailCatenaryOnTunnel(), DrawRailCatenaryRailway(), DrawTile_TunnelBridge(), ExploreSegment(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), GetAnyRoadBits(), GetBridgeEnd(), GetBridgeHeight(), GetOtherBridgeEnd(), GetOtherTunnelEnd(), GetRailTrackBitsUniversal(), GetTunnelBridgeReservationTrackBits(), GrowTownAtRoad(), IsTunnelInWayDir(), IsWateredTile(), MarkBridgeDirty(), RemoveRoad(), Train::ReserveTrackUnderConsist(), CYapfCostBase::stSlopeCost(), TestTownOwnsBridge(), TrainCanLeaveTile(), TrainController(), UpdateSignalsInBuffer(), and YapfTrainCheckReverse().
Get the reserved track bits for a rail tunnel/bridge.
t | the tile |
Definition at line 117 of file tunnelbridge_map.h.
References DiagDirToDiagTrackBits(), GetTunnelBridgeDirection(), HasTunnelBridgeReservation(), and TRACK_BIT_NONE.
Referenced by GetReservedTrackbits(), and TryReserveRailTrack().
|
inline |
Tunnel: Get the transport type of the tunnel (road or rail) Bridge: Get the transport type of the bridge's ramp.
t | The tile to analyze |
Definition at line 39 of file tunnelbridge_map.h.
References GB(), IsTileType(), Tile::m5(), and MP_TUNNELBRIDGE.
Referenced by AfterLoadGame(), CanFollowRoad(), CanRoadContinueIntoNextTile(), CheckAllowRemoveTunnelBridge(), CmdBuildBridge(), CmdBuildRoad(), CmdConvertRail(), CmdConvertRoad(), ConvertRailTypes(), ConvertRoadTypes(), DoClearBridge(), DoClearTunnel(), DrawBridgeMiddle(), DrawTile_TunnelBridge(), ExploreSegment(), GetAnyRoadBits(), GetEffectiveWaterClass(), GetRailTrackBitsUniversal(), GetReservedTrackbits(), SmallMapWindow::GetTileColours(), GetTileRailType(), GrowTownInTile(), HasTunnelBridgeReservation(), IsWateredTile(), RedundantBridgeExistsNearby(), RemoveRoad(), SetDefaultRailGui(), SetTunnelBridgeReservation(), TryReserveRailTrack(), TunnelBridgeClearCost(), UnreserveRailTrack(), and UpdateSignalsInBuffer().
|
inline |
Get the reservation state of the rail tunnel/bridge.
t | the tile |
Definition at line 91 of file tunnelbridge_map.h.
References GetTunnelBridgeTransportType(), HasBit(), IsTileType(), Tile::m5(), MP_TUNNELBRIDGE, and TRANSPORT_RAIL.
Referenced by CmdBuildBridge(), CmdConvertRail(), DoClearBridge(), DoClearTunnel(), DrawBridgeMiddle(), DrawTile_TunnelBridge(), and GetTunnelBridgeReservationTrackBits().
|
inline |
Tunnel: Is this tunnel entrance in a snowy or desert area? Bridge: Does the bridge ramp lie in a snow or desert area?
t | The tile to analyze |
Definition at line 52 of file tunnelbridge_map.h.
References HasBit(), IsTileType(), Tile::m7(), and MP_TUNNELBRIDGE.
Referenced by DrawTile_TunnelBridge(), and GetTerrainType().
|
inline |
Set the reservation state of the rail tunnel/bridge.
t | the tile |
b | the reservation state |
Definition at line 104 of file tunnelbridge_map.h.
References AssignBit(), GetTunnelBridgeTransportType(), IsTileType(), Tile::m5(), MP_TUNNELBRIDGE, and TRANSPORT_RAIL.
Referenced by AfterLoadGame(), ClearPathReservation(), CmdBuildBridge(), Train::Crash(), TryReserveRailTrack(), and UnreserveRailTrack().
|
inline |
Tunnel: Places this tunnel entrance in a snowy or desert area, or takes it out of there.
Bridge: Sets whether the bridge ramp lies in a snow or desert area.
t | the tunnel entrance / bridge ramp tile |
snow_or_desert | is the entrance/ramp in snow or desert (true), when not in snow and not in desert false |
Definition at line 66 of file tunnelbridge_map.h.
References IsTileType(), Tile::m7(), MP_TUNNELBRIDGE, and SB().