(svn r4028) The last external user of FindLandscapeHeightByTile() is gone (r4027).
Move its implementation into its only caller - FindLandscapeHeight() - and remove it
--- a/functions.h Wed Mar 22 19:04:04 2006 +0000
+++ b/functions.h Wed Mar 22 19:16:58 2006 +0000
@@ -5,7 +5,6 @@
/* landscape.c */
void FindLandscapeHeight(TileInfo *ti, uint x, uint y);
-void FindLandscapeHeightByTile(TileInfo *ti, TileIndex tile);
void DoClearSquare(TileIndex tile);
void CDECL ModifyTile(TileIndex tile, uint flags, ...);
--- a/landscape.c Wed Mar 22 19:04:04 2006 +0000
+++ b/landscape.c Wed Mar 22 19:16:58 2006 +0000
@@ -55,16 +55,6 @@
};
-void FindLandscapeHeightByTile(TileInfo *ti, TileIndex tile)
-{
- assert(tile < MapSize());
-
- ti->tile = tile;
- ti->map5 = _m[tile].m5;
- ti->type = GetTileType(tile);
- ti->tileh = GetTileSlope(tile, &ti->z);
-}
-
/* find the landscape height for the coordinates x y */
void FindLandscapeHeight(TileInfo *ti, uint x, uint y)
{
@@ -77,10 +67,14 @@
ti->tile = 0;
ti->map5 = 0;
ti->z = 0;
- return;
+ } else {
+ TileIndex tile = TileVirtXY(x, y);
+
+ ti->tile = tile;
+ ti->type = GetTileType(tile);
+ ti->map5 = _m[tile].m5;
+ ti->tileh = GetTileSlope(tile, &ti->z);
}
-
- FindLandscapeHeightByTile(ti, TileVirtXY(x, y));
}
uint GetPartialZ(int x, int y, int corners)