From 8d2309a4c27486b06c655f14f65199971cb6d0f7 Mon Sep 17 00:00:00 2001 From: mix Date: Thu, 12 Jun 2025 06:13:13 +0100 Subject: [PATCH] Change magic numbers to constants in Viewport::Invalidate function --- src/openrct2/interface/Viewport.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 10078ee15e..0921c40d82 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -1194,8 +1194,8 @@ namespace OpenRCT2 const auto screenCoord = Translate3DTo2DWithZ( rotation, CoordsXYZ{ x + kCoordsXYHalfTile, y + kCoordsXYHalfTile, 0 }); - const auto topLeft = screenCoord - ScreenCoordsXY(32, 32 + z1); - const auto bottomRight = screenCoord + ScreenCoordsXY(32, 32 - z0); + const auto topLeft = screenCoord - ScreenCoordsXY(kScreenCoordsTileWidthHalf, kScreenCoordsTileHeight + z1); + const auto bottomRight = screenCoord + ScreenCoordsXY(kScreenCoordsTileWidthHalf, kScreenCoordsTileHeight - z0); ViewportInvalidate(this, ScreenRect{ topLeft, bottomRight }); }