OpenTTD Source 20241224-master-gee860a5c8e
|
Map accessors for tunnels. More...
Go to the source code of this file.
Functions | |
TileIndex | GetOtherTunnelEnd (TileIndex tile) |
Gets the other end of the tunnel. | |
bool | IsTunnelInWayDir (TileIndex tile, int z, DiagDirection dir) |
Is there a tunnel in the way in the given direction? | |
bool | IsTunnelInWay (TileIndex tile, int z) |
Is there a tunnel in the way in any direction? | |
Map accessors for tunnels.
Definition in file tunnel_map.cpp.
Gets the other end of the tunnel.
Where a vehicle would reappear when it enters at the given tile.
tile | the tile to search from. |
Definition at line 22 of file tunnel_map.cpp.
References GetTileZ(), GetTunnelBridgeDirection(), IsTunnelTile(), ReverseDiagDir(), and TileOffsByDiagDir().
Referenced by DoClearTunnel(), CFollowTrackT< Ttr_type_, VehicleType, T90deg_turns_allowed_, Tmask_reserved_tracks >::FollowTileExit(), and GetOtherTunnelBridgeEnd().
bool IsTunnelInWay | ( | TileIndex | tile, |
int | z | ||
) |
Is there a tunnel in the way in any direction?
tile | the tile to search from. |
z | the 'z' to search on. |
Definition at line 68 of file tunnel_map.cpp.
References DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_SE, DIAGDIR_SW, IsTunnelInWayDir(), Map::MaxX(), Map::MaxY(), TileX(), and TileY().
Referenced by CmdTerraformLand().
bool IsTunnelInWayDir | ( | TileIndex | tile, |
int | z, | ||
DiagDirection | dir | ||
) |
Is there a tunnel in the way in the given direction?
tile | the tile to search from. |
z | the 'z' to search on. |
dir | the direction to start searching to. |
Definition at line 48 of file tunnel_map.cpp.
References GetTileZ(), GetTunnelBridgeDirection(), IsTunnelTile(), IsValidTile(), and TileOffsByDiagDir().
Referenced by CmdBuildTunnel(), and IsTunnelInWay().