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

Function GetSlopePixelZ_Road

src/road_cmd.cpp:1960–1973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1958}
1959
1960static int GetSlopePixelZ_Road(TileIndex tile, uint x, uint y, bool)
1961{
1962
1963 if (IsNormalRoad(tile)) {
1964 auto [tileh, z] = GetTilePixelSlope(tile);
1965 if (tileh == SLOPE_FLAT) return z;
1966
1967 Foundation f = GetRoadFoundation(tileh, GetAllRoadBits(tile));
1968 z += ApplyPixelFoundationToSlope(f, tileh);
1969 return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh);
1970 } else {
1971 return GetTileMaxPixelZ(tile);
1972 }
1973}
1974
1975static Foundation GetFoundation_Road(TileIndex tile, Slope tileh)
1976{

Callers

nothing calls this directly

Calls 7

IsNormalRoadFunction · 0.85
GetTilePixelSlopeFunction · 0.85
GetRoadFoundationFunction · 0.85
GetAllRoadBitsFunction · 0.85
GetPartialPixelZFunction · 0.85
GetTileMaxPixelZFunction · 0.85

Tested by

no test coverage detected