mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix broken zoomed textures and palettes
Zoomed textures were failing to pass the image flags to the zoomed version of the texture. This would cause corrupted data to be passed as a tertiary colour to the palette function. Also due to not recording the image flags in the palette hash map a tertiary colour of zero would be ignored and unremaped pink colour would be shown
This commit is contained in:
@@ -662,7 +662,7 @@ void OpenGLDrawingContext::DrawSprite(uint32 image, sint32 x, sint32 y, uint32 t
|
||||
zoomedDPI.pitch = _dpi->pitch;
|
||||
zoomedDPI.zoom_level = _dpi->zoom_level - 1;
|
||||
SetDPI(&zoomedDPI);
|
||||
DrawSprite((image << 28) | (g1Id - g1Element->zoomed_offset), x >> 1, y >> 1, tertiaryColour);
|
||||
DrawSprite((image & 0xE0000000) | (g1Id - g1Element->zoomed_offset), x >> 1, y >> 1, tertiaryColour);
|
||||
return;
|
||||
}
|
||||
if (g1Element->flags & (1 << 5))
|
||||
|
||||
@@ -70,7 +70,7 @@ CachedTextureInfo TextureCache::GetOrLoadPaletteTexture(uint32 image, uint32 ter
|
||||
if ((image & (IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | IMAGE_TYPE_TRANSPARENT)) == 0)
|
||||
return CachedTextureInfo{ 0 };
|
||||
|
||||
uint32 uniquePaletteId = 0;
|
||||
uint32 uniquePaletteId = image & (IMAGE_TYPE_REMAP | IMAGE_TYPE_REMAP_2_PLUS | IMAGE_TYPE_TRANSPARENT);
|
||||
if (!(image & IMAGE_TYPE_REMAP_2_PLUS)) {
|
||||
uniquePaletteId = (image >> 19) & 0xFF;
|
||||
if (!(image & IMAGE_TYPE_TRANSPARENT)) {
|
||||
|
||||
Reference in New Issue
Block a user