changeset 3773 | 0019b5f70ea9 |
parent 3636 | a36cc46e754d |
child 4067 | 5ef297943eff |
--- a/tile.c Sun May 07 07:01:48 2006 +0000 +++ b/tile.c Sun May 07 07:55:05 2006 +0000 @@ -56,3 +56,20 @@ GetTileSlope(tile, &h); return h; } + + +uint GetTileMaxZ(TileIndex t) +{ + uint max; + uint h; + + h = TileHeight(t); + max = h; + h = TileHeight(t + TileDiffXY(1, 0)); + if (h > max) max = h; + h = TileHeight(t + TileDiffXY(0, 1)); + if (h > max) max = h; + h = TileHeight(t + TileDiffXY(1, 1)); + if (h > max) max = h; + return max * 8; +}