1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00

fix drawing of object preview

We can't use dpi->width and dpi->height as they only define the clip region, not the viewport
This commit is contained in:
Ted John
2016-07-11 22:09:15 +01:00
parent 81a597ab0d
commit 4bf9748143
27 changed files with 49 additions and 49 deletions

View File

@@ -53,10 +53,10 @@ void EntranceObject::Unload()
_legacyType.image_id = 0;
}
void EntranceObject::DrawPreview(rct_drawpixelinfo * dpi) const
void EntranceObject::DrawPreview(rct_drawpixelinfo * dpi, sint32 width, sint32 height) const
{
int x = dpi->width / 2;
int y = dpi->height / 2;
sint32 x = width / 2;
sint32 y = height / 2;
uint32 imageId = _legacyType.image_id;
gfx_draw_sprite(dpi, imageId + 1, x - 32, y + 14, 0);