From fea54c9277808c8de4c4a21078598dc9926d5d31 Mon Sep 17 00:00:00 2001 From: sbird Date: Wed, 15 Feb 2023 01:06:24 +0100 Subject: [PATCH] [intro] add fading, refactor abort, align intro gfx --- graphics/expansion_intro/rhh_credits.bin | Bin 2048 -> 2048 bytes graphics/expansion_intro/rhh_credits.png | Bin 1703 -> 1708 bytes src/expansion_intro.c | 31 ++++++++++++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/graphics/expansion_intro/rhh_credits.bin b/graphics/expansion_intro/rhh_credits.bin index 629a2e9544af1ebc9589eb6c6fbe444fb87cad6e..44ec5e7e42e213a791b665e36f5402f490cf21cf 100644 GIT binary patch literal 2048 zcmeH@S5pE(5QIN;%>ff86fj`M958?ZOsAX?6v3SJ|Gzu8cvQ(B;KALg?WyhQuAOQy z=RYUl!9xX=D5|KYhFa>Vr-4S{3)Mt3URr3CcN^`39r*Oj$<5Jp(nU8t^x~(FegXtF zA7ViFL53J6%m|~5363+NdDkCQlS~m|ni*!9WB%8_z@pYIvCIllR#{_RaHGT@Bd&Fu zY_To1Lrl5b7kYvuyQ0}+U+{oKt#|*ousD)yag3!>*x2esD;)PJXPnE-=7LMoWVqt` vk3Y)|Ir37s+;PtXk31Fq&%E$TR@gV*`QVc;zKecm2XjmUCIOQ`ITH8*HG>;N literal 2048 zcmeIuS5I6)3_#&;Vd=g177{}5z1Jj!un;;V^xpsf8&@kpyT5=3t}RQ}%p6;D2;(yw zh)9ttDowf!nX+Wdkt_0^dGZw~RHRsm(%`%-L0Ck&3YDr~qNUgUZ-4mV zr(c%+w&G84x0=Mq#HYr{r#GhxD(Z98`D*>_+qy6;~S|KFh_$3dPrb>`fK e%LM+)wHvqY+oZ*&9^= diff --git a/graphics/expansion_intro/rhh_credits.png b/graphics/expansion_intro/rhh_credits.png index 177022a9d607fee02efd627816b253b4fa37481a..02e1dd3b6e871eec5fa91898acff1c787af20a39 100644 GIT binary patch delta 890 zcmV-=1BLvj4Xh2YKm&hQNk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cP|zl>svVxV75>zUPgY z^W_1$*$;nGyw|ZFv9}&Ek@*qP_DhPKFApF?yabS_1Qbd}e+obx&Oo|OEav<+T%#`o z1Z(IGr+5hxgO2TA1Ypy?1h8_QJPFWl4qz&&AhD5(>L~yc#W_9LKv+X5KFHanVm?*} zz&X{Y0dSq^wwD3m_CuZrfUhFX@d^N()7cJu0$_iEpDu6;%pu*9!WY{?@fh*t06t}Z z06z|38%x2hV1If$fGb2_-NV@10WKGOx|$8e{&X=0hgWdD9l-ra1ius6SNBjq15g6N z_y3;?ejk89O$aMca9US*Ymc3jf=78h2_94;gbo47%AiOUCBmT8O~w^8#RcgrQGD_V z@ThIs#pwP~m`=E$T=!63$0|q|4;4KpoZ!cG=`=#34a&sn!yQVm8y9f$Q9)TYM+J?A zlazaB(}?(almdi$tgdtWADvkdwyF?92j(dQsiM)(tKbjd(*XYfni7_^82nq%00000 LNkvXXu0mjfJt3GW diff --git a/src/expansion_intro.c b/src/expansion_intro.c index fa4d44601..8fdb7c1cb 100644 --- a/src/expansion_intro.c +++ b/src/expansion_intro.c @@ -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" @@ -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" @@ -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; } }