- [FIX] [#2] Quan et donen una cat's life, ja no torna la música del joc

- [FIX] [#3] Quan entres a la habitació de la depuradora ...
- [FIX] [#4] ficar anbernics recopilades en el game over i altres pantalles de resum
- [FIX] [#5] que al acabar el joc la seuquencia acabe amb els stats, com el game over
This commit is contained in:
2024-10-31 12:08:10 +01:00
parent a8892f4f8c
commit 0ab4ca06e3
5 changed files with 41 additions and 22 deletions

View File

@@ -21,6 +21,7 @@ namespace modules
void init(bool go_direct_to_credits)
{
audio::stopAllChannel();
stage = go_direct_to_credits ? 2 : 0;
time = SDL_GetTicks();
if (go_direct_to_credits) time += 5000;
@@ -55,7 +56,7 @@ namespace modules
const bool shouldGoToNext()
{
if (SDL_GetTicks()-time < 1000) return false;
return (SDL_GetTicks()-time > (stage==15||stage==16?10000:5000)) ||
return ( (stage<16) && (SDL_GetTicks()-time > (stage==15?10000:5000)) ) ||
(controller::pressed(KEY_JUMP)) || (controller::pressed(KEY_PICK)) ||
(input::keyPressed(SDL_SCANCODE_SPACE)) || (input::keyPressed(SDL_SCANCODE_RETURN));
}
@@ -147,13 +148,19 @@ namespace modules
draw::print2("GRACIES PER JUGAR!", 11, 9, PURPLE, FONT_ZOOM_VERTICAL);
draw::print2(actor::stats::getRoomsVisited(), 2, 8, 14, TEAL, FONT_ZOOM_NONE);
draw::print2("HABITACIONS VISITADES", 11, 14, GREEN, FONT_ZOOM_NONE);
draw::print2("HABITACIONS VISITADES", 13, 14, GREEN, FONT_ZOOM_NONE);
draw::print2(actor::stats::getLivesLost(), 2, 11, 16, TEAL, FONT_ZOOM_NONE);
draw::print2("VIDES PERDUDES", 14, 16, GREEN, FONT_ZOOM_NONE);
draw::print2(actor::stats::getLivesLost(), 2, 8, 16, TEAL, FONT_ZOOM_NONE);
draw::print2("VIDES PERDUDES", 13, 16, GREEN, FONT_ZOOM_NONE);
draw::print2(time_text, 11, 18, TEAL, FONT_ZOOM_NONE);
draw::print2("TEMPS TOTAL", 18, 18, GREEN, FONT_ZOOM_NONE);
draw::print2(time_text, 4, 18, TEAL, FONT_ZOOM_NONE);
draw::print2("TEMPS TOTAL", 13, 18, GREEN, FONT_ZOOM_NONE);
if (actor::hero::getNumAmbernicsCollected()>0)
{
draw::print2(actor::hero::getNumAmbernicsCollected(), 2, 8, 20, TEAL, FONT_ZOOM_NONE);
draw::print2("ANBERNICS ARREPLEGADES", 13, 20, GREEN, FONT_ZOOM_NONE);
}
break;