1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00

Close #11561: Use ScreenCoordsXY in gfx_draw_string()

* Fix #11572 create gfx_draw_string() overload

created the overload and changed all calls of the old function to the new (using const ScreenCoordsXY&)

...
This commit is contained in:
TomasZilinek
2020-05-10 14:49:15 +02:00
committed by GitHub
parent 783494df68
commit 9fde6a74c3
23 changed files with 219 additions and 191 deletions

View File

@@ -281,7 +281,7 @@ int32_t chat_history_draw_string(rct_drawpixelinfo* dpi, void* args, const Scree
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
gfx_draw_string(dpi, (char*)"", TEXT_COLOUR_255, dpi->x, dpi->y);
gfx_draw_string(dpi, (char*)"", TEXT_COLOUR_255, { dpi->x, dpi->y });
char* buffer = gCommonStringFormatBuffer;
format_string(buffer, 256, STR_STRING, args);
@@ -300,7 +300,7 @@ int32_t chat_history_draw_string(rct_drawpixelinfo* dpi, void* args, const Scree
lineY = screenCoords.y;
for (int32_t line = 0; line <= numLines; ++line)
{
gfx_draw_string(dpi, buffer, TEXT_COLOUR_254, screenCoords.x, lineY - (numLines * lineHeight));
gfx_draw_string(dpi, buffer, TEXT_COLOUR_254, { screenCoords.x, lineY - (numLines * lineHeight) });
buffer = get_string_end(buffer) + 1;
lineY += lineHeight;
}