changeset 3773 | 996897ffc8ea |
parent 3636 | d87b21df2944 |
child 4067 | ab047dec0733 |
--- 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; +}