summaryrefslogtreecommitdiff
path: root/src/field_weather.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/field_weather.c')
-rw-r--r--src/field_weather.c8
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++;
}
}