1
0
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:
mix
2025-06-12 06:13:13 +01:00
parent 92dd81b9ea
commit 8d2309a4c2

View File

@@ -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 });
} }