diff --git a/src/battle_anim.c b/src/battle_anim.c index d1550f31e6..7dd1526dd2 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -2283,7 +2283,7 @@ static void ScriptCmd_setalpha(void) sBattleAnimScriptPtr++; half1 = *(sBattleAnimScriptPtr++); half2 = *(sBattleAnimScriptPtr++) << 8; - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F40); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, half1 | half2); } diff --git a/src/battle_anim_effects_2.c b/src/battle_anim_effects_2.c index 8acbf62d4a..0ec8b63d7a 100755 --- a/src/battle_anim_effects_2.c +++ b/src/battle_anim_effects_2.c @@ -3134,7 +3134,7 @@ void sub_8105EB0(u8 taskId) SetGpuReg(REG_OFFSET_WIN0V, gBattle_WIN0V); SetGpuReg(REG_OFFSET_WININ, 0x3F1F); SetGpuReg(REG_OFFSET_WINOUT, 0x3F3F); - SetGpuReg(REG_OFFSET_BLDCNT, 0xC8); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG3 | BLDCNT_EFFECT_DARKEN); SetGpuReg(REG_OFFSET_BLDY, 0x10); gTasks[taskId].data[0] = win0v; gTasks[taskId].data[1] = win0h; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index f6858c0935..5f135691b9 100755 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -3220,7 +3220,7 @@ void sub_815CED8(u8 taskId) gSprites[spriteId].oam.objMode = ST_OAM_OBJ_BLEND; FillPalette(RGB(31, 31, 31), (gSprites[spriteId].oam.paletteNum << 4) + 0x100, 32); gSprites[spriteId].oam.priority = priority; - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F40); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(gTasks[taskId].data[1], 16 - gTasks[taskId].data[1])); gTasks[taskId].data[0] = spriteId; diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index d87509e101..3631c083ad 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -67,7 +67,7 @@ static const u16 sUnknown_08618138[] = { 0x7fff, 0x7fff, 0x318c, 0x675a, 0x043c, 0x3aff, 0x0664, 0x4bd2, 0x6546, 0x7b14, 0x7fff, 0x318c, - 0x675a, 0x0000, 0x0000, 0x0000 + 0x675a, 0, 0, 0 }; static const u8 sUnknown_08618158[] = {10, 11, 12}; @@ -124,7 +124,7 @@ void CB2_InitBerryFixProgram(void) ResetSpriteData(); ResetTasks(); ScanlineEffect_Stop(); - SetGpuReg(REG_OFFSET_DISPCNT, 0x0000); + SetGpuReg(REG_OFFSET_DISPCNT, 0); berry_fix_mb_manager = AllocZeroed(0x50); berry_fix_mb_manager->state = 0; berry_fix_mb_manager->unk1 = 6; @@ -203,13 +203,13 @@ static void berry_fix_gpu_set(void) { s32 width, left; - SetGpuReg(REG_OFFSET_BG0CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG1CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG0HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG0VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG1HOFS, 0x0000); - SetGpuReg(REG_OFFSET_BG1VOFS, 0x0000); - SetGpuReg(REG_OFFSET_BLDCNT, 0x0000); + SetGpuReg(REG_OFFSET_BG0CNT, 0); + SetGpuReg(REG_OFFSET_BG1CNT, 0); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + SetGpuReg(REG_OFFSET_BLDCNT, 0); DmaFill32(3, 0, VRAM, VRAM_SIZE); DmaFill32(3, 0, OAM, OAM_SIZE); diff --git a/src/credits.c b/src/credits.c index 5e52e5fb71..c27004a283 100644 --- a/src/credits.c +++ b/src/credits.c @@ -2219,7 +2219,7 @@ static void sub_8177050(struct Sprite *sprite) } else { - SetGpuReg(REG_OFFSET_BLDCNT, 0xF40); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3); SetGpuReg(REG_OFFSET_BLDALPHA, 0x10); sprite->oam.objMode = 1; sprite->data[3] = 16; diff --git a/src/evolution_scene.c b/src/evolution_scene.c index ea2302130b..1b3133e9ec 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -1479,7 +1479,7 @@ static void InitMovingBackgroundTask(bool8 isLink) if (!isLink) { - SetGpuReg(REG_OFFSET_BLDCNT, 0x442); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG2); SetGpuReg(REG_OFFSET_BLDALPHA, 0x808); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG2_ON | DISPCNT_BG1_ON | DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP); @@ -1491,7 +1491,7 @@ static void InitMovingBackgroundTask(bool8 isLink) } else { - SetGpuReg(REG_OFFSET_BLDCNT, 0x842); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG3); SetGpuReg(REG_OFFSET_BLDALPHA, 0x808); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_BG3_ON | DISPCNT_BG1_ON | DISPCNT_BG0_ON | DISPCNT_OBJ_1D_MAP); } diff --git a/src/fldeff_misc.c b/src/fldeff_misc.c index 9d77383ae4..1f4c6f9fbd 100644 --- a/src/fldeff_misc.c +++ b/src/fldeff_misc.c @@ -376,7 +376,7 @@ static void sub_80F9C90(u8 taskId) task->data[7] = GetGpuReg(REG_OFFSET_BLDCNT); task->data[8] = GetGpuReg(REG_OFFSET_BLDY); - SetGpuReg(REG_OFFSET_BLDCNT, 0xBF); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN); SetGpuReg(REG_OFFSET_BLDY, 0x10); break; @@ -452,7 +452,7 @@ static void sub_80F9DFC(u8 taskId) { task->data[5] = 0x50; task->data[6] = 0x51; - SetGpuReg(REG_OFFSET_BLDCNT, 0xBF); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_ALL | BLDCNT_EFFECT_LIGHTEN); SetGpuReg(REG_OFFSET_BLDY, 0x10); } SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(task->data[5], task->data[6])); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index b973798f6e..63818dd49b 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -355,7 +355,7 @@ static bool8 InitHallOfFameScreen(void) gMain.state++; break; case 2: - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F42); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, 0x710); SetGpuReg(REG_OFFSET_BLDY, 0); sub_8174FAC(); @@ -817,7 +817,7 @@ void CB2_DoHallOfFamePC(void) { u8 taskId, i; - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F42); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, 0x710); SetGpuReg(REG_OFFSET_BLDY, 0); taskId = CreateTask(Task_HofPC_CopySaveData, 0); diff --git a/src/starter_choose.c b/src/starter_choose.c index afa3fabbf6..2d4a1b1e1c 100644 --- a/src/starter_choose.c +++ b/src/starter_choose.c @@ -425,7 +425,7 @@ void CB2_ChooseStarter(void) SetGpuReg(REG_OFFSET_WINOUT, 0x1F); SetGpuReg(REG_OFFSET_WIN0H, 0); SetGpuReg(REG_OFFSET_WIN0V, 0); - SetGpuReg(REG_OFFSET_BLDCNT, 0xFE); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_TGT1_BG2 | BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 7); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON | DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); diff --git a/src/title_screen.c b/src/title_screen.c index c6e9aa26fa..76704987f4 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -553,7 +553,7 @@ void CB2_InitTitleScreen(void) SetGpuReg(REG_OFFSET_WIN1V, 0); SetGpuReg(REG_OFFSET_WININ, 0x1F1F); SetGpuReg(REG_OFFSET_WINOUT, 0x3F1F); - SetGpuReg(REG_OFFSET_BLDCNT, 0x84); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG2 | BLDCNT_EFFECT_LIGHTEN); SetGpuReg(REG_OFFSET_BLDALPHA, 0); SetGpuReg(REG_OFFSET_BLDY, 0xC); SetGpuReg(REG_OFFSET_BG0CNT, BGCNT_PRIORITY(3) | BGCNT_CHARBASE(2) | BGCNT_SCREENBASE(26) | BGCNT_16COLOR | BGCNT_TXT256x256); @@ -615,7 +615,7 @@ static void Task_TitleScreenPhase1(u8 taskId) SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG2_ON | DISPCNT_OBJ_ON); SetGpuReg(REG_OFFSET_WININ, 0); SetGpuReg(REG_OFFSET_WINOUT, 0); - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F50); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_OBJ | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, 0x10); SetGpuReg(REG_OFFSET_BLDY, 0); @@ -652,7 +652,7 @@ static void Task_TitleScreenPhase2(u8 taskId) else { gTasks[taskId].tSkipToNext = TRUE; - SetGpuReg(REG_OFFSET_BLDCNT, 0x2142); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG1 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BD); SetGpuReg(REG_OFFSET_BLDALPHA, 0xF06); SetGpuReg(REG_OFFSET_BLDY, 0); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_1 diff --git a/src/unk_transition.c b/src/unk_transition.c index 7346e06abe..0faf454026 100644 --- a/src/unk_transition.c +++ b/src/unk_transition.c @@ -337,7 +337,7 @@ static bool8 sub_81DAACC(struct Task *task) else { sub_81DA700(); - SetGpuReg(REG_OFFSET_BLDCNT, 0x3F41); + SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, 0x1000); ChangeBgX(0, 0, 0); ChangeBgY(0, 0, 0); diff --git a/src/wallclock.c b/src/wallclock.c index 58704c8a39..546750ba66 100644 --- a/src/wallclock.c +++ b/src/wallclock.c @@ -585,11 +585,11 @@ static void WallClockVblankCallback(void) static void LoadWallClockGraphics(void) { SetVBlankCallback(NULL); - SetGpuReg(REG_OFFSET_DISPCNT, 0x0000); - SetGpuReg(REG_OFFSET_BG3CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG2CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG1CNT, 0x0000); - SetGpuReg(REG_OFFSET_BG0CNT, 0x0000); + SetGpuReg(REG_OFFSET_DISPCNT, 0); + SetGpuReg(REG_OFFSET_BG3CNT, 0); + SetGpuReg(REG_OFFSET_BG2CNT, 0); + SetGpuReg(REG_OFFSET_BG1CNT, 0); + SetGpuReg(REG_OFFSET_BG0CNT, 0); ChangeBgX(0, 0, 0); ChangeBgY(0, 0, 0); ChangeBgX(1, 0, 0); @@ -633,9 +633,9 @@ static void WallClockInit(void) EnableInterrupts(INTR_FLAG_VBLANK); SetVBlankCallback(WallClockVblankCallback); SetMainCallback2(WallClockMainCallback); - SetGpuReg(REG_OFFSET_BLDCNT, 0x0000); - SetGpuReg(REG_OFFSET_BLDALPHA, 0x0000); - SetGpuReg(REG_OFFSET_BLDY, 0x0000); + SetGpuReg(REG_OFFSET_BLDCNT, 0); + SetGpuReg(REG_OFFSET_BLDALPHA, 0); + SetGpuReg(REG_OFFSET_BLDY, 0); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); ShowBg(0); ShowBg(2);