Skip to content

Commit

Permalink
[intro] add fading, refactor abort, align intro gfx
Browse files Browse the repository at this point in the history
  • Loading branch information
sbird committed Feb 16, 2023
1 parent e3e005b commit 0be0903
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
Binary file modified graphics/expansion_intro/rhh_credits.bin
Binary file not shown.
Binary file modified graphics/expansion_intro/rhh_credits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 24 additions & 7 deletions src/expansion_intro.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "global.h"
#include "bg.h"
#include "clear_save_data_menu.h"
#include "decompress.h"
#include "palette.h"
#include "sound.h"
Expand All @@ -10,6 +9,7 @@
#include "trig.h"
#include "main.h"
#include "intro.h"
#include "m4a.h"
#include "expansion_intro.h"
#include "constants/rgb.h"
#include "constants/songs.h"
Expand Down Expand Up @@ -253,17 +253,34 @@ void Task_HandleExpansionIntro(u8 taskId)
tState++;
break;
case 2:
if (tFrameCounter == 208 || gMain.newKeys != 0)
if (tFrameCounter == 208)
{
tState++;
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
}
else if (gMain.newKeys != 0)
{
CpuFill16(0, gPlttBufferFaded, sizeof(gPlttBufferFaded));
if (IsCryPlaying())
StopCry();
m4aSongNumStop(SE_BIKE_HOP);
m4aSongNumStop(SE_M_DOUBLE_SLAP);
tState++;
}
else
{
tFrameCounter++;
}
break;
case 3:
ResetSpriteData();
FreeAllSpritePalettes();
DestroyTask(taskId);
CreateTask(Task_Scene1_Load, 0);
SetMainCallback2(MainCB2_Intro);
if (!gPaletteFade.active)
{
ResetSpriteData();
FreeAllSpritePalettes();
DestroyTask(taskId);
CreateTask(Task_Scene1_Load, 0);
SetMainCallback2(MainCB2_Intro);
}
break;
}
}
Expand Down

0 comments on commit 0be0903

Please sign in to comment.