forked from mirror/OpenTTD
(svn r27148) -Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty.
This commit is contained in:
@@ -66,6 +66,19 @@ static inline uint TilePixelHeight(TileIndex tile)
|
||||
return TileHeight(tile) * TILE_HEIGHT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the tile height for a coordinate outside map. Such a height is
|
||||
* needed for painting the area outside map using completely black tiles.
|
||||
* The idea is descending to heightlevel 0 as fast as possible.
|
||||
* @param x The X-coordinate (same unit as TileX).
|
||||
* @param y The Y-coordinate (same unit as TileY).
|
||||
* @return The height in pixels in the same unit as TilePixelHeight.
|
||||
*/
|
||||
static inline uint TilePixelHeightOutsideMap(int x, int y)
|
||||
{
|
||||
return TileHeightOutsideMap(x, y) * TILE_HEIGHT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the tiletype of a given tile.
|
||||
*
|
||||
|
Reference in New Issue
Block a user