Document UpdateLegendaryMarkingColor (#2221)

This commit is contained in:
Martin Griffin 2025-12-30 19:39:09 +00:00 committed by GitHub
parent 9045b9b582
commit 13b7dc4401
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -858,10 +858,10 @@ static void UpdateLegendaryMarkingColor(u8 frameNum)
{
if ((frameNum % 4) == 0) // Change color every 4th frame
{
s32 intensity = Cos(frameNum, 128) + 128;
s32 r = 31 - ((intensity * 32 - intensity) / 256);
s32 g = 31 - (intensity * 22 / 256);
s32 b = 12;
s32 intensity = Cos(frameNum, Q_8_8(0.5)) + Q_8_8(0.5);
u32 r = 31 - Q_8_8_TO_INT(intensity * 31);
u32 g = 31 - Q_8_8_TO_INT(intensity * 22);
u32 b = 12;
u16 color = RGB(r, g, b);
LoadPalette(&color, BG_PLTT_ID(14) + 15, sizeof(color));