refactor jail_audio: namespace Ja, enum class, tipus sense prefix JA_

This commit is contained in:
2026-05-16 17:56:46 +02:00
parent 9f6d38cf48
commit be95b8afab
14 changed files with 741 additions and 832 deletions
+4 -2
View File
@@ -27,7 +27,9 @@
#include "game/entities/player.h" // for Player
#include "game/options.hpp" // for Options
#include "game/ui/menu.h" // for Menu
struct JA_Sound_t;
namespace Ja {
struct Sound;
} // namespace Ja
namespace {
// Constantes geométricas y temporales compartidas por los helpers de initEnemyFormations
@@ -1521,7 +1523,7 @@ void Game::updateDeath() {
// Hace sonar aleatoriamente uno de los 4 sonidos de burbujas
if (!demo_.enabled) {
const Uint8 INDEX = rand() % 4;
JA_Sound_t *sound[4] = {bubble1_sound_, bubble2_sound_, bubble3_sound_, bubble4_sound_};
Ja::Sound *sound[4] = {bubble1_sound_, bubble2_sound_, bubble3_sound_, bubble4_sound_};
Audio::get()->playSound(sound[INDEX]);
}
}