Skip to content

Commit

Permalink
Replaced copyright magic numbers in intro.c with constants (#2035)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkmnsnfrn authored Oct 3, 2024
1 parent 2b73d10 commit 9a24c03
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ extern const struct CompressedSpriteSheet gBattleAnimPicTable[];
extern const struct CompressedSpritePalette gBattleAnimPaletteTable[];
extern const struct SpriteTemplate gAncientPowerRockSpriteTemplate[];

enum {
COPYRIGHT_INITIALIZE,
COPYRIGHT_START_FADE = 140,
COPYRIGHT_START_INTRO,
};

#define TAG_VOLBEAT 1500
#define TAG_TORCHIC 1501
#define TAG_MANECTRIC 1502
Expand Down Expand Up @@ -1067,7 +1073,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 +1107,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 9a24c03

Please sign in to comment.