1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Make GCC happy due to non-enumerated usage

This commit is contained in:
ζeh Matt
2024-03-02 11:41:19 +02:00
parent 425c4cf04e
commit ae0af55a99
4 changed files with 6 additions and 4 deletions

View File

@@ -85,7 +85,7 @@ private:
(viewportWidget->width()) - 1, (viewportWidget->height()) - 1, Focus(_bannerViewPos));
if (viewport != nullptr)
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE;
Invalidate();
}

View File

@@ -628,7 +628,7 @@ private:
int32_t viewportFlags{};
if (viewport == nullptr)
{
viewportFlags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
viewportFlags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE;
}
else
{

View File

@@ -137,7 +137,7 @@ public:
this, windowPos + ScreenCoordsXY{ viewportWidget.left + 1, viewportWidget.top + 1 }, viewportWidget.width() - 1,
viewportWidget.height() - 1, Focus(CoordsXYZ{ signViewPosition, viewZ }));
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE;
Invalidate();
return true;
@@ -315,7 +315,7 @@ public:
this, windowPos + ScreenCoordsXY{ viewportWidget->left + 1, viewportWidget->top + 1 }, viewportWidget->width() - 1,
viewportWidget->height() - 1, Focus(CoordsXYZ{ signViewPos }));
if (viewport != nullptr)
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : 0;
viewport->flags = gConfigGeneral.AlwaysShowGridlines ? VIEWPORT_FLAG_GRIDLINES : VIEWPORT_FLAG_NONE;
Invalidate();
}

View File

@@ -30,6 +30,8 @@ struct PaintEntry;
// Values can be changed when plugins move to using named constants.
enum : uint32_t
{
VIEWPORT_FLAG_NONE = 0U,
VIEWPORT_FLAG_GRIDLINES = (1U << 7),
VIEWPORT_FLAG_UNDERGROUND_INSIDE = (1U << 0),
VIEWPORT_FLAG_HIDE_BASE = (1U << 12),