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

Function GetSlopePixelZ_Track

src/rail_cmd.cpp:2577–2588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2575}
2576
2577static int GetSlopePixelZ_Track(TileIndex tile, uint x, uint y, bool)
2578{
2579 if (IsPlainRail(tile)) {
2580 auto [tileh, z] = GetTilePixelSlope(tile);
2581 if (tileh == SLOPE_FLAT) return z;
2582
2583 z += ApplyPixelFoundationToSlope(GetRailFoundation(tileh, GetTrackBits(tile)), tileh);
2584 return z + GetPartialPixelZ(x & 0xF, y & 0xF, tileh);
2585 } else {
2586 return GetTileMaxPixelZ(tile);
2587 }
2588}
2589
2590static Foundation GetFoundation_Track(TileIndex tile, Slope tileh)
2591{

Callers

nothing calls this directly

Calls 7

IsPlainRailFunction · 0.85
GetTilePixelSlopeFunction · 0.85
GetRailFoundationFunction · 0.85
GetTrackBitsFunction · 0.85
GetPartialPixelZFunction · 0.85
GetTileMaxPixelZFunction · 0.85

Tested by

no test coverage detected