* Returns the TileIndexDiffC offset from a Direction. * * @param dir The given direction * @return The offset as TileIndexDiffC value */
| 508 | * @return The offset as TileIndexDiffC value |
| 509 | */ |
| 510 | inline 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. |
no test coverage detected