forked from rosebudai/OpenRCT2-Web
Pass dpi as ref when drawing object preview
This commit is contained in:
1 parent
ac2afdcfaf
commit
049164c400
35 files changed
+74
-74
No files matched your search
@@ -69,11 +69,11 @@ void FootpathObject::Unload()
|
||||
_legacyType.image = 0;
|
||||
}
|
||||
|
||||
void FootpathObject::DrawPreview(DrawPixelInfo* dpi, int32_t width, int32_t height) const
|
||||
void FootpathObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const
|
||||
{
|
||||
auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 };
|
||||
GfxDrawSprite(dpi, ImageId(_pathSurfaceDescriptor.PreviewImage), screenCoords - ScreenCoordsXY{ 49, 17 });
|
||||
GfxDrawSprite(dpi, ImageId(_queueSurfaceDescriptor.PreviewImage), screenCoords + ScreenCoordsXY{ 4, -17 });
|
||||
GfxDrawSprite(&dpi, ImageId(_pathSurfaceDescriptor.PreviewImage), screenCoords - ScreenCoordsXY{ 49, 17 });
|
||||
GfxDrawSprite(&dpi, ImageId(_queueSurfaceDescriptor.PreviewImage), screenCoords + ScreenCoordsXY{ 4, -17 });
|
||||
}
|
||||
|
||||
void FootpathObject::ReadJson(IReadObjectContext* context, json_t& root)
|
||||
|
||||
Reference in new issue
Block a user