mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
* 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user