tree_cmd.c
changeset 3271 0e796a2b7c9e
parent 3183 cf71bd234ebd
child 3379 ea8aa9e71328
--- a/tree_cmd.c	Sun Mar 19 14:43:23 2006 +0000
+++ b/tree_cmd.c	Sun Mar 19 16:57:48 2006 +0000
@@ -286,9 +286,9 @@
 		uint i;
 
 		/* put the trees to draw in a list */
-		i = (ti->map5 >> 6) + 1;
+		i = GetTreeCount(ti->tile) + 1;
 		do {
-			uint32 image = s[0] + (--i == 0 ? GB(ti->map5, 0, 3) : 3);
+			uint32 image = s[0] + (--i == 0 ? GetTreeGrowth(ti->tile) : 3);
 			if (_display_opt & DO_TRANS_BUILDINGS) MAKE_TRANSPARENT(image);
 			te[i].image = image;
 			te[i].x = d->x;
@@ -302,7 +302,7 @@
 			byte min = 0xFF;
 			TreeListEnt *tep = NULL;
 
-			i = (ti->map5 >> 6) + 1;
+			i = GetTreeCount(ti->tile) + 1;
 			do {
 				if (te[--i].image != 0 && te[i].x + te[i].y < min) {
 					min = te[i].x + te[i].y;