OpenTTD Source
20240917-master-g9ab0a47812
|
Go to the documentation of this file.
10 #ifndef TUNNELBRIDGE_H
11 #define TUNNELBRIDGE_H
27 int x1 =
TileX(begin);
28 int y1 =
TileY(begin);
32 return abs(x2 + y2 - x1 - y1) - 1;
static debug_inline uint TileY(TileIndex tile)
Get the Y component of a tile.
uint GetTunnelBridgeLength(TileIndex begin, TileIndex end)
Calculates the length of a tunnel or a bridge (without end tiles)
Owner
Enum for all companies/owners.
DiagDirection
Enumeration for diagonal directions.
void MarkBridgeDirty(TileIndex begin, TileIndex end, DiagDirection direction, uint bridge_height)
Mark bridge tiles dirty.
void SetTunnelBridgeOwner(TileIndex begin, TileIndex end, Owner owner)
Sets the ownership of the bridge/tunnel ramps.
void SetTileOwner(Tile tile, Owner owner)
Sets the owner of a tile.
constexpr T abs(const T a)
Returns the absolute value of (scalar) variable.
TileIndex _build_tunnel_endtile
The end of a tunnel; as hidden return from the tunnel build command for GUI purposes.
static debug_inline uint TileX(TileIndex tile)
Get the X component of a tile.