mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-10 09:32:29 +01:00
Change magic numbers to constants in Viewport::Invalidate function
This commit is contained in:
@@ -1194,8 +1194,8 @@ namespace OpenRCT2
|
|||||||
const auto screenCoord = Translate3DTo2DWithZ(
|
const auto screenCoord = Translate3DTo2DWithZ(
|
||||||
rotation, CoordsXYZ{ x + kCoordsXYHalfTile, y + kCoordsXYHalfTile, 0 });
|
rotation, CoordsXYZ{ x + kCoordsXYHalfTile, y + kCoordsXYHalfTile, 0 });
|
||||||
|
|
||||||
const auto topLeft = screenCoord - ScreenCoordsXY(32, 32 + z1);
|
const auto topLeft = screenCoord - ScreenCoordsXY(kScreenCoordsTileWidthHalf, kScreenCoordsTileHeight + z1);
|
||||||
const auto bottomRight = screenCoord + ScreenCoordsXY(32, 32 - z0);
|
const auto bottomRight = screenCoord + ScreenCoordsXY(kScreenCoordsTileWidthHalf, kScreenCoordsTileHeight - z0);
|
||||||
|
|
||||||
ViewportInvalidate(this, ScreenRect{ topLeft, bottomRight });
|
ViewportInvalidate(this, ScreenRect{ topLeft, bottomRight });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user