* Convert a Direction to a TileIndexDiff. * * @param dir The direction to convert from * @return The resulting TileIndexDiff */
| 595 | * @return The resulting TileIndexDiff |
| 596 | */ |
| 597 | inline 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. |
no test coverage detected