mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 08:45:00 +01:00
Pass dpi as ref when drawing object preview
This commit is contained in:
committed by
GitHub
parent
ac2afdcfaf
commit
049164c400
@@ -95,7 +95,7 @@ void SmallSceneryObject::Unload()
|
||||
_legacyType.image = 0;
|
||||
}
|
||||
|
||||
void SmallSceneryObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t height) const
|
||||
void SmallSceneryObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const
|
||||
{
|
||||
auto imageId = ImageId(_legacyType.image);
|
||||
if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_HAS_PRIMARY_COLOUR))
|
||||
@@ -119,12 +119,12 @@ void SmallSceneryObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t
|
||||
screenCoords.y -= 12;
|
||||
}
|
||||
|
||||
GfxDrawSprite(dpi, imageId, screenCoords);
|
||||
GfxDrawSprite(&dpi, imageId, screenCoords);
|
||||
|
||||
if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_HAS_GLASS))
|
||||
{
|
||||
imageId = ImageId(_legacyType.image + 4).WithTransparency(COLOUR_BORDEAUX_RED);
|
||||
GfxDrawSprite(dpi, imageId, screenCoords);
|
||||
GfxDrawSprite(&dpi, imageId, screenCoords);
|
||||
}
|
||||
|
||||
if (_legacyType.HasFlag(SMALL_SCENERY_FLAG_ANIMATED_FG))
|
||||
@@ -134,7 +134,7 @@ void SmallSceneryObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t
|
||||
{
|
||||
imageId = imageId.WithSecondary(COLOUR_YELLOW);
|
||||
}
|
||||
GfxDrawSprite(dpi, imageId, screenCoords);
|
||||
GfxDrawSprite(&dpi, imageId, screenCoords);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user