mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 08:14:38 +01:00
Pass dpi as ref when drawing object preview
This commit is contained in:
committed by
GitHub
parent
ac2afdcfaf
commit
049164c400
@@ -45,7 +45,7 @@ void StationObject::Unload()
|
||||
ShelterImageId = ImageIndexUndefined;
|
||||
}
|
||||
|
||||
void StationObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t height) const
|
||||
void StationObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const
|
||||
{
|
||||
auto screenCoords = ScreenCoordsXY{ width / 2, (height / 2) + 16 };
|
||||
|
||||
@@ -64,16 +64,16 @@ void StationObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t heigh
|
||||
imageId = imageId.WithSecondary(colour1);
|
||||
}
|
||||
|
||||
GfxDrawSprite(dpi, imageId, screenCoords);
|
||||
GfxDrawSprite(&dpi, imageId, screenCoords);
|
||||
if (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT)
|
||||
{
|
||||
GfxDrawSprite(dpi, tImageId, screenCoords);
|
||||
GfxDrawSprite(&dpi, tImageId, screenCoords);
|
||||
}
|
||||
|
||||
GfxDrawSprite(dpi, imageId.WithIndexOffset(4), screenCoords);
|
||||
GfxDrawSprite(&dpi, imageId.WithIndexOffset(4), screenCoords);
|
||||
if (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT)
|
||||
{
|
||||
GfxDrawSprite(dpi, tImageId.WithIndexOffset(4), screenCoords);
|
||||
GfxDrawSprite(&dpi, tImageId.WithIndexOffset(4), screenCoords);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user