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 | d8b8035f9f17d7eadf6d40845d2afa60a16e92bb (patch) | |
tree | f588dd076c3c98d0c2983a7f5c9e5f5dcbc4447b /clear_cmd.c | |
parent | fb251d18e06591423739a2cac659a9f4511370b8 (diff) | |
download | openttd-d8b8035f9f17d7eadf6d40845d2afa60a16e92bb.tar.xz |
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
Diffstat (limited to 'clear_cmd.c')
-rw-r--r-- | clear_cmd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clear_cmd.c b/clear_cmd.c index 1f46a071d..6d1016daa 100644 --- a/clear_cmd.c +++ b/clear_cmd.c @@ -534,9 +534,12 @@ static void DrawTile_Clear(TileInfo *ti) DrawClearLandFence(ti); } -static uint GetSlopeZ_Clear(const TileInfo* ti) +static uint GetSlopeZ_Clear(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_Clear(TileIndex tile, Slope tileh) |