mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r4028) The last external user of FindLandscapeHeightByTile() is gone (r4027).
Move its implementation into its only caller - FindLandscapeHeight() - and remove it
This commit is contained in:
parent
e8f5d89712
commit
337cdcc31f
@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
/* landscape.c */
|
/* landscape.c */
|
||||||
void FindLandscapeHeight(TileInfo *ti, uint x, uint y);
|
void FindLandscapeHeight(TileInfo *ti, uint x, uint y);
|
||||||
void FindLandscapeHeightByTile(TileInfo *ti, TileIndex tile);
|
|
||||||
|
|
||||||
void DoClearSquare(TileIndex tile);
|
void DoClearSquare(TileIndex tile);
|
||||||
void CDECL ModifyTile(TileIndex tile, uint flags, ...);
|
void CDECL ModifyTile(TileIndex tile, uint flags, ...);
|
||||||
|
20
landscape.c
20
landscape.c
@ -55,16 +55,6 @@ const byte _inclined_tileh[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
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 */
|
/* find the landscape height for the coordinates x y */
|
||||||
void FindLandscapeHeight(TileInfo *ti, uint x, uint y)
|
void FindLandscapeHeight(TileInfo *ti, uint x, uint y)
|
||||||
{
|
{
|
||||||
@ -77,10 +67,14 @@ void FindLandscapeHeight(TileInfo *ti, uint x, uint y)
|
|||||||
ti->tile = 0;
|
ti->tile = 0;
|
||||||
ti->map5 = 0;
|
ti->map5 = 0;
|
||||||
ti->z = 0;
|
ti->z = 0;
|
||||||
return;
|
} else {
|
||||||
}
|
TileIndex tile = TileVirtXY(x, y);
|
||||||
|
|
||||||
FindLandscapeHeightByTile(ti, TileVirtXY(x, y));
|
ti->tile = tile;
|
||||||
|
ti->type = GetTileType(tile);
|
||||||
|
ti->map5 = _m[tile].m5;
|
||||||
|
ti->tileh = GetTileSlope(tile, &ti->z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint GetPartialZ(int x, int y, int corners)
|
uint GetPartialZ(int x, int y, int corners)
|
||||||
|
Loading…
Reference in New Issue
Block a user