1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #10015: Crash when certain images are drawn (#10016)

This commit is contained in:
ζeh Matt
2019-09-23 22:37:28 +02:00
committed by Michael Steenbeek
parent b2a42de579
commit b82d1bbc64

View File

@@ -510,7 +510,7 @@ void FASTCALL gfx_bmp_sprite_to_buffer(
uint8_t* FASTCALL gfx_draw_sprite_get_palette(ImageId imageId)
{
if (imageId.IsRemap())
if (!imageId.HasSecondary())
{
uint8_t palette_ref = imageId.GetRemap();
if (!imageId.IsBlended())
@@ -529,7 +529,7 @@ uint8_t* FASTCALL gfx_draw_sprite_get_palette(ImageId imageId)
return g1->offset;
}
}
else if (imageId.HasSecondary())
else
{
uint8_t* palette_pointer = gPeepPalette;
@@ -562,10 +562,6 @@ uint8_t* FASTCALL gfx_draw_sprite_get_palette(ImageId imageId)
return palette_pointer;
}
else
{
return nullptr;
}
}
void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo* dpi, ImageId imageId, int32_t x, int32_t y)