diff --git a/src/field_weather.c b/src/field_weather.c index e859cf856a..bd15ad0742 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -871,6 +871,15 @@ void UpdateSpritePaletteWithWeather(u8 spritePaletteIndex, bool8 allowFog) } break; } + // If faded out, i.e due to fadescreenswapbuffers, + // Copy unfaded palette to pal decomp buffer + // so it will be restored on fade-in + if (gPaletteFade.y == 16) + CpuFastCopy( + gPlttBufferUnfaded + OBJ_PLTT_ID(spritePaletteIndex), + gPaletteDecompressionBuffer + 2*OBJ_PLTT_ID(spritePaletteIndex), + PLTT_SIZE_4BPP + ); } void ApplyWeatherColorMapToPal(u8 paletteIndex) // now unused / obselete