tile.h
changeset 1394 449e84bdc04e
parent 1335 a635854c23b6
child 1749 bb7fa90dd0cb
--- a/tile.h	Tue Feb 22 12:27:33 2005 +0000
+++ b/tile.h	Tue Feb 22 12:48:03 2005 +0000
@@ -1,6 +1,7 @@
 #ifndef TILE_H
 #define TILE_H
 
+#include "macros.h"
 #include "map.h"
 
 typedef enum TileType {
@@ -23,6 +24,13 @@
 uint GetTileSlope(TileIndex tile, uint *h);
 uint GetTileZ(TileIndex tile);
 
+static inline bool CorrectZ(uint tileh)
+{
+	/* tile height must be corrected if the north corner is not raised, but
+	 * any other corner is. These are the cases 1 till 7 */
+	return IS_INT_INSIDE(tileh, 1, 8);
+}
+
 static inline uint TileHeight(TileIndex tile)
 {
 	assert(tile < MapSize());