Replaced copyright magic numbers in intro.c with constants (#2035)

This commit is contained in:
psf 2024-10-02 17:48:54 -07:00 committed by GitHub
parent 2b73d10a2a
commit 9a24c031bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
@ -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);
@ -1101,7 +1107,7 @@ 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)
{
@ -1109,7 +1115,7 @@ static u8 SetUpCopyrightScreen(void)
gMain.state++;
}
break;
case 141:
case COPYRIGHT_START_INTRO:
if (UpdatePaletteFade())
break;
CreateTask(Task_Scene1_Load, 0);