diff options
author | SphericalIce <sphericalice@outlook.com> | 2021-02-14 22:08:19 +0000 |
---|---|---|
committer | SphericalIce <sphericalice@outlook.com> | 2021-02-14 22:08:19 +0000 |
commit | 27dc32de26e6697f8b493fd33667bb353d4d2453 (patch) | |
tree | 5a5a3a3864afe3444d5bba98a6c40ef266705975 /src/field_weather.c | |
parent | be0699bd641c134aca365600e2e8b12da93da860 (diff) |
Use RGB macros
Diffstat (limited to 'src/field_weather.c')
-rw-r--r-- | src/field_weather.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/field_weather.c b/src/field_weather.c index 25ee0582a..02e3a0cb0 100644 --- a/src/field_weather.c +++ b/src/field_weather.c @@ -494,7 +494,7 @@ static void ApplyGammaShift(u8 startPalIndex, u8 numPalettes, s8 gammaIndex) r = gammaTable[baseColor.r]; g = gammaTable[baseColor.g]; b = gammaTable[baseColor.b]; - gPlttBufferFaded[palOffset++] = (b << 10) | (g << 5) | r; + gPlttBufferFaded[palOffset++] = RGB2(r, g, b); } } @@ -579,7 +579,7 @@ static void ApplyGammaShiftWithBlend(u8 startPalIndex, u8 numPalettes, s8 gammaI r += ((rBlend - r) * blendCoeff) >> 4; g += ((gBlend - g) * blendCoeff) >> 4; b += ((bBlend - b) * blendCoeff) >> 4; - gPlttBufferFaded[palOffset++] = (b << 10) | (g << 5) | r; + gPlttBufferFaded[palOffset++] = RGB2(r, g, b); } } @@ -636,7 +636,7 @@ static void ApplyDroughtGammaShiftWithBlend(s8 gammaIndex, u8 blendCoeff, u16 bl g2 += ((gBlend - g2) * blendCoeff) >> 4; b2 += ((bBlend - b2) * blendCoeff) >> 4; - gPlttBufferFaded[palOffset++] = (b2 << 10) | (g2 << 5) | r2; + gPlttBufferFaded[palOffset++] = RGB2(r2, g2, b2); } } } @@ -678,7 +678,7 @@ static void ApplyFogBlend(u8 blendCoeff, u16 blendColor) g += ((gBlend - g) * blendCoeff) >> 4; b += ((bBlend - b) * blendCoeff) >> 4; - gPlttBufferFaded[palOffset] = (b << 10) | (g << 5) | r; + gPlttBufferFaded[palOffset] = RGB2(r, g, b); palOffset++; } } |