diff --git a/data/config/param_320x240.txt b/data/config/param_320x240.txt index c3b0592..c0c06f1 100644 --- a/data/config/param_320x240.txt +++ b/data/config/param_320x240.txt @@ -14,7 +14,7 @@ fade.num_squares_height 120 fade.random_squares_delay 1 fade.random_squares_mult 500 fade.post_duration 80 -fade.venetian_size 16 +fade.venetian_size 12 ## SCOREBOARD scoreboard.x 0 diff --git a/source/game.cpp b/source/game.cpp index 2ffe603..9e214a0 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -100,16 +100,19 @@ Game::Game(int player_id, int current_stage, bool demo) Game::~Game() { - if (!demo_.enabled) + // MODO DEMO + if (demo_.enabled) + { + // Habilita los sonidos + JA_EnableSound(true); + } + // MODO JUEGO + else { // Guarda las puntuaciones en un fichero auto manager = std::make_unique(options.game.hi_score_table); manager->saveToFile(asset_->get("score.bin")); - } - else - { - // Habilita los sonidos - JA_EnableSound(true); + section::attract_mode = section::AttractMode::TITLE_TO_DEMO; } #ifdef RECORDING @@ -313,7 +316,6 @@ void Game::updateGameOverState() if (game_over_counter_ == GAME_OVER_COUNTER_) { createMessage({paths_.at(2), paths_.at(3)}, Resource::get()->getTexture("game_over")); - // stopMusic(); JA_FadeOutMusic(1000); balloon_manager_->setSounds(true); } @@ -850,7 +852,6 @@ void Game::killPlayer(std::shared_ptr &player) screen_->shake(); JA_PlaySound(Resource::get()->getSound("voice_no.wav")); player->setPlayingState(PlayerState::DYING); - // allPlayersAreNotPlaying() ? stopMusic() : resumeMusic(); } } @@ -991,7 +992,6 @@ void Game::disableTimeStopItem() void Game::checkMusicStatus() { // Si se ha completado el juego o los jugadores han terminado, detiene la música - // state_ == GameState::FADE_IN || state_ == GameState::COMPLETED || allPlayersAreGameOver() ? stopMusic() : playMusic(); if (state_ != GameState::COMPLETED && !allPlayersAreGameOver()) { playMusic(); @@ -1374,6 +1374,7 @@ void Game::handleDemoMode() if (input_->checkAnyButtonPressed()) { section::name = section::Name::TITLE; // Salir del modo demo y regresar al menú principal. + section::attract_mode = section::AttractMode::TITLE_TO_DEMO; // El juego volverá a mostrar la demo return; } ++index; diff --git a/source/hiscore_table.cpp b/source/hiscore_table.cpp index c6cc2b8..d849fb6 100644 --- a/source/hiscore_table.cpp +++ b/source/hiscore_table.cpp @@ -205,9 +205,10 @@ void HiScoreTable::checkInput() // Comprueba si se ha pulsado cualquier botón (de los usados para jugar) if (Input::get()->checkAnyButtonPressed()) { - JA_StopMusic(); + //JA_StopMusic(); section::name = section::Name::TITLE; section::options = section::Options::TITLE_1; + section::attract_mode = section::AttractMode::TITLE_TO_DEMO; return; } diff --git a/source/instructions.cpp b/source/instructions.cpp index b4baa73..ccd2a24 100644 --- a/source/instructions.cpp +++ b/source/instructions.cpp @@ -310,9 +310,10 @@ void Instructions::checkInput() // Comprueba si se ha pulsado cualquier botón (de los usados para jugar) if (Input::get()->checkAnyButtonPressed()) { - JA_StopMusic(); + //JA_StopMusic(); section::name = section::Name::TITLE; section::options = section::Options::TITLE_1; + section::attract_mode = section::AttractMode::TITLE_TO_DEMO; return; } diff --git a/source/logo.cpp b/source/logo.cpp index 06b7354..e93ca71 100644 --- a/source/logo.cpp +++ b/source/logo.cpp @@ -234,7 +234,8 @@ void Logo::render() void Logo::run() { // Detiene la música - JA_StopMusic(); + //JA_StopMusic(); + JA_FadeOutMusic(500); while (section::name == section::Name::LOGO) {