1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00

Pass dpi as ref when drawing object preview

This commit is contained in:
Michael Steenbeek
2023-03-13 16:52:49 +01:00
committed by GitHub
parent ac2afdcfaf
commit 049164c400
35 changed files with 74 additions and 74 deletions

View File

@@ -54,11 +54,11 @@ void WaterObject::Unload()
_legacyType.image_id = 0;
}
void WaterObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t height) const
void WaterObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const
{
// Write (no image)
auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 };
DrawTextBasic(*dpi, screenCoords, STR_WINDOW_NO_IMAGE, {}, { TextAlignment::CENTRE });
DrawTextBasic(dpi, screenCoords, STR_WINDOW_NO_IMAGE, {}, { TextAlignment::CENTRE });
}
void WaterObject::ReadJson([[maybe_unused]] IReadObjectContext* context, json_t& root)