1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 18:25:16 +01:00

Refactor Viewport.cpp to use ScreenRect (#15790)

This commit is contained in:
Sijmen
2021-10-27 05:13:38 +02:00
committed by GitHub
parent ea3463399f
commit cec8447c6f
10 changed files with 67 additions and 85 deletions

View File

@@ -1161,7 +1161,7 @@ void map_invalidate_selection_rect()
bottom += 32;
top -= 32 + 2080;
viewports_invalidate(left, top, right, bottom);
viewports_invalidate({ { left, top }, { right, bottom } });
}
static size_t CountElementsOnTile(const CoordsXY& loc)
@@ -1813,7 +1813,7 @@ static void map_invalidate_tile_under_zoom(int32_t x, int32_t y, int32_t z0, int
x2 = screenCoord.x + 32;
y2 = screenCoord.y + 32 - z0;
viewports_invalidate(x1, y1, x2, y2, maxZoom);
viewports_invalidate({ { x1, y1 }, { x2, y2 } }, maxZoom);
}
/**
@@ -1874,7 +1874,7 @@ void map_invalidate_region(const CoordsXY& mins, const CoordsXY& maxs)
bottom += 32;
top -= 32 + 2080;
viewports_invalidate(left, top, right, bottom);
viewports_invalidate({ { left, top }, { right, bottom } });
}
int32_t map_get_tile_side(const CoordsXY& mapPos)