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

Part of #12017 - create gfx_draw_sprite overload (#12026)

* Part of #12017 - create gfx_draw_sprite overload

Part 1. Creates the overload and replaces about a half of the calls since there are too many for one PR.

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
TomasZilinek
2020-06-23 23:32:34 +02:00
committed by GitHub
parent d2542194fa
commit 9d965ccfb6
31 changed files with 169 additions and 178 deletions

View File

@@ -81,9 +81,8 @@ void FootpathItemObject::Unload()
void FootpathItemObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const
{
int32_t x = width / 2;
int32_t y = height / 2;
gfx_draw_sprite(dpi, _legacyType.image, x - 22, y - 24, 0);
auto screenCoords = ScreenCoordsXY{ width / 2, height / 2 };
gfx_draw_sprite(dpi, _legacyType.image, screenCoords - ScreenCoordsXY{ 22, 24 }, 0);
}
static uint8_t ParseDrawType(const std::string& s)