From 0347fb2ab67e942826523424c35ede66d27339fe Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 23 Apr 2006 13:48:16 +0000 Subject: (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums --- tree_cmd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tree_cmd.c') diff --git a/tree_cmd.c b/tree_cmd.c index 7b38f6358..26e957dac 100644 --- a/tree_cmd.c +++ b/tree_cmd.c @@ -250,10 +250,9 @@ static void DrawTile_Trees(TileInfo *ti) DrawClearLandFence(ti); z = ti->z; - if (ti->tileh != 0) { + if (ti->tileh != SLOPE_FLAT) { z += 4; - if (IsSteepTileh(ti->tileh)) - z += 4; + if (IsSteepSlope(ti->tileh)) z += 4; } { @@ -329,7 +328,7 @@ static uint GetSlopeZ_Trees(const TileInfo* ti) return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z; } -static uint GetSlopeTileh_Trees(TileIndex tile, uint tileh) +static Slope GetSlopeTileh_Trees(TileIndex tile, Slope tileh) { return tileh; } -- cgit v1.2.3-54-g00ecf