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

Function TileIndexDiffCByDiagDir

src/map_func.h:496–502  ·  view source on GitHub ↗

* Returns the TileIndexDiffC offset from a DiagDirection. * * @param dir The given direction * @return The offset as TileIndexDiffC value */

Source from the content-addressed store, hash-verified

494 * @return The offset as TileIndexDiffC value
495 */
496inline TileIndexDiffC TileIndexDiffCByDiagDir(DiagDirection dir)
497{
498 extern const TileIndexDiffC _tileoffs_by_diagdir[DIAGDIR_END];
499
500 assert(IsValidDiagDirection(dir));
501 return _tileoffs_by_diagdir[dir];
502}
503
504/**
505 * Returns the TileIndexDiffC offset from a Direction.

Callers 5

CalculateCoverageLineFunction · 0.85
TerraformTileHeightFunction · 0.85
IncrementMethod · 0.85
InvalidateWaterRegionFunction · 0.85

Calls 1

IsValidDiagDirectionFunction · 0.85

Tested by

no test coverage detected