Afegit custom fadeout de so sincronitzat amb el fadeout de video per a quan acaba la partida
This commit is contained in:
@@ -35,7 +35,8 @@
|
||||
#include "tabe.h" // Para Tabe
|
||||
#include "text.h" // Para Text
|
||||
#include "texture.h" // Para Texture
|
||||
struct JA_Sound_t; // lines 37-37
|
||||
#include <iostream>
|
||||
struct JA_Sound_t; // lines 37-37
|
||||
|
||||
// Constructor
|
||||
Game::Game(int player_id, int current_stage, bool demo)
|
||||
@@ -319,6 +320,12 @@ void Game::updateGameStateGameOver()
|
||||
}
|
||||
}
|
||||
|
||||
if (fade_out_->isEnabled())
|
||||
{
|
||||
const float vol = static_cast<float>(64 * (100 - fade_out_->getValue())) / 100.0f;
|
||||
JA_SetSoundVolume(to_JA_volume(static_cast<int>(vol)));
|
||||
}
|
||||
|
||||
if (fade_out_->hasEnded())
|
||||
{
|
||||
if (game_completed_counter_ > 0)
|
||||
@@ -331,6 +338,8 @@ void Game::updateGameStateGameOver()
|
||||
// La partida ha terminado con la derrota de los jugadores
|
||||
section::name = section::Name::HI_SCORE_TABLE;
|
||||
}
|
||||
JA_StopChannel(-1);
|
||||
JA_SetSoundVolume(to_JA_volume(options.audio.sound.volume));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user