map.h
changeset 955 25bc5b97e3e2
parent 927 28f45a22a564
child 979 f12f96116cdd
--- a/map.h	Sun Jan 09 16:02:06 2005 +0000
+++ b/map.h	Sun Jan 09 17:55:11 2005 +0000
@@ -52,6 +52,18 @@
 	return (tidc.y << MapLogX()) + tidc.x;
 }
 
+
+#ifndef _DEBUG
+	#define TILE_ADD(x,y) ((x) + (y))
+#else
+	extern TileIndex TileAdd(TileIndex tile, TileIndexDiff add,
+		const char *exp, const char *file, int line);
+	#define TILE_ADD(x, y) (TileAdd((x), (y), #x " + " #y, __FILE__, __LINE__))
+#endif
+
+#define TILE_ADDXY(tile, x, y) TILE_ADD(tile, TILE_XY(x, y))
+
+
 static inline TileIndexDiff TileOffsByDir(uint dir)
 {
 	extern const TileIndexDiffC _tileoffs_by_dir[4];