1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +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

@@ -71,12 +71,12 @@ void SceneryGroupObject::Unload()
_legacyType.image = 0;
}
void SceneryGroupObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t height) const
void SceneryGroupObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const
{
auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 };
const auto imageId = ImageId(_legacyType.image + 1, COLOUR_DARK_GREEN);
GfxDrawSprite(dpi, imageId, screenCoords - ScreenCoordsXY{ 15, 14 });
GfxDrawSprite(&dpi, imageId, screenCoords - ScreenCoordsXY{ 15, 14 });
}
static std::optional<uint8_t> GetSceneryType(const ObjectType type)