Use RGB macros
This commit is contained in:
+4
-4
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user