step 1: mort_scene substituix doMort() amb la capa scenes::
This commit is contained in:
@@ -57,9 +57,7 @@ int ModuleSequence::Go() {
|
||||
case 8: // Credits
|
||||
doCredits();
|
||||
break;
|
||||
case 100: // Mort
|
||||
doMort();
|
||||
break;
|
||||
// case 100 (Mort) → migrat a scenes::MortScene, dispatch via SceneRegistry.
|
||||
}
|
||||
|
||||
JD8_FadeOut();
|
||||
@@ -1292,35 +1290,4 @@ void ModuleSequence::doCredits() {
|
||||
JD8_FreeSurface(vaddr2);
|
||||
}
|
||||
|
||||
void ModuleSequence::doMort() {
|
||||
play_music("00000001.ogg");
|
||||
|
||||
JI_DisableKeyboard(60);
|
||||
|
||||
info::ctx.vida = 5;
|
||||
this->contador = 1000;
|
||||
|
||||
JD8_Surface gfx = JD8_LoadSurface("gameover.gif");
|
||||
JD8_Palette pal = JD8_LoadPalette("gameover.gif");
|
||||
|
||||
JD8_ClearScreen(0);
|
||||
|
||||
JD8_Blit(gfx);
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
play_music("00000003.ogg");
|
||||
}
|
||||
// doMort() — migrat a scenes::MortScene (source/scenes/mort_scene.cpp)
|
||||
|
||||
@@ -20,7 +20,7 @@ class ModuleSequence {
|
||||
void doBanner();
|
||||
void doSecreta();
|
||||
void doCredits();
|
||||
void doMort();
|
||||
// doMort() → migrat a scenes::MortScene
|
||||
|
||||
int contador;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user