1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-20 06:12:57 +01:00

Fix #12020 - Use ScreenCoordsXY on gfx_draw_sprite_palette_set_software (#12028)

* Fix #12020 - Use ScreenCoordsXY on gfx_draw_sprite_palette_set_software

Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
frutiemax
2020-06-21 21:52:48 -04:00
committed by GitHub
parent 80efc26a80
commit 4a17d1d64e
4 changed files with 19 additions and 7 deletions

View File

@@ -13,6 +13,7 @@
# include <algorithm>
# include <openrct2/drawing/Drawing.h>
# include <openrct2/world/Location.hpp>
# include <stdexcept>
# include <vector>
@@ -320,7 +321,9 @@ rct_drawpixelinfo TextureCache::GetGlyphAsDPI(uint32_t image, const PaletteMap&
int32_t height = g1Element->height;
rct_drawpixelinfo dpi = CreateDPI(width, height);
gfx_draw_sprite_palette_set_software(&dpi, ImageId::FromUInt32(image), -g1Element->x_offset, -g1Element->y_offset, palette);
const auto glyphCoords = ScreenCoordsXY{ -g1Element->x_offset, -g1Element->y_offset };
gfx_draw_sprite_palette_set_software(&dpi, ImageId::FromUInt32(image), glyphCoords, palette);
return dpi;
}