1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-25 15:54:31 +01:00

Use ScreenCoordsXY for PaintStringStruct

This commit is contained in:
ζeh Matt
2023-04-14 03:27:07 +03:00
parent d35933dc9f
commit b78a1ac9f2
2 changed files with 3 additions and 5 deletions

View File

@@ -881,8 +881,7 @@ void PaintFloatingMoneyEffect(
ps->args[2] = 0;
ps->args[3] = 0;
ps->y_offsets = reinterpret_cast<uint8_t*>(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<int8_t*>(ps->y_offsets), forceSpriteFont,
dpi, buffer, COLOUR_BLACK, ps->ScreenPos, reinterpret_cast<int8_t*>(ps->y_offsets), forceSpriteFont,
FontStyle::Medium);
} while ((ps = ps->next) != nullptr);
}

View File

@@ -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;
};