MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / TileHeightOutsideMap

Function TileHeightOutsideMap

src/tile_map.h:42–45  ·  view source on GitHub ↗

* Returns the height of a tile, also for tiles outside the map (virtual "black" tiles). * * @param x X coordinate of the tile, may be outside the map. * @param y Y coordinate of the tile, may be outside the map. * @return The height in the same unit as TileHeight. */

Source from the content-addressed store, hash-verified

40 * @return The height in the same unit as TileHeight.
41 */
42inline uint TileHeightOutsideMap(int x, int y)
43{
44 return TileHeight(TileXY(Clamp(x, 0, Map::MaxX()), Clamp(y, 0, Map::MaxY())));
45}
46
47/**
48 * Sets the height of a tile.

Callers 3

ScrollWindowToFunction · 0.85

Calls 3

TileHeightFunction · 0.85
TileXYFunction · 0.85
ClampFunction · 0.85

Tested by

no test coverage detected