diff options
Diffstat (limited to 'src/map_func.h')
-rw-r--r-- | src/map_func.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map_func.h b/src/map_func.h index 9198c2cd1..76894d9a4 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -363,6 +363,18 @@ static inline TileIndexDiff TileOffsByDir(Direction dir) } /** + * Adds a Direction to a tile. + * + * @param tile The current tile + * @param dir The direction in which we want to step + * @return the moved tile + */ +static inline TileIndex TileAddByDir(TileIndex tile, Direction dir) +{ + return TILE_ADD(tile, TileOffsByDir(dir)); +} + +/** * Adds a DiagDir to a tile. * * @param tile The current tile |