diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 5da1170907..684ee39672 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -50,7 +50,7 @@ void Painter::Paint(IDrawingEngine& de) if ((gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !title_should_hide_version_info()) { - DrawOpenRCT2(dpi, 0, _uiContext->GetHeight() - 20); + DrawOpenRCT2(dpi, { 0, _uiContext->GetHeight() - 20 }); } gfx_draw_pickedup_peep(dpi); diff --git a/src/openrct2/title/TitleScreen.cpp b/src/openrct2/title/TitleScreen.cpp index a9c687b405..8835854787 100644 --- a/src/openrct2/title/TitleScreen.cpp +++ b/src/openrct2/title/TitleScreen.cpp @@ -427,10 +427,9 @@ bool title_is_previewing_sequence() return false; } -void DrawOpenRCT2(rct_drawpixelinfo* dpi, int32_t x, int32_t y) +void DrawOpenRCT2(rct_drawpixelinfo* dpi, const ScreenCoordsXY& screenCoords) { utf8 buffer[256]; - ScreenCoordsXY screenCoords(x, y); // Write format codes utf8* ch = buffer; @@ -444,7 +443,9 @@ void DrawOpenRCT2(rct_drawpixelinfo* dpi, int32_t x, int32_t y) // Invalidate screen area int16_t width = static_cast(gfx_get_string_width(buffer)); - gfx_set_dirty_blocks(x, y, x + width, y + 30); // 30 is an arbitrary height to catch both strings + gfx_set_dirty_blocks( + screenCoords.x, screenCoords.y, screenCoords.x + width, + screenCoords.y + 30); // 30 is an arbitrary height to catch both strings // Write platform information snprintf(ch, 256 - (ch - buffer), "%s (%s)", OPENRCT2_PLATFORM, OPENRCT2_ARCHITECTURE); diff --git a/src/openrct2/title/TitleScreen.h b/src/openrct2/title/TitleScreen.h index 4ded4f646a..cacf106029 100644 --- a/src/openrct2/title/TitleScreen.h +++ b/src/openrct2/title/TitleScreen.h @@ -65,4 +65,4 @@ size_t title_get_current_sequence(); bool title_preview_sequence(size_t value); void title_stop_previewing_sequence(); bool title_is_previewing_sequence(); -void DrawOpenRCT2(rct_drawpixelinfo* dpi, int32_t x, int32_t y); +void DrawOpenRCT2(rct_drawpixelinfo* dpi, const ScreenCoordsXY& screenCoords);