OpenTTD Source
20241108-master-g80f628063a
|
Header file for things common for tunnels and bridges. More...
Go to the source code of this file.
Functions | |
void | MarkBridgeDirty (TileIndex begin, TileIndex end, DiagDirection direction, uint bridge_height) |
Mark bridge tiles dirty. More... | |
void | MarkBridgeDirty (TileIndex tile) |
Mark bridge tiles dirty. More... | |
uint | GetTunnelBridgeLength (TileIndex begin, TileIndex end) |
Calculates the length of a tunnel or a bridge (without end tiles) More... | |
void | SetTunnelBridgeOwner (TileIndex begin, TileIndex end, Owner owner) |
Sets the ownership of the bridge/tunnel ramps. More... | |
Variables | |
TileIndex | _build_tunnel_endtile |
The end of a tunnel; as hidden return from the tunnel build command for GUI purposes. | |
Header file for things common for tunnels and bridges.
Definition in file tunnelbridge.h.
Calculates the length of a tunnel or a bridge (without end tiles)
begin | The begin of the tunnel or bridge. |
end | The end of the tunnel or bridge. |
Definition at line 25 of file tunnelbridge.h.
References abs(), TileX(), and TileY().
Referenced by CmdConvertRail(), DrawBridgeMiddle(), DrawRailCatenaryOnBridge(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), GetRailTrackBitsUniversal(), and ShowBuildBridgeWindow().
void MarkBridgeDirty | ( | TileIndex | begin, |
TileIndex | end, | ||
DiagDirection | direction, | ||
uint | bridge_height | ||
) |
Mark bridge tiles dirty.
Note: The bridge does not need to exist, everything is passed via parameters.
begin | Start tile. |
end | End tile. |
direction | Direction from begin to end. |
bridge_height | Bridge height level. |
Definition at line 67 of file tunnelbridge_cmd.cpp.
References MarkTileDirtyByTile(), TileHeight(), and TileOffsByDiagDir().
Referenced by ClearPathReservation(), CmdConvertRail(), MarkBridgeDirty(), TryReserveRailTrack(), and UnreserveRailTrack().
void MarkBridgeDirty | ( | TileIndex | tile | ) |
Mark bridge tiles dirty.
tile | Bridge head. |
Definition at line 80 of file tunnelbridge_cmd.cpp.
References GetBridgeHeight(), GetOtherTunnelBridgeEnd(), GetTunnelBridgeDirection(), and MarkBridgeDirty().
Sets the ownership of the bridge/tunnel ramps.
begin | The begin of the tunnel or bridge. |
end | The end of the tunnel or bridge. |
owner | The new owner to set |
Definition at line 41 of file tunnelbridge.h.
References SetTileOwner().