From b78a1ac9f2690cfa4a950bc42a2be63d35126087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Fri, 14 Apr 2023 03:27:07 +0300 Subject: [PATCH] Use ScreenCoordsXY for PaintStringStruct --- src/openrct2/paint/Paint.cpp | 5 ++--- src/openrct2/paint/Paint.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index 7e3e5b6d68..f6b02ff64b 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -881,8 +881,7 @@ void PaintFloatingMoneyEffect( ps->args[2] = 0; ps->args[3] = 0; ps->y_offsets = reinterpret_cast(y_offsets); - ps->x = coord.x + offset_x; - ps->y = coord.y; + ps->ScreenPos = ScreenCoordsXY{ coord.x + offset_x, coord.y }; } /** @@ -905,7 +904,7 @@ void PaintDrawMoneyStructs(DrawPixelInfo& dpi, PaintStringStruct* ps) } GfxDrawStringWithYOffsets( - dpi, buffer, COLOUR_BLACK, { ps->x, ps->y }, reinterpret_cast(ps->y_offsets), forceSpriteFont, + dpi, buffer, COLOUR_BLACK, ps->ScreenPos, reinterpret_cast(ps->y_offsets), forceSpriteFont, FontStyle::Medium); } while ((ps = ps->next) != nullptr); } diff --git a/src/openrct2/paint/Paint.h b/src/openrct2/paint/Paint.h index be62e93d23..63c1292d66 100644 --- a/src/openrct2/paint/Paint.h +++ b/src/openrct2/paint/Paint.h @@ -66,8 +66,7 @@ struct PaintStringStruct { StringId string_id; PaintStringStruct* next; - int32_t x; - int32_t y; + ScreenCoordsXY ScreenPos; uint32_t args[4]; uint8_t* y_offsets; };