27 int x1 =
TileX(begin);
28 int y1 =
TileY(begin);
32 return abs(x2 + y2 - x1 - y1) - 1;
Owner
Enum for all companies/owners.
DiagDirection
Enumeration for diagonal directions.
Functions related to maps.
static debug_inline uint TileY(TileIndex tile)
Get the Y component of a tile.
static debug_inline uint TileX(TileIndex tile)
Get the X component of a tile.
constexpr T abs(const T a)
Returns the absolute value of (scalar) variable.
Map writing/reading functions for tiles.
void SetTileOwner(Tile tile, Owner owner)
Sets the owner of a tile.
void SetTunnelBridgeOwner(TileIndex begin, TileIndex end, Owner owner)
Sets the ownership of the bridge/tunnel ramps.
void MarkBridgeDirty(TileIndex begin, TileIndex end, DiagDirection direction, uint bridge_height)
Mark bridge tiles dirty.
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.