Skip to content

Commit

Permalink
Replaced copyright magic numbers in intro.c with constants
Browse files Browse the repository at this point in the history
  • Loading branch information
pkmnsnfrn committed Sep 21, 2024
1 parent 7316e54 commit 56dc0e6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
extern const struct SpriteTemplate gAncientPowerRockSpriteTemplate[];

#define COPYRIGHT_INITIALIZE 0
#define COPYRIGHT_START_FADE 140
#define COPYRIGHT_START_INTRO 141

#define TAG_VOLBEAT 1500
#define TAG_TORCHIC 1501
#define TAG_MANECTRIC 1502
Expand Down Expand Up @@ -1067,7 +1071,7 @@ static u8 SetUpCopyrightScreen(void)
{
switch (gMain.state)
{
case 0:
case COPYRIGHT_INITIALIZE:
SetVBlankCallback(NULL);
SetGpuReg(REG_OFFSET_BLDCNT, 0);
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
Expand Down Expand Up @@ -1101,15 +1105,15 @@ static u8 SetUpCopyrightScreen(void)
gMain.state++;
GameCubeMultiBoot_Main(&gMultibootProgramStruct);
break;
case 140:
case COPYRIGHT_START_FADE:
GameCubeMultiBoot_Main(&gMultibootProgramStruct);
if (gMultibootProgramStruct.gcmb_field_2 != 1)
{
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
gMain.state++;
}
break;
case 141:
case COPYRIGHT_START_INTRO:
if (UpdatePaletteFade())
break;
CreateTask(Task_Scene1_Load, 0);
Expand Down

0 comments on commit 56dc0e6

Please sign in to comment.