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 Co-authored-by: Tulio Leao <tupaschoal@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user