summaryrefslogtreecommitdiff
path: root/src/pokedex.c
diff options
context:
space:
mode:
authorCameron Hall <camthesaxman@users.noreply.github.com>2017-05-09 12:52:39 -0500
committerYamaArashi <YamaArashi@users.noreply.github.com>2017-05-09 10:52:39 -0700
commitfbebe08ae94b8e165ba120d71959554765307ce3 (patch)
tree8bbf39cf53e1c523b910d4f2e20e280e8f041f18 /src/pokedex.c
parent53a02e080f973071a92c141c031eb912f6ad119d (diff)
use macros to set DISPCNT and BG*CNT registers (#286)
* use macros to set DISPCNT and BG*CNT registers * add a few more
Diffstat (limited to 'src/pokedex.c')
-rw-r--r--src/pokedex.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/pokedex.c b/src/pokedex.c
index d31d649e0..5ea1f9938 100644
--- a/src/pokedex.c
+++ b/src/pokedex.c
@@ -789,10 +789,10 @@ bool8 sub_808D344(u8 a)
REG_BLDCNT = 0;
REG_BLDALPHA = 0;
REG_BLDY = 0;
- REG_BG3CNT = 0xF03;
- REG_BG1CNT = 0xD01;
- REG_BG0CNT = 0xC00;
- REG_DISPCNT = 0x9F40;
+ REG_BG3CNT = BGCNT_PRIORITY(3) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(15) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_BG1CNT = BGCNT_PRIORITY(1) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_BG0CNT = BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(12) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG_ALL_ON | DISPCNT_OBJ_ON | DISPCNT_OBJWIN_ON;
gMain.state++;
break;
case 6:
@@ -2296,8 +2296,8 @@ void Task_InitPageScreenMultistep(u8 taskId)
REG_BLDCNT = 0;
REG_BLDALPHA = 0;
REG_BLDY = 0;
- REG_BG3CNT = 0xF03;
- REG_BG1CNT = 0xD00;
+ REG_BG3CNT = BGCNT_PRIORITY(3) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(15) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_BG1CNT = BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256;
REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_BG2_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_ON;
gMain.state++;
break;
@@ -2422,7 +2422,7 @@ void Task_InitAreaScreenMultistep(u8 taskId)
sub_8090540(0xD);
sub_8090644(1, 0xD);
sub_808D640();
- REG_BG1CNT = 0xD00;
+ REG_BG1CNT = BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256;
gMain.state++;
break;
case 2:
@@ -2544,10 +2544,10 @@ void Task_InitCryScreenMultistep(u8 taskId)
REG_BLDCNT = 0;
REG_BLDALPHA = 0;
REG_BLDY = 0;
- REG_BG2CNT = 0xE02;
- REG_BG0CNT = 0x1F07;
- REG_BG1CNT = 0xD00;
- REG_DISPCNT = 0x1F07 + 0x39;
+ REG_BG2CNT = BGCNT_PRIORITY(2) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(14) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_BG0CNT = BGCNT_PRIORITY(3) | BGCNT_CHARBASE(1) | BGCNT_SCREENBASE(31) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_BG1CNT = BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG_ALL_ON | DISPCNT_OBJ_ON;
gMain.state++;
break;
case 10:
@@ -2715,8 +2715,8 @@ void Task_InitSizeScreenMultistep(u8 taskId)
REG_BLDCNT = 0;
REG_BLDALPHA = 0;
REG_BLDY = 0;
- REG_BG2CNT = 0xE03;
- REG_DISPCNT = 0x1E40;
+ REG_BG2CNT = BGCNT_PRIORITY(3) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(14) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG1_ON | DISPCNT_BG2_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_ON;
gMain.state++;
break;
case 9:
@@ -3156,8 +3156,8 @@ void sub_8090750(u8 taskId)
REG_BLDCNT = 0;
REG_BLDALPHA = 0;
REG_BLDY = 0;
- REG_BG3CNT = 0xF07;
- REG_DISPCNT = 0x1C40;
+ REG_BG3CNT = BGCNT_PRIORITY(3) | BGCNT_CHARBASE(1) | BGCNT_SCREENBASE(15) | BGCNT_16COLOR | BGCNT_TXT256x256;
+ REG_DISPCNT = DISPCNT_MODE_0 | DISPCNT_OBJ_1D_MAP | DISPCNT_BG2_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_ON;
gTasks[taskId].data[0]++;
break;
case 6: