1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 05:53:02 +01:00

add drawing of other object previews

This commit is contained in:
Ted John
2016-07-02 12:29:13 +01:00
parent ebcbb085d2
commit aa62c3f03f
19 changed files with 108 additions and 3 deletions

View File

@@ -68,6 +68,16 @@ void BannerObject::Unload()
gfx_object_free_images(_legacyType.image, GetImageTable()->GetCount());
}
void BannerObject::DrawPreview(rct_drawpixelinfo * dpi) const
{
int x = dpi->width / 2;
int y = dpi->height / 2;
uint32 imageId = 0x20D00000 | _legacyType.image;
gfx_draw_sprite(dpi, imageId + 0, x - 12, y + 8, 0);
gfx_draw_sprite(dpi, imageId + 1, x - 12, y + 8, 0);
}
const utf8 * BannerObject::GetName() const
{
const utf8 * name = GetStringTable()->GetString(OBJ_STRING_ID_NAME);