12 #ifndef TUNNELBRIDGE_H 13 #define TUNNELBRIDGE_H 28 int x1 =
TileX(begin);
29 int y1 =
TileY(begin);
33 return abs(x2 + y2 - x1 - y1) - 1;
void MarkBridgeDirty(TileIndex begin, TileIndex end, DiagDirection direction, uint bridge_height)
Mark bridge tiles dirty.
static uint TileX(TileIndex tile)
Get the X component of a tile.
Functions related to maps.
static uint GetTunnelBridgeLength(TileIndex begin, TileIndex end)
Calculates the length of a tunnel or a bridge (without end tiles)
TileIndex _build_tunnel_endtile
The end of a tunnel; as hidden return from the tunnel build command for GUI purposes.
DiagDirection
Enumeration for diagonal directions.
uint32 TileIndex
The index/ID of a Tile.
static uint TileY(TileIndex tile)
Get the Y component of a tile.
static T abs(const T a)
Returns the absolute value of (scalar) variable.