mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
Add palette selection constants
This commit is contained in:
parent
c6141fea83
commit
b71b10623b
@ -14,6 +14,10 @@
|
||||
#define PALETTE_FADE_STATUS_DONE 0
|
||||
#define PALETTE_FADE_STATUS_LOADING 0xFF
|
||||
|
||||
#define PALETTES_BG 0x0000FFFF
|
||||
#define PALETTES_OBJECTS 0xFFFF0000
|
||||
#define PALETTES_ALL (PALETTES_BG | PALETTES_OBJECTS)
|
||||
|
||||
enum
|
||||
{
|
||||
FAST_FADE_IN_FROM_WHITE,
|
||||
|
@ -2434,7 +2434,7 @@ static void PlayerHandleFaintAnimation(void)
|
||||
|
||||
static void PlayerHandlePaletteFade(void)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 2, 0, 16, RGB_BLACK);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
@ -2655,7 +2655,7 @@ static void PlayerHandleChooseItem(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattlerControllerFuncs[gActiveBattler] = OpenBagAndChooseItem;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
|
||||
@ -2682,7 +2682,7 @@ static void PlayerHandleChoosePokemon(void)
|
||||
*(&gBattleStruct->battlerPreventingSwitchout) = gBattleBufferA[gActiveBattler][1] >> 4;
|
||||
*(&gBattleStruct->prevSelectedPartySlot) = gBattleBufferA[gActiveBattler][2];
|
||||
*(&gBattleStruct->abilityPreventingSwitchout) = gBattleBufferA[gActiveBattler][3];
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattlerControllerFuncs[gActiveBattler] = OpenPartyMenuToChooseMon;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
@ -2691,7 +2691,7 @@ static void PlayerHandleChoosePokemon(void)
|
||||
static void PlayerHandleCmd23(void)
|
||||
{
|
||||
BattleStopLowHpSound();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 2, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 2, 0, 16, RGB_BLACK);
|
||||
PlayerBufferExecCompleted();
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ static void SafariHandleChooseMove(void)
|
||||
|
||||
static void SafariHandleChooseItem(void)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattlerControllerFuncs[gActiveBattler] = SafariOpenPokeblockCase;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
|
@ -1250,7 +1250,7 @@ static void WallyHandleChooseMove(void)
|
||||
|
||||
static void WallyHandleChooseItem(void)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattlerControllerFuncs[gActiveBattler] = OpenBagAfterPaletteFade;
|
||||
gBattlerInMenuId = gActiveBattler;
|
||||
}
|
||||
|
@ -3393,7 +3393,7 @@ static void Task_HandleInfoCardInput(u8 taskId)
|
||||
case STATE_FADE_IN:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_WAIT_FADE;
|
||||
}
|
||||
break;
|
||||
@ -3406,7 +3406,7 @@ static void Task_HandleInfoCardInput(u8 taskId)
|
||||
switch (i)
|
||||
{
|
||||
case INFOCARD_INPUT_AB:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_CLOSE_CARD;
|
||||
break;
|
||||
case TRAINERCARD_INPUT_UP ... TRAINERCARD_INPUT_RIGHT:
|
||||
@ -4946,7 +4946,7 @@ static void Task_HandleTourneyTreeInput(u8 taskId)
|
||||
case STATE_FADE_IN:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_WAIT_FADE;
|
||||
StartSpriteAnim(&gSprites[spriteId], 1);
|
||||
}
|
||||
@ -4960,17 +4960,17 @@ static void Task_HandleTourneyTreeInput(u8 taskId)
|
||||
{
|
||||
case TOURNEY_TREE_SELECTED_CLOSE:
|
||||
default:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_CLOSE_TOURNEY_TREE;
|
||||
break;
|
||||
case TOURNEY_TREE_NO_SELECTION:
|
||||
break;
|
||||
case TOURNEY_TREE_SELECTED_TRAINER:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_SHOW_INFOCARD_TRAINER;
|
||||
break;
|
||||
case TOURNEY_TREE_SELECTED_MATCH:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_SHOW_INFOCARD_MATCH;
|
||||
break;
|
||||
}
|
||||
@ -5509,7 +5509,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId)
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case STATE_FADE_IN:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_SHOW_RESULTS;
|
||||
break;
|
||||
case STATE_SHOW_RESULTS:
|
||||
@ -5559,7 +5559,7 @@ static void Task_HandleStaticTourneyTreeInput(u8 taskId)
|
||||
case STATE_WAIT_FOR_INPUT:
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_CLOSE_TOURNEY_TREE;
|
||||
}
|
||||
break;
|
||||
|
@ -1203,7 +1203,7 @@ static void CB2_InitSelectScreen(void)
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
SetVBlankCallback(VBlankCB_SelectScreen);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG0_ON | DISPCNT_BG1_ON | DISPCNT_OBJ_1D_MAP);
|
||||
#ifdef UBFIX
|
||||
if (sFactorySelectScreen && sFactorySelectScreen->fromSummaryScreen)
|
||||
@ -1451,7 +1451,7 @@ static void Select_Task_OpenSummaryScreen(u8 taskId)
|
||||
{
|
||||
case STATE_SUMMARY_FADE:
|
||||
gPlttBufferUnfaded[228] = gPlttBufferFaded[228];
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_SUMMARY_CLEAN;
|
||||
break;
|
||||
case STATE_SUMMARY_CLEAN:
|
||||
@ -1489,7 +1489,7 @@ static void Select_Task_Exit(u8 taskId)
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 1:
|
||||
@ -2369,7 +2369,7 @@ static void Swap_Task_OpenSummaryScreen(u8 taskId)
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case STATE_SUMMARY_FADE:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].tState = STATE_SUMMARY_CLEAN;
|
||||
break;
|
||||
case STATE_SUMMARY_CLEAN:
|
||||
@ -2425,7 +2425,7 @@ static void Swap_Task_Exit(u8 taskId)
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 3:
|
||||
@ -3381,7 +3381,7 @@ static void CB2_InitSwapScreen(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 14:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
|
@ -1841,7 +1841,7 @@ void BattleMainCB2(void)
|
||||
{
|
||||
gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED;
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
SetMainCallback2(CB2_QuitRecordedBattle);
|
||||
}
|
||||
}
|
||||
@ -2242,7 +2242,7 @@ static void EndLinkBattleInSteps(void)
|
||||
case 1:
|
||||
if (--gBattleCommunication[1] == 0)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
}
|
||||
break;
|
||||
@ -2299,7 +2299,7 @@ static void EndLinkBattleInSteps(void)
|
||||
for (i = 0; i < 2; i++)
|
||||
LoadChosenBattleElement(i);
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gBattleCommunication[MULTIUSE_STATE]++;
|
||||
break;
|
||||
case 4:
|
||||
@ -2404,7 +2404,7 @@ static void sub_80392A8(void)
|
||||
gReservedSpritePaletteCount = 4;
|
||||
SetVBlankCallback(VBlankCB_Battle);
|
||||
SetMainCallback2(sub_803937C);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gBattleCommunication[MULTIUSE_STATE] = 0;
|
||||
}
|
||||
|
||||
@ -2564,7 +2564,7 @@ static void sub_803939C(void)
|
||||
{
|
||||
if (IsLinkTaskFinished() == TRUE)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattleCommunication[1] = 0x20;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 8;
|
||||
}
|
||||
@ -2572,7 +2572,7 @@ static void sub_803939C(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattleCommunication[1] = 0x20;
|
||||
gBattleCommunication[MULTIUSE_STATE] = 8;
|
||||
}
|
||||
|
@ -1184,7 +1184,7 @@ static bool8 StatusInflictionFadeOut(struct Task *task)
|
||||
task->data[7] += task->data[4];
|
||||
if (task->data[7] > 16)
|
||||
task->data[7] = 16;
|
||||
BlendPalettes(0xFFFFFFFF, task->data[7], RGB(11, 11, 11));
|
||||
BlendPalettes(PALETTES_ALL, task->data[7], RGB(11, 11, 11));
|
||||
}
|
||||
|
||||
if (task->data[7] >= 16)
|
||||
@ -1203,7 +1203,7 @@ static bool8 StatusInflictionFadeIn(struct Task *task)
|
||||
task->data[7] -= task->data[5];
|
||||
if (task->data[7] < 0)
|
||||
task->data[7] = 0;
|
||||
BlendPalettes(0xFFFFFFFF, task->data[7], RGB(11, 11, 11));
|
||||
BlendPalettes(PALETTES_ALL, task->data[7], RGB(11, 11, 11));
|
||||
}
|
||||
|
||||
if (task->data[7] == 0)
|
||||
|
@ -493,11 +493,11 @@ static bool8 sub_81C5078(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 15:
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 16:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -811,7 +811,7 @@ static void sub_81C5AB8(u8 y, u8 arg1)
|
||||
|
||||
void CloseBattlePyramidBagAndSetCallback(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = sub_81C5B4C;
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ static void Task_CloseTrainerHillRecordsOnButton(u8 taskId)
|
||||
|
||||
static void Task_BeginPaletteFade(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ExitTrainerHillRecords;
|
||||
}
|
||||
|
||||
@ -512,7 +512,7 @@ static void CB2_ShowTrainerHillRecords(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 6:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 7:
|
||||
|
@ -5374,7 +5374,7 @@ static void Cmd_yesnoboxlearnmove(void)
|
||||
if (gBattleCommunication[1] == 0)
|
||||
{
|
||||
HandleBattleWindow(0x18, 0x8, 0x1D, 0xD, WINDOW_CLEAR);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattleScripting.learnMoveState++;
|
||||
}
|
||||
else
|
||||
@ -9942,7 +9942,7 @@ static void Cmd_displaydexinfo(void)
|
||||
switch (gBattleCommunication[0])
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gBattleCommunication[0]++;
|
||||
break;
|
||||
case 1:
|
||||
@ -9973,7 +9973,7 @@ static void Cmd_displaydexinfo(void)
|
||||
case 4:
|
||||
if (!IsDma3ManagerBusyWithBgCopy())
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_BG, 0, 0x10, 0, RGB_BLACK);
|
||||
ShowBg(0);
|
||||
ShowBg(3);
|
||||
gBattleCommunication[0]++;
|
||||
|
@ -1071,7 +1071,7 @@ static bool8 Phase2_Blur_Func2(struct Task *task)
|
||||
{
|
||||
task->tData1 = 4;
|
||||
if (++task->tData2 == 10)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 0x10, RGB_BLACK);
|
||||
SetGpuReg(REG_OFFSET_MOSAIC, (task->tData2 & 15) * 17);
|
||||
if (task->tData2 > 14)
|
||||
task->tState++;
|
||||
@ -1098,7 +1098,7 @@ static bool8 Phase2_Swirl_Func1(struct Task *task)
|
||||
{
|
||||
InitTransitionStructVars();
|
||||
ScanlineEffect_Clear();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 0x10, RGB_BLACK);
|
||||
sub_8149F98(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_14, 0, 2, 0, 160);
|
||||
|
||||
SetVBlankCallback(VBlankCB_Phase2_Swirl);
|
||||
@ -1153,7 +1153,7 @@ static bool8 Phase2_Shuffle_Func1(struct Task *task)
|
||||
InitTransitionStructVars();
|
||||
ScanlineEffect_Clear();
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 0x10, RGB_BLACK);
|
||||
memset(gScanlineEffectRegBuffers[1], sTransitionStructPtr->field_16, 0x140);
|
||||
|
||||
SetVBlankCallback(VBlankCB_Phase2_Shuffle);
|
||||
@ -1456,7 +1456,7 @@ static bool8 Phase2_Kyogre_Func5(struct Task *task)
|
||||
|
||||
static bool8 Phase2_WeatherDuo_Func6(struct Task *task)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFF8000, 1, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_OBJECTS | 0x8000, 1, 0, 0x10, RGB_BLACK);
|
||||
task->tState++;
|
||||
return FALSE;
|
||||
}
|
||||
@ -1541,7 +1541,7 @@ static bool8 Phase2_FramesCountdown(struct Task *task)
|
||||
|
||||
static bool8 Phase2_WeatherTrio_Func1(struct Task *task)
|
||||
{
|
||||
BeginNormalPaletteFade(0x0000FFFF, 1, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_BG, 1, 0, 0x10, RGB_BLACK);
|
||||
task->tState++;
|
||||
return FALSE;
|
||||
}
|
||||
@ -1962,7 +1962,7 @@ static bool8 Phase2_Ripple_Func2(struct Task *task)
|
||||
if (++task->tData3 == 81)
|
||||
{
|
||||
task->tData4++;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
|
||||
if (task->tData4 != 0 && !gPaletteFade.active)
|
||||
@ -2308,7 +2308,7 @@ static bool8 Phase2_Mugshot_Func7(struct Task *task)
|
||||
static bool8 Phase2_Mugshot_Func8(struct Task *task)
|
||||
{
|
||||
sTransitionStructPtr->VBlank_DMA = FALSE;
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_WHITE);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, RGB_WHITE);
|
||||
sTransitionStructPtr->BLDCNT = 0xFF;
|
||||
task->tData3 = 0;
|
||||
|
||||
@ -3168,7 +3168,7 @@ static bool8 Phase2_Rayquaza_Func6(struct Task *task)
|
||||
{
|
||||
task->tState++;
|
||||
task->tData1 = 0;
|
||||
BeginNormalPaletteFade(0xFFFF8000, 2, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_OBJECTS | 0x8000, 2, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@ -3187,8 +3187,8 @@ static bool8 Phase2_Rayquaza_Func7(struct Task *task)
|
||||
|
||||
static bool8 Phase2_Rayquaza_Func8(struct Task *task)
|
||||
{
|
||||
BlendPalettes(0x00007FFF, 8, 0);
|
||||
BlendPalettes(0xFFFF8000, 0, 0);
|
||||
BlendPalettes(PALETTES_BG & ~(0x8000), 8, 0);
|
||||
BlendPalettes(PALETTES_OBJECTS | 0x8000, 0, 0);
|
||||
|
||||
task->tState++;
|
||||
return FALSE;
|
||||
@ -3300,7 +3300,7 @@ static bool8 Phase2_WhiteFade_Func3(struct Task *task)
|
||||
sTransitionStructPtr->VBlank_DMA = 0;
|
||||
if (sTransitionStructPtr->field_20 > 7)
|
||||
{
|
||||
BlendPalettes(-1, 0x10, 0x7FFF);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0x7FFF);
|
||||
task->tState++;
|
||||
}
|
||||
return FALSE;
|
||||
@ -3631,7 +3631,7 @@ static bool8 Phase1_TransitionAll_Func1(struct Task *task)
|
||||
task->tData7 += task->tData4;
|
||||
if (task->tData7 > 16)
|
||||
task->tData7 = 16;
|
||||
BlendPalettes(-1, task->tData7, 0x2D6B);
|
||||
BlendPalettes(PALETTES_ALL, task->tData7, 0x2D6B);
|
||||
}
|
||||
if (task->tData7 > 15)
|
||||
{
|
||||
@ -3649,7 +3649,7 @@ static bool8 Phase1_TransitionAll_Func2(struct Task *task)
|
||||
task->tData7 -= task->tData5;
|
||||
if (task->tData7 < 0)
|
||||
task->tData7 = 0;
|
||||
BlendPalettes(-1, task->tData7, 0x2D6B);
|
||||
BlendPalettes(PALETTES_ALL, task->tData7, 0x2D6B);
|
||||
}
|
||||
if (task->tData7 == 0)
|
||||
{
|
||||
@ -3706,7 +3706,7 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset)
|
||||
|
||||
static void FadeScreenBlack(void)
|
||||
{
|
||||
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
static void sub_8149F98(s16 *array, s16 sinAdd, s16 index, s16 indexIncrementer, s16 amplitude, s16 arrSize)
|
||||
@ -3977,7 +3977,7 @@ static bool8 Phase2_FrontierLogoWave_Func4(struct Task *task)
|
||||
if (++task->tData3 == 101)
|
||||
{
|
||||
task->tData4++;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
|
||||
if (task->tData4 != 0 && !gPaletteFade.active)
|
||||
@ -4077,7 +4077,7 @@ static bool8 Phase2_FrontierSquares_Func3(struct Task *task)
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
BlendPalettes(0xFFFF7FFF, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL & ~(0x8000), 0x10, 0);
|
||||
LZ77UnCompVram(sFrontierSquares_EmptyBg_Tileset, tileset);
|
||||
break;
|
||||
case 2:
|
||||
@ -4138,7 +4138,7 @@ static bool8 Phase2_FrontierSquaresSpiral_Func2(struct Task *task)
|
||||
static bool8 Phase2_FrontierSquaresSpiral_Func3(struct Task *task)
|
||||
{
|
||||
BlendPalette(0xE0, 0x10, 3, 0);
|
||||
BlendPalettes(0xFFFF3FFF, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL & ~(0x8000 | 0x4000), 0x10, 0);
|
||||
|
||||
task->tData2 = 0;
|
||||
task->tData3 = 0;
|
||||
@ -4194,7 +4194,7 @@ static bool8 Phase2_FrontierSquares_End(struct Task *task)
|
||||
{
|
||||
FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
DestroyTask(FindTaskIdByFunc(task->func));
|
||||
return FALSE;
|
||||
}
|
||||
@ -4286,7 +4286,7 @@ static bool8 Phase2_FrontierSquaresScroll_Func2(struct Task *task)
|
||||
|
||||
static bool8 Phase2_FrontierSquaresScroll_Func3(struct Task *task)
|
||||
{
|
||||
BlendPalettes(0xFFFF7FFF, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL & ~(0x8000), 0x10, 0);
|
||||
|
||||
task->tData2 = 0;
|
||||
|
||||
@ -4325,7 +4325,7 @@ static bool8 Phase2_FrontierSquaresScroll_Func5(struct Task *task)
|
||||
|
||||
FillBgTilemapBufferRect_Palette0(0, 1, 0, 0, 0x20, 0x20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
|
||||
DestroyTask(FindTaskIdByFunc(task->func));
|
||||
task->tState++; // UB: changing value of a destroyed task
|
||||
|
@ -373,7 +373,7 @@ static bool8 FadeInCenterLogoCircle(struct Task *task)
|
||||
{
|
||||
if (task->data[3] == 31)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 0x10, RGB_BLACK);
|
||||
task->tState++;
|
||||
}
|
||||
else
|
||||
|
@ -1097,7 +1097,7 @@ static void CB2_LoadBerryBlender(void)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
UpdateBlenderCenter();
|
||||
sBerryBlender->mainState++;
|
||||
break;
|
||||
@ -1111,7 +1111,7 @@ static void CB2_LoadBerryBlender(void)
|
||||
sBerryBlender->mainState++;
|
||||
break;
|
||||
case 5:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
sBerryBlender->mainState++;
|
||||
break;
|
||||
case 6:
|
||||
@ -1326,7 +1326,7 @@ static void CB2_StartBlenderLink(void)
|
||||
sBerryBlender->mainState++;
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
sBerryBlender->mainState++;
|
||||
break;
|
||||
case 4:
|
||||
@ -1664,7 +1664,7 @@ static void CB2_StartBlenderLocal(void)
|
||||
sBerryBlender->mainState++;
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
sBerryBlender->mainState++;
|
||||
sBerryBlender->framesToWait = 0;
|
||||
break;
|
||||
@ -2895,7 +2895,7 @@ static void CB2_CheckPlayAgainLink(void)
|
||||
case 9:
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
sBerryBlender->gameEndState++;
|
||||
}
|
||||
break;
|
||||
|
@ -1089,7 +1089,7 @@ s32 InitBerryCrushDisplay(void)
|
||||
break;
|
||||
case 9:
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, RGB_BLACK);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
@ -1121,7 +1121,7 @@ int sub_802130C(void)
|
||||
// fall through. The original author forgot to use "break" here
|
||||
// because this will call BeginNormalPaletteFade() twice.
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
case 3:
|
||||
@ -2635,13 +2635,13 @@ static u32 sub_8023A30(struct BerryCrushGame *r4, __attribute__((unused)) u8 *r1
|
||||
case 0:
|
||||
r4->unk12 = 8;
|
||||
PlaySE(SE_M_STRENGTH);
|
||||
BlendPalettes(0xFFFFFFFF, 8, RGB(31, 31, 0));
|
||||
BlendPalettes(PALETTES_ALL, 8, RGB(31, 31, 0));
|
||||
r4->unk138.unk0 = 2;
|
||||
break;
|
||||
case 1:
|
||||
if (--r4->unk138.unk0 != 255)
|
||||
return 0;
|
||||
BlendPalettes(0xFFFFFFFF, 0, RGB(31, 31, 0));
|
||||
BlendPalettes(PALETTES_ALL, 0, RGB(31, 31, 0));
|
||||
r4->unk138.unk1 = 4;
|
||||
r4->unk138.unk0 = 0;
|
||||
r4->unk138.unk2 = gUnknown_082F326C[r4->unk138.unk1][0];
|
||||
@ -2692,13 +2692,13 @@ static u32 sub_8023BC0(struct BerryCrushGame *r5, u8 *r6)
|
||||
case 0:
|
||||
r5->unk12 = 9;
|
||||
PlaySE(SE_FAILURE);
|
||||
BlendPalettes(0xFFFFFFFF, 8, RGB(31, 0, 0));
|
||||
BlendPalettes(PALETTES_ALL, 8, RGB(31, 0, 0));
|
||||
r5->unk138.unk0 = 4;
|
||||
break;
|
||||
case 1:
|
||||
if (--r5->unk138.unk0 != 255)
|
||||
return 0;
|
||||
BlendPalettes(0xFFFFFFFF, 0, RGB(31, 0, 0));
|
||||
BlendPalettes(PALETTES_ALL, 0, RGB(31, 0, 0));
|
||||
r5->unk138.unk0 = 0;
|
||||
break;
|
||||
case 2:
|
||||
@ -3057,7 +3057,7 @@ static u32 sub_80243BC(struct BerryCrushGame *r5, __attribute__((unused)) u8 *r1
|
||||
switch (r5->unkC)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 1, 0, 0x10, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
case 1:
|
||||
@ -3067,7 +3067,7 @@ static u32 sub_80243BC(struct BerryCrushGame *r5, __attribute__((unused)) u8 *r1
|
||||
case 2:
|
||||
ClearDialogWindowAndFrame(0, 1);
|
||||
sub_8021488(r5);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
case 3:
|
||||
|
@ -276,11 +276,11 @@ static bool8 InitBerryTagScreen(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 14:
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 15:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -514,7 +514,7 @@ static void DestroyFlavorCircleSprites(void)
|
||||
static void PrepareToCloseBerryTagScreen(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_CloseBerryTagScreen;
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ void CableCar(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_LoadCableCar, 1);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
}
|
||||
|
||||
static void CB2_LoadCableCar(void)
|
||||
@ -350,7 +350,7 @@ static void CB2_LoadCableCar(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 8:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 3, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 3, 16, 0, RGB(0, 0, 0));
|
||||
FadeInNewBGM(MUS_CABLE_CAR, 1);
|
||||
SetBgRegs(TRUE);
|
||||
gMain.state++;
|
||||
@ -468,7 +468,7 @@ static void Task_CableCar(u8 taskId)
|
||||
if (sCableCar->timer == 570)
|
||||
{
|
||||
sCableCar->state = 3;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 3, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 3, 0, 16, RGB(0, 0, 0));
|
||||
FadeOutBGM(4);
|
||||
}
|
||||
break;
|
||||
|
@ -163,7 +163,7 @@ static bool8 SetupClearSaveDataScreen(void)
|
||||
ShowBg(3);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
||||
InitClearSaveDataScreenWindows();
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_BG, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
EnableInterrupts(INTR_FLAG_VBLANK);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
gMain.state = 1;
|
||||
@ -185,7 +185,7 @@ static void CB2_FadeAndDoReset(void)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_BG, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
gMain.state = 1;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -2711,7 +2711,7 @@ static void Task_TryCommunicateFinalStandings(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ContestReturnToField;
|
||||
}
|
||||
}
|
||||
@ -2730,7 +2730,7 @@ static void Task_CommunicateFinalStandings(u8 taskId)
|
||||
static void Task_EndCommunicateFinalStandings(u8 taskId)
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[eContest.mainTaskId].func = Task_ContestReturnToField;
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ static void HoldContestPainting(void)
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
{
|
||||
gContestPaintingState++;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
}
|
||||
|
||||
if (gUnknown_030011F6)
|
||||
|
@ -517,7 +517,7 @@ static void CB2_StartShowContestResults(void)
|
||||
memset(sContestResults->monResults, 0, sizeof(*sContestResults->monResults));
|
||||
LoadContestResultSprites();
|
||||
TryCreateWirelessSprites();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sContestResults->data->showResultsTaskId = CreateTask(Task_ShowContestResults, 5);
|
||||
SetMainCallback2(CB2_ShowContestResults);
|
||||
@ -1018,12 +1018,12 @@ static void Task_EndShowContestResults(u8 taskId)
|
||||
if (gTasks[taskId].tTimer == 0)
|
||||
{
|
||||
DestroyTask(sContestResults->data->highlightWinnerTaskId);
|
||||
BlendPalettes(0x0000FFFF, 16, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_BG, 16, RGB_BLACK);
|
||||
gTasks[taskId].tTimer++;
|
||||
}
|
||||
else if (gTasks[taskId].tTimer == 1)
|
||||
{
|
||||
BlendPalettes(0xFFFF0000, 16, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_OBJECTS, 16, RGB_BLACK);
|
||||
gTasks[taskId].tTimer++;
|
||||
}
|
||||
else
|
||||
@ -2102,7 +2102,7 @@ void StartContest(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_StartContest, 10);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
void BufferContestantMonSpecies(void)
|
||||
@ -2123,7 +2123,7 @@ void ShowContestResults(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_StartShowContestResults, 10);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
void GetContestPlayerId(void)
|
||||
|
@ -1235,7 +1235,7 @@ void CB2_StartCreditsSequence(void)
|
||||
gTasks[taskIdB].data[TDB_TASK_A_ID] = taskIdA;
|
||||
gTasks[taskIdA].data[TDA_TASK_B_ID] = taskIdB;
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
EnableInterrupts(INTR_FLAG_VBLANK);
|
||||
SetVBlankCallback(CreditsVBlankCallback);
|
||||
m4aSongNumStart(MUS_CREDITS);
|
||||
@ -1281,14 +1281,14 @@ static void Task_ProgressCreditTasks(u8 taskIdA)
|
||||
{
|
||||
gTasks[taskIdA].data[TDA_13] = data1;
|
||||
gTasks[taskIdA].data[TDA_11] = 0;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskIdA].func = sub_8175808;
|
||||
}
|
||||
else if (gTasks[taskIdA].data[TDA_11] == 2)
|
||||
{
|
||||
gTasks[taskIdA].data[TDA_13] = data1;
|
||||
gTasks[taskIdA].data[TDA_11] = 0;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskIdA].func = sub_81758A4;
|
||||
}
|
||||
}
|
||||
@ -1309,7 +1309,7 @@ static void c2_080C9BFC(u8 taskIdA)
|
||||
|
||||
if (sub_8176AB0(gTasks[taskIdA].data[TDA_7], taskIdA))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
EnableInterrupts(INTR_FLAG_VBLANK);
|
||||
SetVBlankCallback(CreditsVBlankCallback);
|
||||
gTasks[taskIdA].func = Task_WaitPaletteFade;
|
||||
@ -1369,7 +1369,7 @@ static void Task_CreditsLoadGrassScene(u8 taskIdA)
|
||||
gTasks[gTasks[taskIdA].data[TDA_TASK_D_ID]].data[TDD_TASK_A_ID] = taskIdA;
|
||||
gTasks[gTasks[taskIdA].data[TDA_TASK_D_ID]].data[TDD_2] = gTasks[taskIdA].data[TDA_7];
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
SetGpuReg(REG_OFFSET_BG3HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG3VOFS, 32);
|
||||
SetGpuReg(REG_OFFSET_BG3CNT, BGCNT_PRIORITY(3)
|
||||
@ -1398,7 +1398,7 @@ static void Task_CreditsTheEnd1(u8 taskIdA)
|
||||
return;
|
||||
}
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 12, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 12, 0, 16, RGB_BLACK);
|
||||
gTasks[taskIdA].func = Task_CreditsTheEnd2;
|
||||
}
|
||||
|
||||
@ -1418,7 +1418,7 @@ static void Task_CreditsTheEnd3(u8 taskIdA)
|
||||
LoadTheEndScreen(0, 0x3800, 0);
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 8, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 8, 16, 0, RGB_BLACK);
|
||||
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(0)
|
||||
| BGCNT_CHARBASE(0)
|
||||
@ -1442,7 +1442,7 @@ static void Task_CreditsTheEnd4(u8 taskIdA)
|
||||
return;
|
||||
}
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 6, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 6, 0, 16, RGB_BLACK);
|
||||
gTasks[taskIdA].func = Task_CreditsTheEnd5;
|
||||
}
|
||||
|
||||
@ -1452,7 +1452,7 @@ static void Task_CreditsTheEnd5(u8 taskIdA)
|
||||
{
|
||||
sub_8176E40(0x3800, 0);
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0, RGB_BLACK);
|
||||
gTasks[taskIdA].data[TDA_0] = 7200;
|
||||
gTasks[taskIdA].func = Task_CreditsTheEnd6;
|
||||
}
|
||||
@ -1465,7 +1465,7 @@ static void Task_CreditsTheEnd6(u8 taskIdA)
|
||||
if (gTasks[taskIdA].data[TDA_0] == 0 || gMain.newKeys)
|
||||
{
|
||||
FadeOutBGM(4);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 16, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 8, 0, 16, RGB_WHITEALPHA);
|
||||
gTasks[taskIdA].func = Task_CreditsSoftReset;
|
||||
return;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ void CB2_ShowDiploma(void)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
DisplayDiplomaText();
|
||||
BlendPalettes(-1, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
EnableInterrupts(1);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetMainCallback2(MainCB2);
|
||||
@ -109,7 +109,7 @@ static void Task_DiplomaWaitForKeyPress(u8 taskId)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_DiplomaFadeOut;
|
||||
}
|
||||
}
|
||||
|
@ -590,8 +590,8 @@ static void sub_8024BC8(u8 taskId)
|
||||
gUnknown_02022C98->unk0C++;
|
||||
break;
|
||||
case 6:
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, 0x00);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0x00);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, 0);
|
||||
SetVBlankCallback(sub_80261E4);
|
||||
gUnknown_02022C98->unk0C++;
|
||||
break;
|
||||
@ -1110,7 +1110,7 @@ static void sub_80256AC(void)
|
||||
switch (gUnknown_02022C98->unk10)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, 0);
|
||||
gUnknown_02022C98->unk10++;
|
||||
break;
|
||||
case 1:
|
||||
@ -1147,7 +1147,7 @@ static void sub_8025758(void)
|
||||
{
|
||||
case 0:
|
||||
sub_80292E0(9);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, 0);
|
||||
gUnknown_02022C98->unk10++;
|
||||
break;
|
||||
case 1:
|
||||
@ -1178,8 +1178,8 @@ static void sub_8025758(void)
|
||||
gUnknown_02022C98->unk10++;
|
||||
break;
|
||||
case 5:
|
||||
BlendPalettes(0xFFFFFFFF, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, 0);
|
||||
gUnknown_02022C98->unk10++;
|
||||
break;
|
||||
case 6:
|
||||
|
@ -1330,8 +1330,8 @@ static void Task_EasyChatScreen(u8 taskId)
|
||||
{
|
||||
case MAINSTATE_FADE_IN:
|
||||
SetVBlankCallback(VBlankCB_EasyChatScreen);
|
||||
BlendPalettes(0xFFFFFFFF, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
tState = MAINSTATE_WAIT_FADE_IN;
|
||||
break;
|
||||
case MAINSTATE_HANDLE_INPUT:
|
||||
@ -1339,14 +1339,14 @@ static void Task_EasyChatScreen(u8 taskId)
|
||||
if (IsFuncIdForQuizLadyScreen(funcId))
|
||||
{
|
||||
// Fade to Quiz Lady screen
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, RGB_BLACK);
|
||||
tState = MAINSTATE_TO_QUIZ_LADY;
|
||||
tFuncId = funcId;
|
||||
}
|
||||
else if (funcId == ECFUNC_EXIT)
|
||||
{
|
||||
// Fade and exit Easy Chat
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
tState = MAINSTATE_EXIT;
|
||||
}
|
||||
else if (funcId != ECFUNC_NONE)
|
||||
|
@ -597,7 +597,7 @@ static void CB2_EggHatch_1(void)
|
||||
switch (sEggHatchData->CB2_state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
sEggHatchData->eggSpriteID = CreateSprite(&sSpriteTemplate_EggHatch, 120, 75, 5);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -680,7 +680,7 @@ static void CB2_EggHatch_1(void)
|
||||
}
|
||||
break;
|
||||
case 11:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
sEggHatchData->CB2_state++;
|
||||
break;
|
||||
case 12:
|
||||
@ -790,7 +790,7 @@ static void SpriteCB_Egg_4(struct Sprite* sprite)
|
||||
{
|
||||
s16 i;
|
||||
if (sprite->data[0] == 0)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 0x10, RGB_WHITEALPHA);
|
||||
if (sprite->data[0] < 4u)
|
||||
{
|
||||
for (i = 0; i <= 3; i++)
|
||||
@ -814,7 +814,7 @@ static void SpriteCB_Egg_5(struct Sprite* sprite)
|
||||
StartSpriteAffineAnim(&gSprites[sEggHatchData->pokeSpriteID], 1);
|
||||
}
|
||||
if (sprite->data[0] == 8)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0x10, 0, RGB_WHITEALPHA);
|
||||
if (sprite->data[0] <= 9)
|
||||
gSprites[sEggHatchData->pokeSpriteID].pos1.y -= 1;
|
||||
if (sprite->data[0] > 40)
|
||||
|
@ -172,7 +172,7 @@ static void Task_BeginEvolutionScene(u8 taskId)
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 1:
|
||||
@ -369,7 +369,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
||||
SetVBlankCallback(VBlankCB_EvolutionScene);
|
||||
SetMainCallback2(CB2_EvolutionSceneUpdate);
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -449,11 +449,11 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
||||
LoadWirelessStatusIndicatorSpriteGfx();
|
||||
CreateWirelessStatusIndicatorSprite(0, 0);
|
||||
}
|
||||
BlendPalettes(-1,0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 7:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
InitTradeSequenceBgGpuRegs();
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -653,7 +653,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case EVOSTATE_FADE_IN:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gSprites[sEvoStructPtr->preEvoSpriteId].invisible = FALSE;
|
||||
gTasks[taskId].tState++;
|
||||
ShowBg(0);
|
||||
@ -802,7 +802,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
}
|
||||
else // no move to learn, or evolution was canceled
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState++;
|
||||
}
|
||||
}
|
||||
@ -946,7 +946,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
// YES
|
||||
gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveYesState;
|
||||
if (gTasks[taskId].tLearnMoveState == MVSTATE_SHOW_MOVE_SELECT)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
}
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
@ -1323,7 +1323,7 @@ static void Task_TradeEvolutionScene(u8 taskId)
|
||||
DrawTextOnTradeWindow(0, gDisplayedStringBattle, 1);
|
||||
gTasks[taskId].tLearnMoveState = gTasks[taskId].tLearnMoveYesState;
|
||||
if (gTasks[taskId].tLearnMoveState == T_MVSTATE_SHOW_MOVE_SELECT)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
break;
|
||||
case 1: // NO
|
||||
case MENU_B_PRESSED:
|
||||
|
@ -3703,8 +3703,8 @@ static void DestroyDeoxysRockEffect_RockFragments(s16* data, u8 taskId)
|
||||
{
|
||||
struct Sprite *sprite = &gSprites[gObjectEvents[tObjectEventId].spriteId];
|
||||
gObjectEvents[tObjectEventId].invisible = TRUE;
|
||||
BlendPalettes(0x0000FFFF, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0x10, 0, RGB_WHITE);
|
||||
BlendPalettes(PALETTES_BG, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_BG, 0, 0x10, 0, RGB_WHITE);
|
||||
CreateDeoxysRockFragments(sprite);
|
||||
PlaySE(SE_THUNDER);
|
||||
StartEndingDeoxysRockCameraShake(tCameraTaskId);
|
||||
|
@ -156,7 +156,7 @@ static void FieldUpdateRegionMap(void)
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
DrawStdFrameWithCustomTileAndPalette(0, 0, 0x27, 0xd);
|
||||
PrintRegionMapSecName();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
sFieldRegionMapHandler->state++;
|
||||
break;
|
||||
case 2:
|
||||
@ -184,7 +184,7 @@ static void FieldUpdateRegionMap(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sFieldRegionMapHandler->state++;
|
||||
break;
|
||||
case 6:
|
||||
|
@ -782,7 +782,7 @@ void FadeScreen(u8 mode, s8 delay)
|
||||
if (useWeatherPal)
|
||||
CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, delay, 0, 16, fadeColor);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, delay, 0, 16, fadeColor);
|
||||
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_SCREEN_FADING_OUT;
|
||||
}
|
||||
else
|
||||
@ -791,7 +791,7 @@ void FadeScreen(u8 mode, s8 delay)
|
||||
if (useWeatherPal)
|
||||
gWeatherPtr->fadeScreenCounter = 0;
|
||||
else
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, delay, 16, 0, fadeColor);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, delay, 16, 0, fadeColor);
|
||||
|
||||
gWeatherPtr->palProcessingState = WEATHER_PAL_STATE_SCREEN_FADING_IN;
|
||||
gWeatherPtr->unknown_6CA = 1;
|
||||
|
@ -387,7 +387,7 @@ static void Task_ComputerScreenOpenEffect(u8 taskId)
|
||||
task->tWinRight = DISPLAY_WIDTH;
|
||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, task->tBlendCnt);
|
||||
BlendPalettes(0xFFFFFFFF, 0, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0, 0);
|
||||
gPlttBufferFaded[0] = 0;
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->tWinLeft, task->tWinRight));
|
||||
@ -463,7 +463,7 @@ static void Task_ComputerScreenCloseEffect(u8 taskId)
|
||||
{
|
||||
task->tWinLeft = DISPLAY_WIDTH / 2;
|
||||
task->tWinRight = DISPLAY_WIDTH / 2;
|
||||
BlendPalettes(-1, 16, 0);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
gPlttBufferFaded[0] = 0;
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(task->tWinLeft, task->tWinRight));
|
||||
|
@ -751,8 +751,8 @@ static bool32 InitFrontierPass(void)
|
||||
ShowBg(2);
|
||||
LoadCursorAndSymbolSprites();
|
||||
SetVBlankCallback(VblankCb_FrontierPass);
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
break;
|
||||
case 10:
|
||||
AnimateSprites();
|
||||
@ -775,7 +775,7 @@ static bool32 HideFrontierPass(void)
|
||||
case 0:
|
||||
if (sPassData->unkE != 1 && sPassData->unkE != 2)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1023,7 +1023,7 @@ static void Task_DoFadeEffect(u8 taskId)
|
||||
data[2] = Q_8_8(1);
|
||||
data[3] = 0x15;
|
||||
data[4] = 0x15;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_WHITE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1037,8 +1037,8 @@ static void Task_DoFadeEffect(u8 taskId)
|
||||
ShowBg(2);
|
||||
LoadCursorAndSymbolSprites();
|
||||
SetVBlankCallback(VblankCb_FrontierPass);
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_WHITE);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_WHITE);
|
||||
}
|
||||
sPassGfx->setAffine = TRUE;
|
||||
sPassGfx->unk2E = MathUtil_Inv16(data[1]);
|
||||
@ -1366,8 +1366,8 @@ static bool32 InitFrontierMap(void)
|
||||
ShowBg(2);
|
||||
InitFrontierMapSprites();
|
||||
SetVBlankCallback(VblankCb_FrontierPass);
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_WHITE);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_WHITE);
|
||||
break;
|
||||
case 7:
|
||||
if (UpdatePaletteFade())
|
||||
@ -1385,7 +1385,7 @@ static bool32 ExitFrontierMap(void)
|
||||
switch (sPassData->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_WHITE);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
|
@ -386,7 +386,7 @@ static bool8 InitHallOfFameScreen(void)
|
||||
if (!sub_8175024())
|
||||
{
|
||||
SetVBlankCallback(VBlankCB_HallOfFame);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
@ -639,7 +639,7 @@ static void Task_Hof_PaletteFadeAndPrintWelcomeText(u8 taskId)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_OBJECTS, 0, 0, 0, RGB_BLACK);
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (gTasks[taskId].tMonSpriteId(i) != SPRITE_NONE)
|
||||
@ -739,7 +739,7 @@ static void Task_Hof_ExitOnKeyPressed(u8 taskId)
|
||||
static void Task_Hof_HandlePaletteOnExit(u8 taskId)
|
||||
{
|
||||
CpuCopy16(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 8, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_Hof_HandleExit;
|
||||
}
|
||||
|
||||
@ -941,7 +941,7 @@ static void Task_HofPC_DrawSpritesPrintText(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
BlendPalettes(0xFFFF0000, 0xC, RGB(16, 29, 24));
|
||||
BlendPalettes(PALETTES_OBJECTS, 0xC, RGB(16, 29, 24));
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].tCurrPageNo, STR_CONV_MODE_RIGHT_ALIGN, 3);
|
||||
StringExpandPlaceholders(gStringVar4, gText_HOFNumber);
|
||||
|
@ -29,7 +29,7 @@ static void ReshowPCMenuAfterHallOfFamePC(void)
|
||||
Overworld_PlaySpecialMapMusic();
|
||||
ScriptMenu_CreatePCMultichoice();
|
||||
ScriptMenu_DisplayPCStartupPrompt();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
CreateTask(Task_WaitForPaletteFade, 10);
|
||||
}
|
||||
|
||||
|
32
src/intro.c
32
src/intro.c
@ -1006,7 +1006,7 @@ static u8 SetUpCopyrightScreen(void)
|
||||
ResetTasks();
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(0)
|
||||
| BGCNT_CHARBASE(0)
|
||||
| BGCNT_SCREENBASE(7)
|
||||
@ -1026,7 +1026,7 @@ static u8 SetUpCopyrightScreen(void)
|
||||
GameCubeMultiBoot_Main(&gMultibootProgramStruct);
|
||||
if (gMultibootProgramStruct.gcmb_field_2 != 1)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
@ -1121,7 +1121,7 @@ static void Task_IntroLoadPart1Graphics(u8 taskId)
|
||||
|
||||
static void Task_IntroFadeIn(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB_Intro);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG_ALL_ON | DISPCNT_OBJ_ON);
|
||||
gTasks[taskId].func = Task_IntroWaterDrops;
|
||||
@ -1232,7 +1232,7 @@ static void Task_IntroScrollDownAndShowFlygon(u8 taskId)
|
||||
//fade to white
|
||||
if (gIntroFrameCounter > 1007)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_WHITEALPHA);
|
||||
gTasks[taskId].func = Task_IntroWaitToSetupPart2;
|
||||
}
|
||||
}
|
||||
@ -1291,7 +1291,7 @@ static void Task_IntroStartBikeRide(u8 taskId)
|
||||
spriteId = intro_create_flygon_sprite(-0x40, 0x3C);
|
||||
gSprites[spriteId].callback = SpriteCB_IntroGraphicsFlygon;
|
||||
gTasks[taskId].data[2] = spriteId;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_WHITEALPHA);
|
||||
SetVBlankCallback(VBlankCB_Intro);
|
||||
gTasks[taskId].data[0] = CreateBicycleAnimationTask(1, 0x4000, 0x400, 0x10);
|
||||
sub_817B150(1);
|
||||
@ -1310,7 +1310,7 @@ static void Task_IntroHandleBikeAndFlygonMovement(u8 taskId)
|
||||
}
|
||||
if (gIntroFrameCounter > 1946)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 8, 0, 16, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 8, 0, 16, RGB_WHITEALPHA);
|
||||
gTasks[taskId].func = Task_IntroWaitToSetupPart3;
|
||||
}
|
||||
if (gIntroFrameCounter == 1109)
|
||||
@ -1554,7 +1554,7 @@ static void Task_IntroLoadPart3Graphics(u8 taskId)
|
||||
PanFadeAndZoomScreen(0x78, 0x50, 0, 0);
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(3) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(8) | BGCNT_256COLOR | BGCNT_AFF256x256);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG2_ON | DISPCNT_OBJ_ON);
|
||||
gTasks[taskId].func = Task_IntroSpinAndZoomPokeball;
|
||||
@ -1579,7 +1579,7 @@ static void Task_IntroSpinAndZoomPokeball(u8 taskId)
|
||||
PanFadeAndZoomScreen(0x78, 0x50, 0x10000 / gTasks[taskId].data[1], gTasks[taskId].data[0]);
|
||||
|
||||
if (gIntroFrameCounter == 28)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
}
|
||||
|
||||
static void Task_IntroWaitToSetupPart3LegendsFight(u8 taskId)
|
||||
@ -1630,7 +1630,7 @@ static void Task_IntroLoadPart3Graphics1(u8 taskId)
|
||||
| DISPCNT_BG2_ON
|
||||
| DISPCNT_OBJ_ON
|
||||
| DISPCNT_WIN0_ON);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = 0xFFA0;
|
||||
gTasks[taskId].data[2] = 0xFF51;
|
||||
@ -1749,7 +1749,7 @@ static void Task_IntroGroudonScene(u8 taskId)
|
||||
data[3] = Sin((data[6] & 0xFF00) >> 8, 0x40) + 0x100;
|
||||
if (data[1] == 0x78)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFE, 3, 0, 16, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~1, 3, 0, 16, RGB_WHITE);
|
||||
data[3] = 0x100;
|
||||
data[4] = 0;
|
||||
data[0]++;
|
||||
@ -1824,7 +1824,7 @@ static void Task_IntroLoadKyogreScene(u8 taskId)
|
||||
LZDecompressVram(gIntro3KyogreBgTilemap, (void *)(BG_SCREEN_ADDR(28)));
|
||||
LoadCompressedSpriteSheet(gUnknown_085E4C88);
|
||||
LoadSpritePalette(gUnknown_085E4C98);
|
||||
BeginNormalPaletteFade(0xFFFFFFFE, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~1, 0, 0x10, 0, RGB_WHITEALPHA);
|
||||
gTasks[taskId].func = Task_IntroKyogreScene;
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = 0x150;
|
||||
@ -1958,7 +1958,7 @@ static void Task_IntroKyogreScene(u8 taskId)
|
||||
gTasks[taskId].data[1] = Sin(data[6], 0x3C) + 0x58;
|
||||
if (data[6] == 0x40)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFE, 3, 0, 16, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~1, 3, 0, 16, RGB_WHITE);
|
||||
data[0]++;
|
||||
}
|
||||
break;
|
||||
@ -2117,14 +2117,14 @@ static void Task_IntroCloudScene(u8 taskId)
|
||||
case 0:
|
||||
if (--data[6] == 0)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFE, 0, 16, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~1, 0, 16, 0, RGB_WHITEALPHA);
|
||||
data[6] = 0x5000;
|
||||
data[0]++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (data[6] == 0x2800)
|
||||
BeginNormalPaletteFade(0x0000FFFE, 3, 0, 16, RGB(9, 10, 10));
|
||||
BeginNormalPaletteFade(PALETTES_BG & ~1, 3, 0, 16, RGB(9, 10, 10));
|
||||
|
||||
if (data[6] != 0)
|
||||
data[6] -= 0x80;
|
||||
@ -2236,7 +2236,7 @@ static void Task_IntroLoadRayquazaGlowScene(u8 taskId)
|
||||
| DISPCNT_OBJ_ON
|
||||
| DISPCNT_WIN0_ON);
|
||||
gTasks[taskId].func = Task_IntroRayquazaGlowScene_0;
|
||||
BeginNormalPaletteFade(0x0000FFDE, 0, 16, 0, RGB(9, 10, 10));
|
||||
BeginNormalPaletteFade(PALETTES_BG & ~(0x21), 0, 16, 0, RGB(9, 10, 10));
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].data[1] = 0xA8;
|
||||
gTasks[taskId].data[2] = -0x10;
|
||||
@ -2383,7 +2383,7 @@ static void Task_IntroRayquazaGlowScene_1(u8 taskId)
|
||||
case 4:
|
||||
if (--data[3] == 0)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_WHITE);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_WHITE);
|
||||
data[0]++;
|
||||
}
|
||||
break;
|
||||
|
@ -720,11 +720,11 @@ bool8 SetupBagMenu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 19:
|
||||
BlendPalettes(0xFFFFFFFF, 16, 0);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 20:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -1018,7 +1018,7 @@ void FreeBagItemListBuffers(void)
|
||||
|
||||
void Task_FadeAndCloseBagMenu(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = TaskCloseBagMenu_2;
|
||||
}
|
||||
|
||||
|
@ -455,7 +455,7 @@ static void LinkTestProcessKeyInput(void)
|
||||
}
|
||||
if (JOY_NEW(L_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(2, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(2, 0, 0));
|
||||
}
|
||||
if (JOY_NEW(START_BUTTON))
|
||||
{
|
||||
|
@ -621,7 +621,7 @@ static bool8 MailReadBuildGraphics(void)
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sMailRead->callback = CB2_WaitForPaletteExitOnKeyPress;
|
||||
return TRUE;
|
||||
@ -733,7 +733,7 @@ static void CB2_ExitOnKeyPress(void)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sMailRead->callback = CB2_ExitMailReadFreeVars;
|
||||
}
|
||||
}
|
||||
|
@ -581,9 +581,9 @@ static u32 InitMainMenu(bool8 returningFromOptionsMenu)
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
if (returningFromOptionsMenu)
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK); // fade to black
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK); // fade to black
|
||||
else
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_WHITEALPHA); // fade to white
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_WHITEALPHA); // fade to white
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, sMainMenuBgTemplates, ARRAY_COUNT(sMainMenuBgTemplates));
|
||||
ChangeBgX(0, 0, 0);
|
||||
@ -889,13 +889,13 @@ static bool8 HandleMainMenuInput(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
IsWirelessAdapterConnected(); // why bother calling this here? debug? Task_HandleMainMenuAPressed will check too
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_HandleMainMenuAPressed;
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, 240));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(0, 160));
|
||||
gTasks[taskId].func = Task_HandleMainMenuBPressed;
|
||||
@ -1095,7 +1095,7 @@ static void Task_HandleMainMenuAPressed(u8 taskId)
|
||||
SetGpuReg(REG_OFFSET_BG1VOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0HOFS, 0);
|
||||
SetGpuReg(REG_OFFSET_BG0VOFS, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
return;
|
||||
}
|
||||
FreeAllWindowBuffers();
|
||||
@ -1152,7 +1152,7 @@ static void Task_DisplayMainMenuInvalidActionError(u8 taskId)
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_HandleMainMenuBPressed;
|
||||
}
|
||||
}
|
||||
@ -1284,7 +1284,7 @@ static void Task_NewGameBirchSpeech_Init(u8 taskId)
|
||||
FreeAllSpritePalettes();
|
||||
ResetAllPicSprites();
|
||||
AddBirchSpeechObjects(taskId);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gTasks[taskId].tBG1HOFS = 0;
|
||||
gTasks[taskId].func = Task_NewGameBirchSpeech_WaitToShowBirch;
|
||||
gTasks[taskId].tPlayerSpriteId = SPRITE_NONE;
|
||||
@ -1594,7 +1594,7 @@ static void Task_NewGameBirchSpeech_WaitPressBeforeNameChoice(u8 taskId)
|
||||
{
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(B_BUTTON)))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_NewGameBirchSpeech_StartNamingScreen;
|
||||
}
|
||||
}
|
||||
@ -1749,7 +1749,7 @@ static void Task_NewGameBirchSpeech_ShrinkPlayer(u8 taskId)
|
||||
InitSpriteAffineAnim(&gSprites[spriteId]);
|
||||
StartSpriteAffineAnim(&gSprites[spriteId], 0);
|
||||
gSprites[spriteId].callback = SpriteCB_MovePlayerDownWhileShrinking;
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_BG, 0, 0, 16, RGB_BLACK);
|
||||
FadeOutBGM(4);
|
||||
gTasks[taskId].func = Task_NewGameBirchSpeech_WaitForPlayerShrink;
|
||||
}
|
||||
@ -1773,7 +1773,7 @@ static void Task_NewGameBirchSpeech_FadePlayerToWhite(u8 taskId)
|
||||
spriteId = gTasks[taskId].tPlayerSpriteId;
|
||||
gSprites[spriteId].callback = SpriteCB_Null;
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
BeginNormalPaletteFade(0xFFFF0000, 0, 0, 16, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_OBJECTS, 0, 0, 16, RGB_WHITEALPHA);
|
||||
gTasks[taskId].func = Task_NewGameBirchSpeech_Cleanup;
|
||||
}
|
||||
}
|
||||
@ -1843,7 +1843,7 @@ static void CB2_NewGameBirchSpeech_ReturnFromNamingScreen(void)
|
||||
gSprites[spriteId].invisible = FALSE;
|
||||
gTasks[taskId].tPlayerSpriteId = spriteId;
|
||||
SetGpuReg(REG_OFFSET_BG1HOFS, -60);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
@ -2117,9 +2117,9 @@ static void NewGameBirchSpeech_SetDefaultPlayerName(u8 nameId)
|
||||
name = gMalePresetNames[nameId];
|
||||
else
|
||||
name = gFemalePresetNames[nameId];
|
||||
for (i = 0; i < 7; i++)
|
||||
for (i = 0; i < PLAYER_NAME_LENGTH; i++)
|
||||
gSaveBlock2Ptr->playerName[i] = name[i];
|
||||
gSaveBlock2Ptr->playerName[7] = 0xFF;
|
||||
gSaveBlock2Ptr->playerName[PLAYER_NAME_LENGTH] = EOS;
|
||||
}
|
||||
|
||||
static void CreateMainMenuErrorWindow(const u8* str)
|
||||
|
@ -186,7 +186,7 @@ s32 FadeToWonderCardMenu(void)
|
||||
switch(sWonderCardData->unk_0174)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
@ -231,7 +231,7 @@ s32 FadeToWonderCardMenu(void)
|
||||
ShowBg(2);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sub_801C4C0();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
@ -251,7 +251,7 @@ s32 FadeOutFromWonderCard(bool32 flag)
|
||||
switch (sWonderCardData->unk_0174)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
@ -279,7 +279,7 @@ s32 FadeOutFromWonderCard(bool32 flag)
|
||||
case 5:
|
||||
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
@ -575,7 +575,7 @@ s32 FadeToWonderNewsMenu(void)
|
||||
switch (sWonderNewsData->unk_01C0_1)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
@ -629,7 +629,7 @@ s32 FadeToWonderNewsMenu(void)
|
||||
ShowBg(3);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sWonderNewsData->unk_01C1 = AddScrollIndicatorArrowPair(&sWonderNewsData->unk_0394, &sWonderNewsData->unk_01C6);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
@ -650,7 +650,7 @@ s32 FadeOutFromWonderNews(bool32 flag)
|
||||
switch (sWonderNewsData->unk_01C0_1)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
@ -692,7 +692,7 @@ s32 FadeOutFromWonderNews(bool32 flag)
|
||||
MG_DrawCheckerboardPattern(3);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
|
@ -368,7 +368,7 @@ void TeachMoveRelearnerMove(void)
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_WaitForFadeOut, 10);
|
||||
// Fade to black
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
|
||||
static void Task_WaitForFadeOut(u8 taskId)
|
||||
@ -472,7 +472,7 @@ static void DoMoveRelearnerMain(void)
|
||||
case MENU_STATE_FADE_TO_BLACK:
|
||||
sMoveRelearnerStruct->state++;
|
||||
HideHeartSpritesAndShowTeachMoveText(FALSE);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
case MENU_STATE_WAIT_FOR_FADE:
|
||||
if (!gPaletteFade.active)
|
||||
@ -645,7 +645,7 @@ static void DoMoveRelearnerMain(void)
|
||||
if (!MoveRelearnerRunTextPrinters())
|
||||
{
|
||||
sMoveRelearnerStruct->state = MENU_STATE_SHOW_MOVE_SUMMARY_SCREEN;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
}
|
||||
break;
|
||||
case MENU_STATE_SHOW_MOVE_SUMMARY_SCREEN:
|
||||
@ -662,10 +662,10 @@ static void DoMoveRelearnerMain(void)
|
||||
}
|
||||
break;
|
||||
case 22:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
case MENU_STATE_FADE_AND_RETURN:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sMoveRelearnerStruct->state++;
|
||||
break;
|
||||
case MENU_STATE_RETURN_TO_FIELD:
|
||||
@ -676,7 +676,7 @@ static void DoMoveRelearnerMain(void)
|
||||
}
|
||||
break;
|
||||
case MENU_STATE_FADE_FROM_SUMMARY_SCREEN:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
sMoveRelearnerStruct->state++;
|
||||
if (sMoveRelearnerMenuSate.showContestInfo == FALSE)
|
||||
{
|
||||
|
@ -138,7 +138,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
ShowBg(0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 1:
|
||||
@ -281,7 +281,7 @@ static void CB2_MysteryEventMenu(void)
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 16:
|
||||
|
@ -635,8 +635,8 @@ static bool8 MainState_FadeIn(void)
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
BlendPalettes(-1, 16, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
sNamingScreen->state++;
|
||||
return FALSE;
|
||||
}
|
||||
@ -690,7 +690,7 @@ static bool8 MainState_PressedOKButton(void)
|
||||
|
||||
static bool8 MainState_FadeOut(void)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sNamingScreen->state++;
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ void CB2_InitOptionMenu(void)
|
||||
break;
|
||||
}
|
||||
case 11:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetMainCallback2(MainCB2);
|
||||
return;
|
||||
@ -365,7 +365,7 @@ static void Task_OptionMenuSave(u8 taskId)
|
||||
gSaveBlock2Ptr->optionsButtonMode = gTasks[taskId].data[TD_BUTTONMODE];
|
||||
gSaveBlock2Ptr->optionsWindowFrameType = gTasks[taskId].data[TD_FRAMETYPE];
|
||||
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_OptionMenuFadeOut;
|
||||
}
|
||||
|
||||
|
@ -589,12 +589,12 @@ static bool8 ShowPartyMenu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 21:
|
||||
BlendPalettes(0xFFFFFFFF, 16, 0);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
gMain.state++;
|
||||
break;
|
||||
case 22:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
break;
|
||||
default:
|
||||
@ -607,7 +607,7 @@ static bool8 ShowPartyMenu(void)
|
||||
|
||||
static void ExitPartyMenu(void)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
CreateTask(Task_ExitPartyMenu, 0);
|
||||
SetVBlankCallback(VBlankCB_PartyMenu);
|
||||
SetMainCallback2(CB2_UpdatePartyMenu);
|
||||
@ -1148,7 +1148,7 @@ static void SwapPartyPokemon(struct Pokemon *mon1, struct Pokemon *mon2)
|
||||
|
||||
static void Task_ClosePartyMenu(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ClosePartyMenuAndSetCB2;
|
||||
}
|
||||
|
||||
|
@ -581,11 +581,11 @@ static bool8 InitPokeblockMenu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 17:
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 18:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -948,7 +948,7 @@ static void sub_8136470(struct Sprite *sprite)
|
||||
|
||||
static void FadePaletteAndSetTaskToClosePokeblockCase(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_FreeDataAndExitPokeblockCase;
|
||||
}
|
||||
|
||||
|
@ -587,11 +587,11 @@ static bool8 TransitionToPokeblockFeedScene(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 12:
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 13:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -805,7 +805,7 @@ static void Task_ReturnAfterPaletteFade(u8 taskId)
|
||||
|
||||
static void Task_PaletteFadeToReturn(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ReturnAfterPaletteFade;
|
||||
}
|
||||
|
||||
|
@ -1689,7 +1689,7 @@ static void Task_HandlePokedexInput(u8 taskId)
|
||||
else if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tTaskId = LoadSearchMenu();
|
||||
sPokedexView->screenSwitchState = 0;
|
||||
sPokedexView->pokeBallRotationBackup = sPokedexView->pokeBallRotation;
|
||||
@ -1702,7 +1702,7 @@ static void Task_HandlePokedexInput(u8 taskId)
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ClosePokedex;
|
||||
PlaySE(SE_PC_OFF);
|
||||
}
|
||||
@ -1756,7 +1756,7 @@ static void Task_HandlePokedexStartMenuInput(u8 taskId)
|
||||
gMain.newKeys |= START_BUTTON; //Exit menu
|
||||
break;
|
||||
case 3: //CLOSE POKEDEX
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ClosePokedex;
|
||||
PlaySE(SE_PC_OFF);
|
||||
break;
|
||||
@ -1891,7 +1891,7 @@ static void Task_HandleSearchResultsInput(u8 taskId)
|
||||
}
|
||||
else if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tTaskId = LoadSearchMenu();
|
||||
sPokedexView->screenSwitchState = 0;
|
||||
gTasks[taskId].func = Task_WaitForExitSearch;
|
||||
@ -1900,7 +1900,7 @@ static void Task_HandleSearchResultsInput(u8 taskId)
|
||||
}
|
||||
else if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ReturnToPokedexFromSearchResults;
|
||||
PlaySE(SE_PC_OFF);
|
||||
}
|
||||
@ -1953,12 +1953,12 @@ static void Task_HandleSearchResultsStartMenuInput(u8 taskId)
|
||||
gMain.newKeys |= START_BUTTON;
|
||||
break;
|
||||
case 3: //BACK TO POKEDEX
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ReturnToPokedexFromSearchResults;
|
||||
PlaySE(SE_TRUCK_DOOR);
|
||||
break;
|
||||
case 4: //CLOSE POKEDEX
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ClosePokedexFromSearchResultsStartMenu;
|
||||
PlaySE(SE_PC_OFF);
|
||||
break;
|
||||
@ -2104,7 +2104,7 @@ static bool8 LoadPokedexListPage(u8 page)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 4:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB_Pokedex);
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -3355,14 +3355,14 @@ static void Task_HandleInfoScreenInput(u8 taskId)
|
||||
if (gTasks[taskId].data[0] != 0)
|
||||
{
|
||||
// Scroll up/down
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_LoadInfoScreenWaitForFade;
|
||||
PlaySE(SE_DEX_SCROLL);
|
||||
return;
|
||||
}
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ExitInfoScreen;
|
||||
PlaySE(SE_PC_OFF);
|
||||
return;
|
||||
@ -3372,13 +3372,13 @@ static void Task_HandleInfoScreenInput(u8 taskId)
|
||||
switch (sPokedexView->selectedScreen)
|
||||
{
|
||||
case AREA_SCREEN:
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 16, RGB_BLACK);
|
||||
sPokedexView->screenSwitchState = 1;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromInfoScreen;
|
||||
PlaySE(SE_PIN);
|
||||
break;
|
||||
case CRY_SCREEN:
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK);
|
||||
sPokedexView->screenSwitchState = 2;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromInfoScreen;
|
||||
PlaySE(SE_PIN);
|
||||
@ -3390,14 +3390,14 @@ static void Task_HandleInfoScreenInput(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK);
|
||||
sPokedexView->screenSwitchState = 3;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromInfoScreen;
|
||||
PlaySE(SE_PIN);
|
||||
}
|
||||
break;
|
||||
case CANCEL_SCREEN:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ExitInfoScreen;
|
||||
PlaySE(SE_PC_OFF);
|
||||
break;
|
||||
@ -3602,7 +3602,7 @@ static void Task_LoadCryScreen(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0x10, 0, RGB_BLACK);
|
||||
SetVBlankCallback(gPokedexVBlankCB);
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -3644,7 +3644,7 @@ static void Task_HandleCryScreenInput(u8 taskId)
|
||||
{
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK);
|
||||
m4aMPlayContinue(&gMPlayInfo_BGM);
|
||||
sPokedexView->screenSwitchState = 1;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromCryScreen;
|
||||
@ -3654,7 +3654,7 @@ static void Task_HandleCryScreenInput(u8 taskId)
|
||||
if ((JOY_NEW(DPAD_LEFT))
|
||||
|| ((JOY_NEW(L_BUTTON)) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK);
|
||||
m4aMPlayContinue(&gMPlayInfo_BGM);
|
||||
sPokedexView->screenSwitchState = 2;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromCryScreen;
|
||||
@ -3670,7 +3670,7 @@ static void Task_HandleCryScreenInput(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK);
|
||||
m4aMPlayContinue(&gMPlayInfo_BGM);
|
||||
sPokedexView->screenSwitchState = 3;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromCryScreen;
|
||||
@ -3786,7 +3786,7 @@ static void Task_LoadSizeScreen(u8 taskId)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 7:
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0x10, 0, RGB_BLACK);
|
||||
SetVBlankCallback(gPokedexVBlankCB);
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -3816,7 +3816,7 @@ static void Task_HandleSizeScreenInput(u8 taskId)
|
||||
{
|
||||
if (JOY_NEW(B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK);
|
||||
sPokedexView->screenSwitchState = 1;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromSizeScreen;
|
||||
PlaySE(SE_PC_OFF);
|
||||
@ -3824,7 +3824,7 @@ static void Task_HandleSizeScreenInput(u8 taskId)
|
||||
else if ((JOY_NEW(DPAD_LEFT))
|
||||
|| ((JOY_NEW(L_BUTTON)) && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_LR))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 0x10, RGB_BLACK);
|
||||
sPokedexView->screenSwitchState = 2;
|
||||
gTasks[taskId].func = Task_SwitchScreensFromSizeScreen;
|
||||
PlaySE(SE_DEX_PAGE);
|
||||
@ -3987,7 +3987,7 @@ static void Task_DisplayCaughtMonDexPage(u8 taskId)
|
||||
case 4:
|
||||
spriteId = CreateMonSpriteFromNationalDexNumber(dexNum, 48, 56, 0);
|
||||
gSprites[spriteId].oam.priority = 0;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
SetVBlankCallback(gPokedexVBlankCB);
|
||||
gTasks[taskId].tMonSpriteId = spriteId;
|
||||
gTasks[taskId].tState++;
|
||||
@ -4016,7 +4016,7 @@ static void Task_HandleCaughtMonPageInput(u8 taskId)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0x0000FFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_BG, 0, 0, 16, RGB_BLACK);
|
||||
gSprites[gTasks[taskId].tMonSpriteId].callback = SpriteCB_SlideCaughtMonToCenter;
|
||||
gTasks[taskId].func = Task_ExitCaughtMonPage;
|
||||
}
|
||||
@ -4849,7 +4849,7 @@ static void Task_LoadSearchMenu(u8 taskId)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 3:
|
||||
@ -5219,7 +5219,7 @@ static void Task_HandleSearchParameterInput(u8 taskId)
|
||||
|
||||
static void Task_ExitSearch(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ExitSearchWaitForFade;
|
||||
}
|
||||
|
||||
|
@ -691,7 +691,7 @@ static void Task_ShowPokedexAreaScreen(u8 taskId)
|
||||
CreateAreaUnknownSprites();
|
||||
break;
|
||||
case 9:
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 16, 0, RGB(0, 0, 0));
|
||||
break;
|
||||
case 10:
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_ALL);
|
||||
@ -736,7 +736,7 @@ static void Task_HandlePokedexAreaScreenInput(u8 taskId)
|
||||
return;
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFEB, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 3:
|
||||
if (gPaletteFade.active)
|
||||
|
@ -582,8 +582,8 @@ static void sub_802ACA0(u8 taskId)
|
||||
case 3:
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
SetVBlankCallback(sub_802AC58);
|
||||
gUnknown_02022CFC->unk8++;
|
||||
}
|
||||
@ -1455,7 +1455,7 @@ static bool32 sub_802BC60(void)
|
||||
case 3:
|
||||
if (++gUnknown_02022CFC->unk3C > 120)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
gUnknown_02022CFC->unkA++;
|
||||
}
|
||||
break;
|
||||
|
@ -2336,12 +2336,12 @@ static void Cb_InitPSS(u8 taskId)
|
||||
SetMonIconTransparency();
|
||||
if (!sPSSData->isReshowingPSS)
|
||||
{
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, RGB_BLACK);
|
||||
SetPSSCallback(Cb_ShowPSS);
|
||||
}
|
||||
else
|
||||
{
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, RGB_BLACK);
|
||||
SetPSSCallback(Cb_ReshowPSS);
|
||||
}
|
||||
SetVBlankCallback(VblankCb_PSS);
|
||||
@ -2374,7 +2374,7 @@ static void Cb_ReshowPSS(u8 taskId)
|
||||
switch (sPSSData->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0x10, 0, RGB_BLACK);
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 1:
|
||||
@ -3681,7 +3681,7 @@ static void Cb_NameBox(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
sub_80CE760();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 1:
|
||||
@ -3701,7 +3701,7 @@ static void Cb_ShowMonSummary(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
sub_80CE7E8();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 1:
|
||||
@ -3720,7 +3720,7 @@ static void Cb_GiveItemFromBag(u8 taskId)
|
||||
switch (sPSSData->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sPSSData->state++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -1246,11 +1246,11 @@ static bool8 LoadGraphics(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 23:
|
||||
BlendPalettes(0xFFFFFFFF, 16, 0);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 24:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gPaletteFade.bufferTransferDisabled = 0;
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -1470,7 +1470,7 @@ static void FreeSummaryScreen(void)
|
||||
|
||||
static void BeginCloseSummaryScreen(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = CloseSummaryScreen;
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ void ShutdownPokenav(void)
|
||||
{
|
||||
PlaySE(SE_POKENAV_OFF);
|
||||
ResetBldCnt_();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
bool32 WaitForPokenavShutdownFade(void)
|
||||
@ -521,10 +521,10 @@ void PokenavFadeScreen(s32 fadeType)
|
||||
BeginNormalPaletteFade(structPtr->palettes, -2, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -2, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -2, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -2, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -536,7 +536,7 @@ bool32 IsPaletteFadeActive(void)
|
||||
|
||||
void sub_81C7B40(void)
|
||||
{
|
||||
BlendPalettes(0xFFFEFFFE, 16, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL & ~(0x10000 | 0x1), 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
void InitBgTemplates(const struct BgTemplate *templates, int count)
|
||||
|
@ -1627,8 +1627,8 @@ static void Task_DuoFightAnim(u8 taskId)
|
||||
StopMapMusic();
|
||||
}
|
||||
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB_DuoFight);
|
||||
PlaySE(SE_DOWNPOUR);
|
||||
}
|
||||
@ -1738,21 +1738,21 @@ static void Task_HandleDuoFight(u8 taskId)
|
||||
static void DuoFight_Lightning1(void)
|
||||
{
|
||||
PlaySE(SE_THUNDER);
|
||||
BlendPalettesGradually(0x00007FFF, 0, 16, 0, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(0xFFFF0000, 0, 16, 0, RGB_BLACK, 0, 1);
|
||||
BlendPalettesGradually(PALETTES_BG & ~(0x8000), 0, 16, 0, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(PALETTES_OBJECTS, 0, 16, 0, RGB_BLACK, 0, 1);
|
||||
}
|
||||
|
||||
static void DuoFight_Lightning2(void)
|
||||
{
|
||||
PlaySE(SE_THUNDER);
|
||||
BlendPalettesGradually(0x00007FFF, 0, 16, 16, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(0xFFFF0000, 0, 16, 16, RGB_BLACK, 0, 1);
|
||||
BlendPalettesGradually(PALETTES_BG & ~(0x8000), 0, 16, 16, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(PALETTES_OBJECTS, 0, 16, 16, RGB_BLACK, 0, 1);
|
||||
}
|
||||
|
||||
static void DuoFight_LightningLong(void)
|
||||
{
|
||||
BlendPalettesGradually(0x00007FFF, 4, 16, 0, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(0xFFFF0000, 4, 16, 0, RGB_BLACK, 0, 1);
|
||||
BlendPalettesGradually(PALETTES_BG & ~(0x8000), 4, 16, 0, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(PALETTES_OBJECTS, 4, 16, 0, RGB_BLACK, 0, 1);
|
||||
}
|
||||
|
||||
static void DuoFight_AnimateRain(void)
|
||||
@ -1784,7 +1784,7 @@ static void DuoFight_PanOffScene(u8 taskId)
|
||||
static void DuoFightEnd(u8 taskId, s8 palDelay)
|
||||
{
|
||||
PlaySE(SE_DOWNPOUR_STOP);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, palDelay, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, palDelay, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_DuoFightEnd;
|
||||
}
|
||||
|
||||
@ -2045,7 +2045,7 @@ static void Task_RayTakesFlightAnim(u8 taskId)
|
||||
LoadTakesFlightSceneGfx();
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_OBJ | BLDCNT_TGT2_BG1 | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(8, 8));
|
||||
BlendPalettes(-1, 16, 0);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
SetVBlankCallback(VBlankCB_RayquazaScene);
|
||||
CreateTask(Task_TakesFlight_CreateSmoke, 0);
|
||||
tState = 0;
|
||||
@ -2064,7 +2064,7 @@ static void Task_HandleRayTakesFlight(u8 taskId)
|
||||
// Delay, then fade in
|
||||
if (tTimer == 8)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
tScale = 0;
|
||||
tScaleSpeed = 30;
|
||||
tYCoord = 0;
|
||||
@ -2110,7 +2110,7 @@ static void Task_HandleRayTakesFlight(u8 taskId)
|
||||
if (tTimer > 295)
|
||||
{
|
||||
tState++;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 6, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 6, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -2284,7 +2284,7 @@ static void Task_RayDescendsAnim(u8 taskId)
|
||||
LoadDescendsSceneGfx();
|
||||
SetGpuRegBits(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16));
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
SetVBlankCallback(VBlankCB_RayquazaScene);
|
||||
sRayScene->revealedLightLine = 0;
|
||||
sRayScene->revealedLightTimer = 0;
|
||||
@ -2305,7 +2305,7 @@ static void Task_HandleRayDescends(u8 taskId)
|
||||
// Delay, then fade in
|
||||
if (tTimer == 8)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
tTimer = 0;
|
||||
tState++;
|
||||
}
|
||||
@ -2354,7 +2354,7 @@ static void Task_HandleRayDescends(u8 taskId)
|
||||
break;
|
||||
case 4:
|
||||
// Fade out
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_RayDescendsEnd;
|
||||
break;
|
||||
}
|
||||
@ -2501,7 +2501,7 @@ static void Task_RayChargesAnim(u8 taskId)
|
||||
InitChargesSceneBgs();
|
||||
LoadChargesSceneGfx();
|
||||
SetWindowsHideVertBorders();
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
SetVBlankCallback(VBlankCB_RayquazaScene);
|
||||
tState = 0;
|
||||
tTimer = 0;
|
||||
@ -2523,7 +2523,7 @@ static void Task_HandleRayCharges(u8 taskId)
|
||||
// Delay, then fade in
|
||||
if (tTimer == 8)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
tTimer = 0;
|
||||
tState++;
|
||||
}
|
||||
@ -2559,7 +2559,7 @@ static void Task_HandleRayCharges(u8 taskId)
|
||||
break;
|
||||
case 3:
|
||||
// Fade out
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_RayChargesEnd;
|
||||
break;
|
||||
}
|
||||
@ -2697,7 +2697,7 @@ static void Task_RayChasesAwayAnim(u8 taskId)
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_BG2_ON);
|
||||
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_EFFECT_BLEND);
|
||||
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(9, 14));
|
||||
BlendPalettes(-1, 0x10, 0);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, 0);
|
||||
SetVBlankCallback(VBlankCB_RayquazaScene);
|
||||
tState = 0;
|
||||
tTimer = 0;
|
||||
@ -2720,7 +2720,7 @@ static void Task_HandleRayChasesAway(u8 taskId)
|
||||
if (tTimer == 8)
|
||||
{
|
||||
ChasesAway_CreateTrioSprites(taskId);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
tTimer = 0;
|
||||
tState++;
|
||||
}
|
||||
@ -2760,14 +2760,14 @@ static void Task_HandleRayChasesAway(u8 taskId)
|
||||
tTimer++;
|
||||
if (tTimer % 144 == 0)
|
||||
{
|
||||
BlendPalettesGradually(0x0000FFFE, 0, 16, 0, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(0xFFFF0000, 0, 16, 0, RGB_BLACK, 0, 1);
|
||||
BlendPalettesGradually(PALETTES_BG & ~1, 0, 16, 0, RGB_WHITEALPHA, 0, 0);
|
||||
BlendPalettesGradually(PALETTES_OBJECTS, 0, 16, 0, RGB_BLACK, 0, 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
// Fade out
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 4, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 4, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_RayChasesAwayEnd;
|
||||
break;
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ u8 RecordedBattle_GetBattlerAction(u8 battlerId)
|
||||
{
|
||||
gSpecialVar_Result = gBattleOutcome = B_OUTCOME_PLAYER_TELEPORTED; // hah
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
SetMainCallback2(CB2_QuitRecordedBattle);
|
||||
return 0xFF;
|
||||
}
|
||||
|
@ -1721,7 +1721,7 @@ void CB2_OpenFlyMap(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 9:
|
||||
BlendPalettes(-1, 16, 0);
|
||||
BlendPalettes(PALETTES_ALL, 16, 0);
|
||||
SetVBlankCallback(VBlankCB_FlyMap);
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -1936,7 +1936,7 @@ static void CB_FadeInFlyMap(void)
|
||||
switch (sFlyMap->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
sFlyMap->state++;
|
||||
break;
|
||||
case 1:
|
||||
@ -1983,7 +1983,7 @@ static void CB_ExitFlyMap(void)
|
||||
switch (sFlyMap->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sFlyMap->state++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -553,7 +553,7 @@ static void Task_ResetRtcScreen(u8 taskId)
|
||||
switch (data[0])
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 1, 0x10, 0, RGB_WHITEALPHA);
|
||||
data[0] = 1;
|
||||
break;
|
||||
case 1:
|
||||
@ -622,7 +622,7 @@ static void Task_ResetRtcScreen(u8 taskId)
|
||||
case 5:
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 1, 0, 0x10, RGB_WHITEALPHA);
|
||||
data[0] = 6;
|
||||
}
|
||||
else
|
||||
|
@ -3389,7 +3389,7 @@ static void Task_AcceptMinBet(u8 taskId)
|
||||
ClearStdWindowAndFrame(0, TRUE);
|
||||
HideCoinsWindow();
|
||||
FreeAllWindowBuffers();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gPaletteFade.delayCounter = gPaletteFade.multipurpose2;
|
||||
UpdatePaletteFade();
|
||||
gTasks[taskId].func = Task_FadeToRouletteGame;
|
||||
|
@ -236,7 +236,7 @@ static void CB2_SaveFailedScreen(void)
|
||||
CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again?
|
||||
CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1);
|
||||
SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
EnableInterrupts(1);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP);
|
||||
@ -321,7 +321,7 @@ static void CB2_FadeAndReturnToTitleScreen(void)
|
||||
|
||||
if (JOY_NEW(A_BUTTON))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
SetMainCallback2(CB2_ReturnToTitleScreen);
|
||||
}
|
||||
|
@ -470,8 +470,8 @@ static void CB2_InitBuyMenu(void)
|
||||
BuyMenuAddScrollIndicatorArrows();
|
||||
taskId = CreateTask(Task_BuyMenu, 8);
|
||||
gTasks[taskId].tListTaskId = ListMenuInit(&gMultiuseListMenuTemplate, 0, 0);
|
||||
BlendPalettes(0xFFFFFFFF, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB_BuyMenu);
|
||||
SetMainCallback2(CB2_BuyMenu);
|
||||
break;
|
||||
@ -1152,7 +1152,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId)
|
||||
static void ExitBuyMenu(u8 taskId)
|
||||
{
|
||||
gFieldCallback = MapPostLoadHook_ReturnToShopMenu;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ExitBuyMenu;
|
||||
}
|
||||
|
||||
|
@ -876,7 +876,7 @@ static void Task_FadeToSlotMachine(u8 taskId)
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 1:
|
||||
@ -1149,7 +1149,7 @@ static void Task_SlotMachine(u8 taskId)
|
||||
// SLOT_ACTION_UNFADE
|
||||
static bool8 SlotAction_UnfadeScreen(struct Task *task)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0));
|
||||
LoadPikaPowerMeter(sSlotMachine->pikaPower);
|
||||
sSlotMachine->state++; // SLOT_ACTION_WAIT_FADE
|
||||
return FALSE;
|
||||
@ -1593,7 +1593,7 @@ static bool8 SlotAction_EndGame(struct Task *task)
|
||||
{
|
||||
SetCoins(sSlotMachine->coins);
|
||||
AlertTVOfNewCoinTotal(GetCoins());
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
sSlotMachine->state++; // SLOT_ACTION_FREE
|
||||
return FALSE;
|
||||
}
|
||||
@ -3422,7 +3422,7 @@ static void RunInfoBoxActions(u8 taskId)
|
||||
|
||||
static void InfoBox_FadeIn(struct Task *task)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
task->tState++;
|
||||
}
|
||||
|
||||
@ -3446,7 +3446,7 @@ static void InfoBox_AddText(struct Task *task)
|
||||
{
|
||||
AddTextPrinterParameterized3(1, 1, 2, 5, sColors_ReeltimeHelp, 0, gText_ReelTimeHelp);
|
||||
CopyWindowToVram(1, 3);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0));
|
||||
task->tState++;
|
||||
}
|
||||
|
||||
@ -3458,7 +3458,7 @@ static void InfoBox_AwaitPlayerInput(struct Task *task)
|
||||
ClearWindowTilemap(1);
|
||||
CopyWindowToVram(1, 1);
|
||||
RemoveWindow(1);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB(0, 0, 0));
|
||||
task->tState++;
|
||||
}
|
||||
}
|
||||
@ -3479,7 +3479,7 @@ static void InfoBox_CreateDigitalDisplay(struct Task *task)
|
||||
static void InfoBox_LoadPikaPowerMeter(struct Task *task)
|
||||
{
|
||||
LoadPikaPowerMeter(sSlotMachine->pikaPower);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0));
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB(0, 0, 0));
|
||||
task->tState++;
|
||||
}
|
||||
|
||||
|
@ -1232,7 +1232,7 @@ static void Task_SaveAfterLinkBattle(u8 taskId)
|
||||
DrawTextBorderOuter(0, 8, 14);
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
|
||||
if (gWirelessCommType != 0 && InUnionRoom())
|
||||
{
|
||||
@ -1265,7 +1265,7 @@ static void Task_SaveAfterLinkBattle(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
*state = 4;
|
||||
break;
|
||||
case 4:
|
||||
|
@ -425,7 +425,7 @@ void CB2_ChooseStarter(void)
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_PokeballSelect[0]);
|
||||
LoadCompressedSpriteSheet(&sSpriteSheet_StarterCircle[0]);
|
||||
LoadSpritePalettes(sSpritePalettes_StarterChoose);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0x10, 0, RGB_BLACK);
|
||||
|
||||
EnableInterrupts(DISPSTAT_VBLANK);
|
||||
SetVBlankCallback(VblankCB_StarterChoose);
|
||||
|
@ -580,7 +580,7 @@ void CB2_InitTitleScreen(void)
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 1, 0x10, 0, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 1, 0x10, 0, RGB_WHITEALPHA);
|
||||
SetVBlankCallback(VBlankCB);
|
||||
gMain.state = 4;
|
||||
break;
|
||||
@ -730,7 +730,7 @@ static void Task_TitleScreenPhase3(u8 taskId)
|
||||
if ((JOY_NEW(A_BUTTON)) || (JOY_NEW(START_BUTTON)))
|
||||
{
|
||||
FadeOutBGM(4);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
SetMainCallback2(CB2_GoToMainMenu);
|
||||
}
|
||||
else if (JOY_HELD(CLEAR_SAVE_BUTTON_COMBO) == CLEAR_SAVE_BUTTON_COMBO)
|
||||
@ -741,13 +741,13 @@ static void Task_TitleScreenPhase3(u8 taskId)
|
||||
&& CanResetRTC() == TRUE)
|
||||
{
|
||||
FadeOutBGM(4);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
SetMainCallback2(CB2_GoToResetRtcScreen);
|
||||
}
|
||||
else if (JOY_HELD(BERRY_UPDATE_BUTTON_COMBO) == BERRY_UPDATE_BUTTON_COMBO)
|
||||
{
|
||||
FadeOutBGM(4);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
SetMainCallback2(CB2_GoToBerryFixScreen);
|
||||
}
|
||||
else
|
||||
@ -764,7 +764,7 @@ static void Task_TitleScreenPhase3(u8 taskId)
|
||||
UpdateLegendaryMarkingColor(gTasks[taskId].tCounter);
|
||||
if ((gMPlayInfo_BGM.status & 0xFFFF) == 0)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_WHITEALPHA);
|
||||
SetMainCallback2(CB2_GoToCopyrightScreen);
|
||||
}
|
||||
}
|
||||
|
62
src/trade.c
62
src/trade.c
@ -584,7 +584,7 @@ static void CB2_CreateTradeMenu(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 18:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 19:
|
||||
@ -764,8 +764,8 @@ static void CB2_ReturnToTradeMenu(void)
|
||||
break;
|
||||
case 18:
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 19:
|
||||
@ -805,7 +805,7 @@ static void LinkTradeFadeOut(void)
|
||||
{
|
||||
if (++sTradeMenuData->timer > 15)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_WAIT_FADE;
|
||||
}
|
||||
}
|
||||
@ -1164,7 +1164,7 @@ static void ReactToLinkTradeData(u8 mpId, u8 status)
|
||||
switch (gBlockRecvBuffer[0][0])
|
||||
{
|
||||
case LINKCMD_CANCEL_TRADE:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
PrintTradeMessage(TRADE_MSG_WAITING_FOR_FRIEND);
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CANCEL_TRADE_1;
|
||||
break;
|
||||
@ -1180,7 +1180,7 @@ static void ReactToLinkTradeData(u8 mpId, u8 status)
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CONFIRM_TRADE_PROMPT;
|
||||
break;
|
||||
case LINKCMD_START_TRADE:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_WAIT_FADE;
|
||||
break;
|
||||
case LINKCMD_0xDDEE:
|
||||
@ -1235,7 +1235,7 @@ static void QueueLinkTradeData(void)
|
||||
sTradeMenuData->linkData[0] = LINKCMD_CANCEL_TRADE;
|
||||
sTradeMenuData->linkData[1] = 0;
|
||||
QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0;
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_CANCEL_TRADE_1;
|
||||
}
|
||||
@ -1387,7 +1387,7 @@ static void TradeMenuProcessInput(void)
|
||||
// Cursor is in partner's party
|
||||
else if (sTradeMenuData->cursorPosition < PARTY_SIZE * 2)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SHOW_MON_SUMMARY;
|
||||
}
|
||||
// Cursor is on Cancel
|
||||
@ -1419,7 +1419,7 @@ static void TradeMenuProcessInput_SelectedMon(void)
|
||||
case MENU_NOTHING_CHOSEN:
|
||||
break;
|
||||
case 0: // Summary
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_SHOW_MON_SUMMARY;
|
||||
break;
|
||||
case 1: // Trade
|
||||
@ -2845,7 +2845,7 @@ void CB2_LinkTrade(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 10:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
ShowBg(0);
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -3336,7 +3336,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
// The game waits here for the sprite to finish its animation sequence.
|
||||
break;
|
||||
case 14:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeData->state = 20;
|
||||
break;
|
||||
case 20:
|
||||
@ -3349,7 +3349,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
}
|
||||
break;
|
||||
case 21:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 22:
|
||||
@ -3426,7 +3426,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
}
|
||||
break;
|
||||
case 29:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
sTradeData->state = 30;
|
||||
break;
|
||||
case 30:
|
||||
@ -3439,7 +3439,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
sTradeData->unk_90 = CreateSprite(&sGlowBallSpriteTemplate, 111, 170, 0);
|
||||
sTradeData->unk_91 = CreateSprite(&sGlowBallSpriteTemplate, 129, -10, 0);
|
||||
sTradeData->state++;
|
||||
@ -3518,7 +3518,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
gSprites[sTradeData->unk_91].pos2.y += 3;
|
||||
if (gSprites[sTradeData->unk_90].pos2.y <= -222)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
DestroySprite(&gSprites[sTradeData->unk_90]);
|
||||
DestroySprite(&gSprites[sTradeData->unk_91]);
|
||||
@ -3536,7 +3536,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
}
|
||||
break;
|
||||
case 41:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 42:
|
||||
@ -3614,7 +3614,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
sTradeData->sXY = 0x8000 / sTradeData->unk_EA;
|
||||
break;
|
||||
case 52:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeData->state = 60;
|
||||
break;
|
||||
|
||||
@ -3629,7 +3629,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
break;
|
||||
case 61:
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 62:
|
||||
@ -3743,7 +3743,7 @@ static bool8 AnimateTradeSequenceCable(void)
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 73:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 74:
|
||||
@ -3828,7 +3828,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
// The game waits here for the sprite to finish its animation sequence.
|
||||
break;
|
||||
case 14:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeData->state = 20;
|
||||
break;
|
||||
case 20:
|
||||
@ -3841,7 +3841,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
}
|
||||
break;
|
||||
case 21:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 22:
|
||||
@ -3923,7 +3923,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
}
|
||||
break;
|
||||
case 29:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
sTradeData->state = 30;
|
||||
break;
|
||||
case 30:
|
||||
@ -3936,7 +3936,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
}
|
||||
break;
|
||||
case 31:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
sTradeData->unk_90 = CreateSprite(&sGlowBallSpriteTemplate, 111, 170, 0);
|
||||
sTradeData->unk_91 = CreateSprite(&sGlowBallSpriteTemplate, 129, -10, 0);
|
||||
sTradeData->state++;
|
||||
@ -4016,7 +4016,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
gSprites[sTradeData->unk_91].pos2.y += 3;
|
||||
if (gSprites[sTradeData->unk_90].pos2.y <= -222)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
DestroySprite(&gSprites[sTradeData->unk_90]);
|
||||
DestroySprite(&gSprites[sTradeData->unk_91]);
|
||||
@ -4037,7 +4037,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
}
|
||||
break;
|
||||
case 41:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 42:
|
||||
@ -4130,7 +4130,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
sTradeData->sXY = 0x8000 / sTradeData->unk_EA;
|
||||
break;
|
||||
case 52:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeData->state = 60;
|
||||
break;
|
||||
case 60:
|
||||
@ -4144,7 +4144,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
break;
|
||||
case 61:
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 62:
|
||||
@ -4258,7 +4258,7 @@ static bool8 AnimateTradeSequenceWireless(void)
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 73:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sTradeData->state++;
|
||||
break;
|
||||
case 74:
|
||||
@ -4667,7 +4667,7 @@ static void CB2_SaveAndEndTrade(void)
|
||||
case 6:
|
||||
if (_IsLinkTaskFinished())
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gMain.state ++;
|
||||
}
|
||||
break;
|
||||
@ -4741,7 +4741,7 @@ void DoInGameTradeScene(void)
|
||||
{
|
||||
ScriptContext2_Enable();
|
||||
CreateTask(Task_InGameTrade, 10);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
}
|
||||
|
||||
static void Task_InGameTrade(u8 taskId)
|
||||
@ -4974,7 +4974,7 @@ static void CB2_SaveAndEndWirelessTrade(void)
|
||||
if (_IsLinkTaskFinished())
|
||||
{
|
||||
FadeOutBGM(3);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gMain.state = 11;
|
||||
}
|
||||
break;
|
||||
|
@ -414,8 +414,8 @@ static void Task_TrainerCard(u8 taskId)
|
||||
LoadWirelessStatusIndicatorSpriteGfx();
|
||||
CreateWirelessStatusIndicatorSprite(230, 150);
|
||||
}
|
||||
BlendPalettes(0xFFFFFFFF, 16, sData->blendColor);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, sData->blendColor);
|
||||
BlendPalettes(PALETTES_ALL, 16, sData->blendColor);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, sData->blendColor);
|
||||
SetVBlankCallback(VblankCb_TrainerCard);
|
||||
sData->mainState++;
|
||||
break;
|
||||
@ -452,7 +452,7 @@ static void Task_TrainerCard(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, sData->blendColor);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, sData->blendColor);
|
||||
sData->mainState = STATE_CLOSE_CARD;
|
||||
}
|
||||
}
|
||||
@ -473,7 +473,7 @@ static void Task_TrainerCard(u8 taskId)
|
||||
}
|
||||
else if (gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, sData->blendColor);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, sData->blendColor);
|
||||
sData->mainState = STATE_CLOSE_CARD;
|
||||
}
|
||||
else
|
||||
@ -491,7 +491,7 @@ static void Task_TrainerCard(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, sData->blendColor);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, sData->blendColor);
|
||||
sData->mainState = STATE_CLOSE_CARD;
|
||||
}
|
||||
}
|
||||
@ -506,7 +506,7 @@ static void Task_TrainerCard(u8 taskId)
|
||||
case STATE_CLOSE_CARD_LINK:
|
||||
if (!gReceivedRemoteLinkPlayers)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, sData->blendColor);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, sData->blendColor);
|
||||
sData->mainState = STATE_CLOSE_CARD;
|
||||
}
|
||||
break;
|
||||
|
@ -2986,7 +2986,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
uroom->state = UR_STATE_START_ACTIVITY_FADE;
|
||||
break;
|
||||
case UR_STATE_START_ACTIVITY_FADE:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
uroom->state = UR_STATE_START_ACTIVITY;
|
||||
break;
|
||||
case UR_STATE_START_ACTIVITY:
|
||||
@ -3050,7 +3050,7 @@ static void Task_RunUnionRoom(u8 taskId)
|
||||
}
|
||||
break;
|
||||
case UR_STATE_REGISTER_SELECT_MON_FADE:
|
||||
BeginNormalPaletteFade(-1, 0, 0, 0x10, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
uroom->state = UR_STATE_REGISTER_SELECT_MON;
|
||||
break;
|
||||
case UR_STATE_REGISTER_SELECT_MON:
|
||||
|
@ -143,7 +143,7 @@ void CB2_UnionRoomBattle(void)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
ShowBg(0);
|
||||
gMain.state++;
|
||||
break;
|
||||
@ -169,7 +169,7 @@ void CB2_UnionRoomBattle(void)
|
||||
if (gBlockRecvBuffer[0][0] == (ACTIVITY_ACCEPT | IN_UNION_ROOM)
|
||||
&& gBlockRecvBuffer[1][0] == (ACTIVITY_ACCEPT | IN_UNION_ROOM))
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gMain.state = 50;
|
||||
}
|
||||
else
|
||||
|
@ -930,8 +930,8 @@ static void CB2_LoadInterface(void)
|
||||
RunDisplaySubtasks();
|
||||
if (!IsDisplaySubtask0Active())
|
||||
{
|
||||
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 16, 0, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 16, 0, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB_UnionRoomChatMain);
|
||||
gMain.state++;
|
||||
}
|
||||
@ -1567,7 +1567,7 @@ static void Chat_SaveAndExit(void)
|
||||
sChat->funcState = 12;
|
||||
break;
|
||||
case 12:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -1, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, -1, 0, 16, RGB_BLACK);
|
||||
sChat->funcState = 13;
|
||||
break;
|
||||
case 13:
|
||||
|
@ -569,7 +569,7 @@ static void ShowUsePokeblockMenu(void)
|
||||
switch (sInfo->mainState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
SetVBlankCallback(VBlankCB_UsePokeblockMenu);
|
||||
ShowBg(0);
|
||||
ShowBg(1);
|
||||
@ -695,7 +695,7 @@ static void FeedPokeblockToMon(void)
|
||||
gPokeblockMonId = GetPartyIdFromSelectionId(sMenu->info.curSelection);
|
||||
sExitCallback = sInfo->exitCallback;
|
||||
sPokeblock = sInfo->pokeblock;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sInfo->mainState++;
|
||||
break;
|
||||
case 1:
|
||||
@ -739,7 +739,7 @@ static void ShowUsePokeblockMenuForResults(void)
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
BlendPalettes(0xFFFFFFFF, 16, RGB_BLACK);
|
||||
BlendPalettes(PALETTES_ALL, 16, RGB_BLACK);
|
||||
sInfo->mainState++;
|
||||
break;
|
||||
case 4:
|
||||
@ -751,7 +751,7 @@ static void ShowUsePokeblockMenuForResults(void)
|
||||
break;
|
||||
case 5:
|
||||
SetVBlankCallback(VBlankCB_UsePokeblockMenu);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
sInfo->mainState++;
|
||||
break;
|
||||
case 6:
|
||||
@ -827,7 +827,7 @@ static void CloseUsePokeblockMenu(void)
|
||||
switch (sInfo->mainState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
sInfo->mainState++;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -665,7 +665,7 @@ static void LoadWallClockGraphics(void)
|
||||
|
||||
static void WallClockInit(void)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
EnableInterrupts(INTR_FLAG_VBLANK);
|
||||
SetVBlankCallback(VBlankCB_WallClock);
|
||||
SetMainCallback2(CB2_WallClock);
|
||||
@ -856,7 +856,7 @@ static void Task_SetClock_HandleConfirmInput(u8 taskId)
|
||||
static void Task_SetClock_Confirmed(u8 taskId)
|
||||
{
|
||||
RtcInitLocalTimeOffset(gTasks[taskId].tHours, gTasks[taskId].tMinutes);
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_SetClock_Exit;
|
||||
}
|
||||
|
||||
@ -884,7 +884,7 @@ static void Task_ViewClock_HandleInput(u8 taskId)
|
||||
|
||||
static void Task_ViewClock_FadeOut(u8 taskId)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
gTasks[taskId].func = Task_ViewClock_Exit;
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ static void Task_WirelessCommunicationScreen(u8 taskId)
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 1:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, 0);
|
||||
ShowBg(1);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
ShowBg(0);
|
||||
@ -296,7 +296,7 @@ static void Task_WirelessCommunicationScreen(u8 taskId)
|
||||
WCSS_CyclePalette(&gTasks[taskId].data[7], &gTasks[taskId].data[8]);
|
||||
break;
|
||||
case 4:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, 0);
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 5:
|
||||
|
Loading…
x
Reference in New Issue
Block a user