* Returns the TileIndexDiffC offset from a DiagDirection. * * @param dir The given direction * @return The offset as TileIndexDiffC value */
| 494 | * @return The offset as TileIndexDiffC value |
| 495 | */ |
| 496 | inline 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. |
no test coverage detected