From 01edaeec578bddb73b4513baf9d8bfe5f9a886b0 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 26 Sep 2007 16:12:43 +0000 Subject: (svn r11172) -Codechange: rewrite of town road building and addition of the possibility to clean up unconnected road bits during the local road reconstructions. Based on a patch by skidd13. --- src/map.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 9e28b0732..064e595c1 100644 --- a/src/map.h +++ b/src/map.h @@ -389,6 +389,18 @@ static inline TileIndexDiff TileOffsByDir(Direction dir) return ToTileIndexDiff(_tileoffs_by_dir[dir]); } +/** + * Adds a DiagDir 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 TileAddByDiagDir(TileIndex tile, DiagDirection dir) +{ + return TILE_ADD(tile, TileOffsByDiagDir(dir)); +} + /** * A callback function type for searching tiles. * -- cgit v1.2.3-54-g00ecf