mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 19:24:16 +01:00
Merge pull request #1902 from AsparagusEduardo/pret/rgb
Using RGB color constants where appropiate
This commit is contained in:
commit
da238562f0
@ -1045,10 +1045,10 @@ const struct SpriteTemplate gSilverWindSmallSparkSpriteTemplate =
|
||||
|
||||
const u16 gMagicalLeafBlendColors[] =
|
||||
{
|
||||
RGB(31, 0, 0),
|
||||
RGB_RED,
|
||||
RGB(31, 19, 0),
|
||||
RGB(31, 31, 0),
|
||||
RGB(0, 31, 0),
|
||||
RGB_YELLOW,
|
||||
RGB_GREEN,
|
||||
RGB(5, 14, 31),
|
||||
RGB(22, 10, 31),
|
||||
RGB(22, 21, 31),
|
||||
@ -1971,10 +1971,10 @@ const struct SpriteTemplate gWavyMusicNotesSpriteTemplate =
|
||||
|
||||
const u16 gParticlesColorBlendTable[][6] =
|
||||
{
|
||||
{ANIM_TAG_MUSIC_NOTES, RGB(31, 31, 31), RGB(31, 26, 28), RGB(31, 22, 26), RGB(31, 17, 24), RGB(31, 13, 22)},
|
||||
{ANIM_TAG_BENT_SPOON, RGB(31, 31, 31), RGB(25, 31, 26), RGB(20, 31, 21), RGB(15, 31, 16), RGB(10, 31, 12)},
|
||||
{ANIM_TAG_SPHERE_TO_CUBE, RGB(31, 31, 31), RGB(31, 31, 24), RGB(31, 31, 17), RGB(31, 31, 10), RGB(31, 31, 3)},
|
||||
{ANIM_TAG_LARGE_FRESH_EGG, RGB(31, 31, 31), RGB(26, 28, 31), RGB(21, 26, 31), RGB(16, 24, 31), RGB(12, 22, 31)},
|
||||
{ANIM_TAG_MUSIC_NOTES, RGB_WHITE, RGB(31, 26, 28), RGB(31, 22, 26), RGB(31, 17, 24), RGB(31, 13, 22)},
|
||||
{ANIM_TAG_BENT_SPOON, RGB_WHITE, RGB(25, 31, 26), RGB(20, 31, 21), RGB(15, 31, 16), RGB(10, 31, 12)},
|
||||
{ANIM_TAG_SPHERE_TO_CUBE, RGB_WHITE, RGB(31, 31, 24), RGB(31, 31, 17), RGB(31, 31, 10), RGB(31, 31, 3)},
|
||||
{ANIM_TAG_LARGE_FRESH_EGG, RGB_WHITE, RGB(26, 28, 31), RGB(21, 26, 31), RGB(16, 24, 31), RGB(12, 22, 31)},
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gFastFlyingMusicNotesSpriteTemplate =
|
||||
@ -4343,7 +4343,7 @@ static void AnimLockOnTarget_Step4(struct Sprite *sprite)
|
||||
sprite->data[1] = 0;
|
||||
}
|
||||
|
||||
BlendPalettes(GetBattlePalettesMask(TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE), sprite->data[1], RGB(31, 31, 31));
|
||||
BlendPalettes(GetBattlePalettesMask(TRUE, TRUE, TRUE, TRUE, TRUE, FALSE, FALSE), sprite->data[1], RGB_WHITE);
|
||||
if (sprite->data[1] == 16)
|
||||
{
|
||||
int pal;
|
||||
@ -5178,7 +5178,7 @@ void AnimTask_DoubleTeam(u8 taskId)
|
||||
for (i = 1; i < 16; i++)
|
||||
gPlttBufferUnfaded[r3 + i] = gPlttBufferUnfaded[r4 + i];
|
||||
|
||||
BlendPalette(r3, 16, 11, RGB(0, 0, 0));
|
||||
BlendPalette(r3, 16, 11, RGB_BLACK);
|
||||
task->data[3] = 0;
|
||||
i = 0;
|
||||
while (i < 2 && (obj = CloneBattlerSpriteWithBlend(0)) >= 0)
|
||||
|
@ -3114,7 +3114,7 @@ static void AnimTask_FakeOut_Step2(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].data[11] = 0x88;
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG3 | BLDCNT_EFFECT_LIGHTEN);
|
||||
BlendPalettes(GetBattlePalettesMask(TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), 16, RGB(31, 31, 31));
|
||||
BlendPalettes(GetBattlePalettesMask(TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE), 16, RGB_WHITE);
|
||||
}
|
||||
else if (gTasks[taskId].data[10] > 4)
|
||||
{
|
||||
|
@ -3896,7 +3896,7 @@ static void AnimTask_FacadeColorBlend_Step(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
BlendPalette(gTasks[taskId].data[2], 16, 0, RGB(0, 0, 0));
|
||||
BlendPalette(gTasks[taskId].data[2], 16, 0, RGB_BLACK);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
}
|
||||
|
@ -1005,7 +1005,7 @@ static void AnimTask_CurseStretchingBlackBg_Step1(u8 taskId)
|
||||
top = 0;
|
||||
bottom = 112;
|
||||
selectedPalettes = GetBattlePalettesMask(TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);
|
||||
BeginNormalPaletteFade(selectedPalettes, 0, 16, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(selectedPalettes, 0, 16, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = AnimTask_CurseStretchingBlackBg_Step2;
|
||||
}
|
||||
|
||||
|
@ -709,7 +709,7 @@ static void AnimTask_FlashAnimTagWithColor_Step2(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
selectedPalettes = 1 << (IndexOfSpritePaletteTag(gTasks[taskId].data[7]) + 16);
|
||||
BeginNormalPaletteFade(selectedPalettes, 0, 0, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(selectedPalettes, 0, 0, 0, RGB_BLACK);
|
||||
DestroyAnimVisualTask(taskId);
|
||||
}
|
||||
}
|
||||
|
@ -384,7 +384,7 @@ const u16 gBallOpenFadeColors[] =
|
||||
[BALL_PREMIER] = RGB(31, 9, 10),
|
||||
|
||||
// Garbage data
|
||||
RGB(0, 0, 0),
|
||||
RGB_BLACK,
|
||||
RGB(1, 16, 0),
|
||||
RGB(3, 0, 1),
|
||||
RGB(1, 8, 0),
|
||||
@ -1309,12 +1309,12 @@ static void SpriteCB_Ball_Capture_Step(struct Sprite *sprite)
|
||||
if (sprite->sTimer == 40)
|
||||
{
|
||||
PlaySE(SE_RG_BALL_CLICK);
|
||||
BlendPalettes(0x10000 << sprite->oam.paletteNum, 6, RGB(0, 0, 0));
|
||||
BlendPalettes(0x10000 << sprite->oam.paletteNum, 6, RGB_BLACK);
|
||||
MakeCaptureStars(sprite);
|
||||
}
|
||||
else if (sprite->sTimer == 60)
|
||||
{
|
||||
BeginNormalPaletteFade(0x10000 << sprite->oam.paletteNum, 2, 6, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(0x10000 << sprite->oam.paletteNum, 2, 6, 0, RGB_BLACK);
|
||||
}
|
||||
else if (sprite->sTimer == 95)
|
||||
{
|
||||
@ -1352,7 +1352,7 @@ static void SpriteCB_Ball_FadeOut(struct Sprite *sprite)
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(16, 0));
|
||||
paletteIndex = IndexOfSpritePaletteTag(sprite->template->paletteTag);
|
||||
BeginNormalPaletteFade(1 << (paletteIndex + 0x10), 0, 0, 16, RGB(31, 31, 31));
|
||||
BeginNormalPaletteFade(1 << (paletteIndex + 0x10), 0, 0, 16, RGB_WHITE);
|
||||
sprite->sState++;
|
||||
break;
|
||||
case 1:
|
||||
@ -2041,7 +2041,7 @@ u8 LaunchBallFadeMonTask(bool8 unfadeLater, u8 spritePalNum, u32 selectedPalette
|
||||
gTasks[taskId].func = Task_FadeMon_ToNormal;
|
||||
}
|
||||
|
||||
BeginNormalPaletteFade(selectedPalettes, 0, 0, 16, RGB(31, 31, 31));
|
||||
BeginNormalPaletteFade(selectedPalettes, 0, 0, 16, RGB_WHITE);
|
||||
return taskId;
|
||||
}
|
||||
|
||||
|
@ -133,10 +133,10 @@ void AnimTask_SetCamouflageBlend(u8 taskId)
|
||||
gBattleAnimArgs[4] = RGB(14, 9, 3);
|
||||
break;
|
||||
case BATTLE_TERRAIN_BUILDING:
|
||||
gBattleAnimArgs[4] = RGB(31, 31, 31);
|
||||
gBattleAnimArgs[4] = RGB_WHITE;
|
||||
break;
|
||||
case BATTLE_TERRAIN_PLAIN:
|
||||
gBattleAnimArgs[4] = RGB(31, 31, 31);
|
||||
gBattleAnimArgs[4] = RGB_WHITE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2898,13 +2898,13 @@ static u32 Cmd_FinishGame(struct BerryCrushGame *game, u8 *args)
|
||||
case 0:
|
||||
game->gameState = STATE_FINISHED;
|
||||
PlaySE(SE_M_STRENGTH);
|
||||
BlendPalettes(PALETTES_ALL, 8, RGB(31, 31, 0));
|
||||
BlendPalettes(PALETTES_ALL, 8, RGB_YELLOW);
|
||||
game->gfx.counter = 2;
|
||||
break;
|
||||
case 1:
|
||||
if (--game->gfx.counter != (u8)-1)
|
||||
return 0;
|
||||
BlendPalettes(PALETTES_ALL, 0, RGB(31, 31, 0));
|
||||
BlendPalettes(PALETTES_ALL, 0, RGB_YELLOW);
|
||||
game->gfx.vibrationIdx = 4;
|
||||
game->gfx.counter = 0;
|
||||
game->gfx.numVibrations = sIntroOutroVibrationData[game->gfx.vibrationIdx][0];
|
||||
@ -2955,13 +2955,13 @@ static u32 Cmd_HandleTimeUp(struct BerryCrushGame *game, u8 *args)
|
||||
case 0:
|
||||
game->gameState = STATE_TIMES_UP;
|
||||
PlaySE(SE_FAILURE);
|
||||
BlendPalettes(PALETTES_ALL, 8, RGB(31, 0, 0));
|
||||
BlendPalettes(PALETTES_ALL, 8, RGB_RED);
|
||||
game->gfx.counter = 4;
|
||||
break;
|
||||
case 1:
|
||||
if (--game->gfx.counter != (u8)-1)
|
||||
return 0;
|
||||
BlendPalettes(PALETTES_ALL, 0, RGB(31, 0, 0));
|
||||
BlendPalettes(PALETTES_ALL, 0, RGB_RED);
|
||||
game->gfx.counter = 0;
|
||||
break;
|
||||
case 2:
|
||||
|
@ -237,7 +237,7 @@ void CableCar(void)
|
||||
{
|
||||
LockPlayerFieldControls();
|
||||
CreateTask(Task_LoadCableCar, 1);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
static void CB2_LoadCableCar(void)
|
||||
@ -341,7 +341,7 @@ static void CB2_LoadCableCar(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 8:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 3, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 3, 16, 0, RGB_BLACK);
|
||||
FadeInNewBGM(MUS_CABLE_CAR, 1);
|
||||
SetBgRegs(TRUE);
|
||||
gMain.state++;
|
||||
@ -459,7 +459,7 @@ static void Task_CableCar(u8 taskId)
|
||||
if (sCableCar->timer == 570)
|
||||
{
|
||||
sCableCar->state = 3;
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 3, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 3, 0, 16, RGB_BLACK);
|
||||
FadeOutBGM(4);
|
||||
}
|
||||
break;
|
||||
|
@ -248,7 +248,7 @@ static void HoldContestPainting(void)
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
{
|
||||
sHoldState++;
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
if (sVarsInitialized)
|
||||
|
@ -1285,7 +1285,7 @@ static void Task_SlotMachine(u8 taskId)
|
||||
// SLOTTASK_UNFADE
|
||||
static bool8 SlotTask_UnfadeScreen(struct Task *task)
|
||||
{
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
LoadPikaPowerMeter(sSlotMachine->pikaPowerBolts);
|
||||
sSlotMachine->state++; // SLOTTASK_WAIT_FADE
|
||||
return FALSE;
|
||||
@ -1731,7 +1731,7 @@ static bool8 SlotTask_EndGame(struct Task *task)
|
||||
{
|
||||
SetCoins(sSlotMachine->coins);
|
||||
TryPutFindThatGamerOnAir(GetCoins());
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sSlotMachine->state++; // SLOTTASK_FREE
|
||||
return FALSE;
|
||||
}
|
||||
@ -3904,7 +3904,7 @@ static void Task_InfoBox(u8 taskId)
|
||||
|
||||
static void InfoBox_FadeIn(struct Task *task)
|
||||
{
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
task->tState++;
|
||||
}
|
||||
|
||||
@ -3928,7 +3928,7 @@ static void InfoBox_AddText(struct Task *task)
|
||||
{
|
||||
AddTextPrinterParameterized3(1, FONT_NORMAL, 2, 5, sColors_ReeltimeHelp, 0, gText_ReelTimeHelp);
|
||||
CopyWindowToVram(1, COPYWIN_FULL);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
task->tState++;
|
||||
}
|
||||
|
||||
@ -3940,7 +3940,7 @@ static void InfoBox_WaitInput(struct Task *task)
|
||||
ClearWindowTilemap(1);
|
||||
CopyWindowToVram(1, COPYWIN_MAP);
|
||||
RemoveWindow(1);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
task->tState++;
|
||||
}
|
||||
}
|
||||
@ -3961,7 +3961,7 @@ static void InfoBox_CreateDigitalDisplay(struct Task *task)
|
||||
static void InfoBox_LoadPikaPowerMeter(struct Task *task)
|
||||
{
|
||||
LoadPikaPowerMeter(sSlotMachine->pikaPowerBolts);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
task->tState++;
|
||||
}
|
||||
|
||||
@ -7853,7 +7853,7 @@ static const u16 sUnusedColors[] =
|
||||
RGB(27, 27, 27),
|
||||
RGB(8, 11, 26),
|
||||
RGB(11, 21, 13),
|
||||
RGB(31, 31, 31),
|
||||
RGB_WHITE,
|
||||
RGB(16, 26, 21),
|
||||
RGB(0, 22, 31),
|
||||
RGB(26, 21, 0),
|
||||
|
Loading…
Reference in New Issue
Block a user