# tunnelbridge.h File Reference

Header file for things common for tunnels and bridges. More...

`#include "tile_type.h"`
`#include "map_func.h"`
`#include "tunnelbridge_map.h"`

Go to the source code of this file.

## Functions
static uint | GetTunnelBridgeLength (TileIndex begin, TileIndex end)
| Calculates the length of a tunnel or a bridge (without end tiles).

## Detailed Description

Header file for things common for tunnels and bridges.

Definition in file tunnelbridge.h.

## Function Documentation

static uint GetTunnelBridgeLength | ( | TileIndex | begin,
|  | TileIndex | end |
| ) |  |  | `[inline, static]`

Calculates the length of a tunnel or a bridge (without end tiles).

Returns:
  length of bridge/tunnel middle

Definition at line 16 of file tunnelbridge.h.

References abs(), TileX(), and TileY().

Referenced by CmdBuildRoad(), CmdConvertRail(), CFollowTrackT< Ttr_type_, T90deg_turns_allowed_ >::FollowTileExit(), GetRailTrackBitsUniversal(), and RemoveRoad().