mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 21:43:06 +01:00
Pass dpi as ref when drawing object preview
This commit is contained in:
committed by
GitHub
parent
ac2afdcfaf
commit
049164c400
@@ -43,12 +43,12 @@ void FootpathSurfaceObject::Unload()
|
||||
BaseImageId = 0;
|
||||
}
|
||||
|
||||
void FootpathSurfaceObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t height) const
|
||||
void FootpathSurfaceObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const
|
||||
{
|
||||
auto screenCoords = ScreenCoordsXY{ width / 2 - 16, height / 2 };
|
||||
GfxDrawSprite(dpi, ImageId(BaseImageId + 3), screenCoords);
|
||||
GfxDrawSprite(dpi, ImageId(BaseImageId + 16), { screenCoords.x + 32, screenCoords.y - 16 });
|
||||
GfxDrawSprite(dpi, ImageId(BaseImageId + 8), { screenCoords.x + 32, screenCoords.y + 16 });
|
||||
GfxDrawSprite(&dpi, ImageId(BaseImageId + 3), screenCoords);
|
||||
GfxDrawSprite(&dpi, ImageId(BaseImageId + 16), { screenCoords.x + 32, screenCoords.y - 16 });
|
||||
GfxDrawSprite(&dpi, ImageId(BaseImageId + 8), { screenCoords.x + 32, screenCoords.y + 16 });
|
||||
}
|
||||
|
||||
void FootpathSurfaceObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
|
||||
Reference in New Issue
Block a user