summaryrefslogtreecommitdiff
path: root/src/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map.h')
-rw-r--r--src/map.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map.h b/src/map.h
index 9e28b0732..064e595c1 100644
--- a/src/map.h
+++ b/src/map.h
@@ -390,6 +390,18 @@ static inline TileIndexDiff TileOffsByDir(Direction 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.
*
* @param tile The tile to test