From c82510e22bffb98fd9c63dc246c332dd1da602cd Mon Sep 17 00:00:00 2001 From: Ariel A <24759293+aarant@users.noreply.github.com> Date: Tue, 3 May 2022 23:46:07 -0400 Subject: [PATCH] Gamma shift now ignores special sprite palette tags (lights, emotes). --- src/field_weather.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/field_weather.c b/src/field_weather.c index 7a45e4ebc6..721660adde 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -494,7 +494,10 @@ static void ApplyGammaShift(u8 startPalIndex, u8 numPalettes, s8 gammaIndex) { u8 r, g, b; - if (sPaletteGammaTypes[curPalIndex] == GAMMA_ALT || curPalIndex - 16 == gWeatherPtr->altGammaSpritePalIndex) + // don't blend special sprite palette tags + if (sPaletteGammaTypes[curPalIndex] == GAMMA_ALT || + (curPalIndex >= 16 && (curPalIndex - 16 == gWeatherPtr->altGammaSpritePalIndex || + GetSpritePaletteTagByPaletteNum(curPalIndex - 16) >> 15))) gammaTable = gWeatherPtr->altGammaShifts[gammaIndex]; else gammaTable = gWeatherPtr->gammaShifts[gammaIndex];