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:
committed by
GitHub
parent
ac2afdcfaf
commit
049164c400
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user