From 1b6899a95417184accdb4e818d8cb9745e0b9c3d Mon Sep 17 00:00:00 2001 From: Ted John Date: Mon, 1 Jun 2020 20:01:37 +0100 Subject: [PATCH] Fix #11845: Disabled icons are not shown as disabled (#11857) --- src/openrct2/drawing/X8DrawingEngine.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index 73e54b7a53..756cc310a2 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -740,8 +740,11 @@ void X8DrawingContext::DrawSpriteRawMasked(int32_t x, int32_t y, uint32_t maskIm void X8DrawingContext::DrawSpriteSolid(uint32_t image, int32_t x, int32_t y, uint8_t colour) { + uint8_t palette[256]; + std::fill_n(palette, sizeof(palette), colour); + palette[0] = 0; gfx_draw_sprite_palette_set_software( - _dpi, ImageId::FromUInt32((image & 0x7FFFF) | IMAGE_TYPE_REMAP), x, y, PaletteMap::GetDefault()); + _dpi, ImageId::FromUInt32((image & 0x7FFFF) | IMAGE_TYPE_REMAP), x, y, PaletteMap(palette)); } void X8DrawingContext::DrawGlyph(uint32_t image, int32_t x, int32_t y, const PaletteMap& paletteMap)