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

Function TileOffsByDir

src/map_func.h:597–603  ·  view source on GitHub ↗

* Convert a Direction to a TileIndexDiff. * * @param dir The direction to convert from * @return The resulting TileIndexDiff */

Source from the content-addressed store, hash-verified

595 * @return The resulting TileIndexDiff
596 */
597inline TileIndexDiff TileOffsByDir(Direction dir)
598{
599 extern const TileIndexDiffC _tileoffs_by_dir[DIR_END];
600
601 assert(IsValidDirection(dir));
602 return ToTileIndexDiff(_tileoffs_by_dir[dir]);
603}
604
605/**
606 * Adds a Direction to a tile.

Callers 6

IsWateredTileFunction · 0.85
TileAddByDirFunction · 0.85
GetRailContinuationInfoFunction · 0.85
TileLoop_TreesFunction · 0.85

Calls 2

IsValidDirectionFunction · 0.85
ToTileIndexDiffFunction · 0.85

Tested by

no test coverage detected