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

Function HasFoundationNE

src/landscape.cpp:410–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

408
409
410bool HasFoundationNE(TileIndex tile, Slope slope_here, uint z_here)
411{
412 int z_E_here = z_here;
413 int z_N_here = z_here;
414 GetSlopePixelZOnEdge(slope_here, DIAGDIR_NE, z_E_here, z_N_here);
415
416 auto [slope, z] = GetFoundationPixelSlope(TileAddXY(tile, -1, 0));
417 int z_E = z;
418 int z_N = z;
419 GetSlopePixelZOnEdge(slope, DIAGDIR_SW, z_E, z_N);
420
421 return (z_N_here > z_N) || (z_E_here > z_E);
422}
423
424/**
425 * Draw foundation \a f at tile \a ti. Updates \a ti.

Callers 2

DrawFoundationFunction · 0.85

Calls 3

GetSlopePixelZOnEdgeFunction · 0.85
GetFoundationPixelSlopeFunction · 0.85
TileAddXYFunction · 0.85

Tested by

no test coverage detected