Use RGB macros
This commit is contained in:
+4
-3
@@ -2,6 +2,7 @@
|
||||
#include "util.h"
|
||||
#include "sprite.h"
|
||||
#include "palette.h"
|
||||
#include "constants/rgb.h"
|
||||
|
||||
const u32 gBitTable[] =
|
||||
{
|
||||
@@ -271,8 +272,8 @@ void BlendPalette(u16 palOffset, u16 numEntries, u8 coeff, u16 blendColor)
|
||||
s8 g = data1->g;
|
||||
s8 b = data1->b;
|
||||
struct PlttData *data2 = (struct PlttData *)&blendColor;
|
||||
gPlttBufferFaded[index] = ((r + (((data2->r - r) * coeff) >> 4)) << 0)
|
||||
| ((g + (((data2->g - g) * coeff) >> 4)) << 5)
|
||||
| ((b + (((data2->b - b) * coeff) >> 4)) << 10);
|
||||
gPlttBufferFaded[index] = RGB(r + (((data2->r - r) * coeff) >> 4),
|
||||
g + (((data2->g - g) * coeff) >> 4),
|
||||
b + (((data2->b - b) * coeff) >> 4));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user