step 2: banner_scene substituix doBanner() (piràmides 2-5) + helper playMusic compartit

This commit is contained in:
2026-04-15 23:13:05 +02:00
parent d86cb21efa
commit 2cb38ffb49
9 changed files with 158 additions and 70 deletions

View File

@@ -45,12 +45,7 @@ int ModuleSequence::Go() {
case 7:
doSlides();
break;
case 2: // Pre-pir<EFBFBD>mide
case 3:
case 4:
case 5:
doBanner();
break;
// case 2..5 (Pre-piràmide) → migrat a scenes::BannerScene.
case 6: // Pre-Secreta
doSecreta();
break;
@@ -1092,50 +1087,7 @@ void ModuleSequence::doSlides() {
free(pal_aux);
}
void ModuleSequence::doBanner() {
play_music("00000004.ogg");
this->contador = 5000;
JD8_Surface gfx = JD8_LoadSurface("ffase.gif");
JD8_Palette pal = JD8_LoadPalette("ffase.gif");
JD8_ClearScreen(0);
JD8_Blit(81, 24, gfx, 81, 155, 168, 21);
JD8_Blit(39, 150, gfx, 39, 175, 248, 20);
switch (info::ctx.num_piramide) {
case 2:
JD8_Blit(82, 60, gfx, 0, 0, 160, 75);
break;
case 3:
JD8_Blit(82, 60, gfx, 160, 0, 160, 75);
break;
case 4:
JD8_Blit(82, 60, gfx, 0, 75, 160, 75);
break;
case 5:
JD8_Blit(82, 60, gfx, 160, 75, 160, 75);
break;
}
JD8_FadeToPal(pal);
bool exit = false;
while (!exit && !JG_Quitting()) {
if (JG_ShouldUpdate()) {
JI_Update();
if (JI_AnyKey()) {
exit = true;
}
contador--;
if (contador == 0) exit = true;
}
}
JA_FadeOutMusic(250);
}
// doBanner() — migrat a scenes::BannerScene (source/scenes/banner_scene.cpp)
void ModuleSequence::doSecreta() {
play_music("00000002.ogg");