diff options
author | tron <tron@openttd.org> | 2006-03-19 16:57:48 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-03-19 16:57:48 +0000 |
commit | 7b21893adb7e2368a2402f2640164f3a4482cf5d (patch) | |
tree | 4268fee8b84fb1dc015ef52da24d0e5a863ba157 /tree_cmd.c | |
parent | 85da30604991a2b024aeea64443e61cf979c2424 (diff) | |
download | openttd-7b21893adb7e2368a2402f2640164f3a4482cf5d.tar.xz |
(svn r3983) Use existing functions to access tree and road info
Diffstat (limited to 'tree_cmd.c')
-rw-r--r-- | tree_cmd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tree_cmd.c b/tree_cmd.c index 7a699efdb..be6b3d5ca 100644 --- a/tree_cmd.c +++ b/tree_cmd.c @@ -286,9 +286,9 @@ static void DrawTile_Trees(TileInfo *ti) 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 @@ static void DrawTile_Trees(TileInfo *ti) 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; |