map.h
changeset 1980 9ea0c89fbb58
parent 1977 4392ae3d8e31
child 1981 de031d2aed47
--- a/map.h	Fri Jun 24 17:41:08 2005 +0000
+++ b/map.h	Sat Jun 25 06:15:43 2005 +0000
@@ -3,7 +3,6 @@
 
 #include "stdafx.h"
 
-#define TILE_FROM_XY(x,y) (TileIndex)((((y) >> 4) << MapLogX()) + ((x) >> 4))
 #define TILE_XY(x,y) (((y) << MapLogX()) + (x))
 
 #define TILE_MASK(x) ((x) & ((1 << (MapLogX() + MapLogY())) - 1))
@@ -37,6 +36,11 @@
 
 typedef uint32 TileIndex;
 
+static inline TileIndex TileVirtXY(uint x, uint y)
+{
+	return (y >> 4 << MapLogX()) + (x >> 4);
+}
+
 typedef enum {
 	OWNER_TOWN			= 0xf,	// a town owns the tile
 	OWNER_NONE			= 0x10,	// nobody owns the tile