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

Function HasFoundationNW

src/landscape.cpp:395–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393
394
395bool HasFoundationNW(TileIndex tile, Slope slope_here, uint z_here)
396{
397 int z_W_here = z_here;
398 int z_N_here = z_here;
399 GetSlopePixelZOnEdge(slope_here, DIAGDIR_NW, z_W_here, z_N_here);
400
401 auto [slope, z] = GetFoundationPixelSlope(TileAddXY(tile, 0, -1));
402 int z_W = z;
403 int z_N = z;
404 GetSlopePixelZOnEdge(slope, DIAGDIR_SE, z_W, z_N);
405
406 return (z_N_here > z_N) || (z_W_here > z_W);
407}
408
409
410bool HasFoundationNE(TileIndex tile, Slope slope_here, uint z_here)

Callers 2

DrawFoundationFunction · 0.85

Calls 3

GetSlopePixelZOnEdgeFunction · 0.85
GetFoundationPixelSlopeFunction · 0.85
TileAddXYFunction · 0.85

Tested by

no test coverage detected