From 4e074db8dfe6139f6d04deb6cf920ebb23ef7ca6 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Sun, 22 Mar 2026 13:26:57 +0100 Subject: [PATCH] Change argument order to DrawText() to match the others --- src/openrct2/drawing/Drawing.String.cpp | 3 +-- src/openrct2/drawing/Text.cpp | 10 +++++----- src/openrct2/drawing/Text.h | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/openrct2/drawing/Drawing.String.cpp b/src/openrct2/drawing/Drawing.String.cpp index db2ef3c35a..fd688ce59d 100644 --- a/src/openrct2/drawing/Drawing.String.cpp +++ b/src/openrct2/drawing/Drawing.String.cpp @@ -462,8 +462,7 @@ void DrawNewsTicker( } screenCoords = { coords.x - halfWidth, lineY }; - DrawTextBasic(rt, screenCoords, buffer, kColourNull, FontStyle::small - }); + DrawTextBasic(rt, screenCoords, buffer, { kColourNull, FontStyle::small }); if (numCharactersDrawn > numCharactersToDraw) { diff --git a/src/openrct2/drawing/Text.cpp b/src/openrct2/drawing/Text.cpp index 2e68fa050a..efbd76e2e7 100644 --- a/src/openrct2/drawing/Text.cpp +++ b/src/openrct2/drawing/Text.cpp @@ -80,7 +80,7 @@ public: }; static void DrawText( - RenderTarget& rt, const ScreenCoordsXY& coords, const TextPaint& paint, u8string_view text, bool noFormatting = false) + RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view text, const TextPaint& paint, bool noFormatting = false) { int32_t width = noFormatting ? GfxGetStringWidthNoFormatting(text, paint.FontStyle) : GfxGetStringWidth(text, paint.FontStyle); @@ -116,7 +116,7 @@ static void DrawText( void DrawTextNoFormatting(RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view string, TextPaint textPaint) { - DrawText(rt, coords, textPaint, string, true); + DrawText(rt, coords, string, textPaint, true); } void DrawTextBasic(RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, TextPaint textPaint) @@ -128,12 +128,12 @@ void DrawTextBasic(RenderTarget& rt, const ScreenCoordsXY& coords, StringId form { utf8 buffer[512]; FormatStringLegacy(buffer, sizeof(buffer), format, ft.Data()); - DrawText(rt, coords, textPaint, buffer); + DrawText(rt, coords, buffer, textPaint); } void DrawTextBasic(RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view string, TextPaint textPaint) { - DrawText(rt, coords, textPaint, string); + DrawText(rt, coords, string, textPaint); } void DrawTextEllipsised(RenderTarget& rt, const ScreenCoordsXY& coords, int32_t width, StringId format, TextPaint textPaint) @@ -152,7 +152,7 @@ void DrawTextEllipsised( void DrawTextEllipsised(RenderTarget& rt, const ScreenCoordsXY& coords, int32_t width, u8string string, TextPaint textPaint) { GfxClipString(const_cast(string.c_str()), width, textPaint.FontStyle); - DrawText(rt, coords, textPaint, string); + DrawText(rt, coords, string, textPaint); } int32_t DrawTextWrapped(RenderTarget& rt, const ScreenCoordsXY& coords, int32_t width, StringId format, TextPaint textPaint) diff --git a/src/openrct2/drawing/Text.h b/src/openrct2/drawing/Text.h index 10f4dd160b..140d80794c 100644 --- a/src/openrct2/drawing/Text.h +++ b/src/openrct2/drawing/Text.h @@ -210,7 +210,8 @@ struct TextPaint } }; -void DrawTextNoFormatting(OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view string, TextPaint textPaint = {}); +void DrawTextNoFormatting( + OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, u8string_view string, TextPaint textPaint = {}); void DrawTextBasic( OpenRCT2::Drawing::RenderTarget& rt, const ScreenCoordsXY& coords, StringId format, TextPaint textPaint = {});