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

Function GetFoundationSlope

src/landscape.cpp:386–392  ·  view source on GitHub ↗

* Get slope of a tile on top of a (possible) foundation * If a tile does not have a foundation, the function returns the same as GetTileSlope. * * @param tile The tile of interest. * @return The slope on top of the foundation and the z of the foundation slope. */

Source from the content-addressed store, hash-verified

384 * @return The slope on top of the foundation and the z of the foundation slope.
385 */
386std::tuple<Slope, int> GetFoundationSlope(TileIndex tile)
387{
388 auto [tileh, z] = GetTileSlopeZ(tile);
389 Foundation f = _tile_type_procs[GetTileType(tile)]->get_foundation_proc(tile, tileh);
390 z += ApplyFoundationToSlope(f, tileh);
391 return {tileh, z};
392}
393
394
395bool HasFoundationNW(TileIndex tile, Slope slope_here, uint z_here)

Callers 5

TileLoop_WaterFunction · 0.85
IsPossibleCrossingFunction · 0.85
GetFoundationPixelSlopeFunction · 0.85
IsRoadAllowedHereFunction · 0.85
TileLoop_RoadFunction · 0.85

Calls 3

GetTileSlopeZFunction · 0.85
GetTileTypeFunction · 0.85
ApplyFoundationToSlopeFunction · 0.85

Tested by

no test coverage detected