summaryrefslogtreecommitdiff
path: root/src/map_func.h
diff options
context:
space:
mode:
authorPavel Stupnikov <dp@dpointer.org>2018-04-29 00:47:36 +0300
committerfrosch <github@elsenhans.name>2018-04-28 23:47:36 +0200
commit8d8b9a026a5915c2bf4591b74d79dfa1dcf791d8 (patch)
tree8a53b6ac7f245753a6a8f25e2ed2f6b27fc8b683 /src/map_func.h
parentcfe6a8ea4fc38d58babcc6e7b67a9185ee66078c (diff)
downloadopenttd-8d8b9a026a5915c2bf4591b74d79dfa1dcf791d8.tar.xz
Feature #6610: Allow towns to build houses on road turns (#6758)
Diffstat (limited to 'src/map_func.h')
-rw-r--r--src/map_func.h12
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