summaryrefslogtreecommitdiff
path: root/tree_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-23 13:48:16 +0000
committertron <tron@openttd.org>2006-04-23 13:48:16 +0000
commit0347fb2ab67e942826523424c35ede66d27339fe (patch)
tree3f0769bd955cefba7ab80063e64546c1874e0a62 /tree_cmd.c
parentb5ce99c52d1ce36f56431652f7fcc67eb9d5bf6d (diff)
downloadopenttd-0347fb2ab67e942826523424c35ede66d27339fe.tar.xz
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
Diffstat (limited to 'tree_cmd.c')
-rw-r--r--tree_cmd.c7
1 files changed, 3 insertions, 4 deletions
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;
}