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

Function TileIndexDiffCByDir

src/map_func.h:510–516  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

508 * @return The offset as TileIndexDiffC value
509 */
510inline TileIndexDiffC TileIndexDiffCByDir(Direction dir)
511{
512 extern const TileIndexDiffC _tileoffs_by_dir[DIR_END];
513
514 assert(IsValidDirection(dir));
515 return _tileoffs_by_dir[dir];
516}
517
518/**
519 * Add a TileIndexDiffC to a TileIndex and returns the new one.

Callers 2

TileLoop_WaterFunction · 0.85
IncrementMethod · 0.85

Calls 1

IsValidDirectionFunction · 0.85

Tested by

no test coverage detected