Reduce viewport invalidation area of track reservation changes
This commit is contained in:
@@ -3358,6 +3358,15 @@ void MarkTileDirtyByTile(TileIndex tile, const ZoomLevel mark_dirty_if_zoomlevel
|
||||
);
|
||||
}
|
||||
|
||||
void MarkTileGroundDirtyByTile(TileIndex tile, const ZoomLevel mark_dirty_if_zoomlevel_is_below)
|
||||
{
|
||||
int x = TileX(tile) * TILE_SIZE;
|
||||
int y = TileY(tile) * TILE_SIZE;
|
||||
Point top = RemapCoords(x, y, GetTileMaxPixelZ(tile));
|
||||
Point bot = RemapCoords(x + TILE_SIZE, y + TILE_SIZE, GetTilePixelZ(tile));
|
||||
MarkAllViewportsDirty(top.x - TILE_PIXELS * ZOOM_LVL_BASE, top.y - TILE_HEIGHT * ZOOM_LVL_BASE, top.x + TILE_PIXELS * ZOOM_LVL_BASE, bot.y);
|
||||
}
|
||||
|
||||
void MarkTileLineDirty(const TileIndex from_tile, const TileIndex to_tile)
|
||||
{
|
||||
assert(from_tile != INVALID_TILE);
|
||||
|
Reference in New Issue
Block a user