Options: renombrats els metodes

This commit is contained in:
2025-06-14 17:48:37 +02:00
parent c748070ba5
commit eee398802f
11 changed files with 84 additions and 84 deletions

View File

@@ -107,7 +107,7 @@ Game::~Game()
else
{
// [Modo JUEGO] Guarda puntuaciones y transita a modo título
auto manager = std::make_unique<ManageHiScoreTable>(Options::game.hi_score_table);
auto manager = std::make_unique<ManageHiScoreTable>(Options::settings.hi_score_table);
manager->saveToFile(Asset::get()->get("score.bin"));
Section::attract_mode = Section::AttractMode::TITLE_TO_DEMO;
Audio::get()->stopMusic();
@@ -1267,10 +1267,10 @@ void Game::pause(bool value)
void Game::addScoreToScoreBoard(const std::shared_ptr<Player> &player)
{
const auto entry = HiScoreEntry(trim(player->getRecordName()), player->getScore(), player->get1CC());
auto manager = std::make_unique<ManageHiScoreTable>(Options::game.hi_score_table);
Options::game.last_hi_score_entry.at(player->getId() - 1) = manager->add(entry);
auto manager = std::make_unique<ManageHiScoreTable>(Options::settings.hi_score_table);
Options::settings.last_hi_score_entry.at(player->getId() - 1) = manager->add(entry);
manager->saveToFile(Asset::get()->get("score.bin"));
hi_score_.name = Options::game.hi_score_table.front().name;
hi_score_.name = Options::settings.hi_score_table.front().name;
}
// Saca del estado de GAME OVER al jugador si el otro está activo
@@ -1443,7 +1443,7 @@ void Game::handleFireInput(const std::shared_ptr<Player> &player, BulletType bul
Audio::get()->playSound("bullet.wav");
// Establece un tiempo de espera para el próximo disparo.
const int cooldown = player->isPowerUp() ? 5 : Options::game.autofire ? 10
const int cooldown = player->isPowerUp() ? 5 : Options::settings.autofire ? 10
: 7;
player->setFireCooldown(cooldown);
}
@@ -1476,7 +1476,7 @@ void Game::handlePlayersInput()
void Game::handleNormalPlayerInput(const std::shared_ptr<Player> &player)
{
const auto &controller = Options::controllers.at(player->getController());
const bool autofire = player->isPowerUp() || Options::game.autofire;
const bool autofire = player->isPowerUp() || Options::settings.autofire;
if (input_->checkInput(InputAction::LEFT, INPUT_ALLOW_REPEAT, controller.type, controller.index))
{