diff options
author | tron <tron@openttd.org> | 2006-08-06 16:32:49 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-08-06 16:32:49 +0000 |
commit | 3254155930feb807f81031ebfdc9acedbe33745e (patch) | |
tree | f588dd076c3c98d0c2983a7f5c9e5f5dcbc4447b /tree_cmd.c | |
parent | 7c9165827eb64c74efbad0198e97fe1a77fdb258 (diff) | |
download | openttd-3254155930feb807f81031ebfdc9acedbe33745e.tar.xz |
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
Diffstat (limited to 'tree_cmd.c')
-rw-r--r-- | tree_cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tree_cmd.c b/tree_cmd.c index 9caf6b9d6..99b2de384 100644 --- a/tree_cmd.c +++ b/tree_cmd.c @@ -323,9 +323,12 @@ static void DrawTile_Trees(TileInfo *ti) } -static uint GetSlopeZ_Trees(const TileInfo* ti) +static uint GetSlopeZ_Trees(TileIndex tile, uint x, uint y) { - return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z; + uint z; + uint tileh = GetTileSlope(tile, &z); + + return z + GetPartialZ(x & 0xF, y & 0xF, tileh); } static Slope GetSlopeTileh_Trees(TileIndex tile, Slope tileh) |