tree_cmd.c
changeset 909 65cdb609b7a6
parent 881 02fdb6abf338
child 915 d845fe7cf6f2
--- a/tree_cmd.c	Thu Jan 06 08:08:17 2005 +0000
+++ b/tree_cmd.c	Thu Jan 06 11:39:00 2005 +0000
@@ -466,15 +466,15 @@
 	byte m5;
 	uint16 m2;
 
-	static const TileIndexDiff _tileloop_trees_dir[] = {
-		TILE_XY(-1,-1),
-		TILE_XY(0,-1),
-		TILE_XY(1,-1),
-		TILE_XY(-1,0),
-		TILE_XY(1,0),
-		TILE_XY(-1,1),
-		TILE_XY(0,1),
-		TILE_XY(1,1),
+	static const TileIndexDiffC _tileloop_trees_dir[] = {
+		{-1, -1},
+		{ 0, -1},
+		{ 1, -1},
+		{-1,  0},
+		{ 1,  0},
+		{-1,  1},
+		{ 0,  1},
+		{ 1,  1}
 	};
 
 	if (_opt.landscape == LT_DESERT) {
@@ -514,7 +514,7 @@
 			case 2: { /* add a neighbouring tree */
 				byte m3 = _map3_lo[tile];
 
-				tile += _tileloop_trees_dir[Random() & 7];
+				tile += ToTileIndexDiff(_tileloop_trees_dir[Random() & 7]);
 
 				if (!IS_TILETYPE(tile, MP_CLEAR))
 					return;