refactor de noms de resources en data/

This commit is contained in:
2025-11-26 13:57:25 +01:00
parent 61c6b9087c
commit 78a0200856
11 changed files with 9 additions and 14 deletions

View File

@@ -182,8 +182,6 @@ auto Director::checkProgramArguments(std::vector<std::string> const& args) -> st
Options::cheats.infinite_lives = Options::Cheat::State::ENABLED;
} else if (argument == "--invincible") {
Options::cheats.invincible = Options::Cheat::State::ENABLED;
} else if (argument == "--altSkin") {
Options::cheats.alternate_skin = Options::Cheat::State::ENABLED;
}
}

View File

@@ -73,7 +73,6 @@ constexpr const char* NOTIFY = "notify.wav"; // Sonido de notificación
namespace Cheat {
constexpr bool INFINITE_LIVES = false; // Vidas infinitas desactivadas por defecto
constexpr bool INVINCIBLE = false; // Invencibilidad desactivada por defecto
constexpr bool ALTERNATE_SKIN = false; // Skin alternativa desactivada por defecto
} // namespace Cheat
// --- CONTROLS ---

View File

@@ -21,8 +21,7 @@ Scoreboard::Scoreboard(std::shared_ptr<Data> data)
constexpr float SURFACE_HEIGHT = ScoreboardArea::HEIGHT;
// Reserva memoria para los objetos
const auto& player_animation_data = Resource::Cache::get()->getAnimationData(Options::cheats.alternate_skin == Options::Cheat::State::ENABLED ? "player2.yaml" : "player.yaml");
player_sprite_ = std::make_shared<SurfaceAnimatedSprite>(player_animation_data);
player_sprite_ = std::make_shared<SurfaceAnimatedSprite>(Resource::Cache::get()->getAnimationData("player_animations.yaml"));
player_sprite_->setCurrentAnimation("walk_menu");
surface_ = std::make_shared<Surface>(SURFACE_WIDTH, SURFACE_HEIGHT);

View File

@@ -38,7 +38,6 @@ struct Cheat {
State infinite_lives{Defaults::Cheat::INFINITE_LIVES ? State::ENABLED : State::DISABLED}; // Indica si el jugador dispone de vidas infinitas
State invincible{Defaults::Cheat::INVINCIBLE ? State::ENABLED : State::DISABLED}; // Indica si el jugador puede morir
State alternate_skin{Defaults::Cheat::ALTERNATE_SKIN ? State::ENABLED : State::DISABLED}; // Indica si se usa una skin diferente para el jugador
// Método para comprobar si alguno de los trucos está activo
[[nodiscard]] auto enabled() const -> bool {

View File

@@ -661,7 +661,7 @@ void Game::togglePause() {
// Inicializa al jugador
void Game::initPlayer(const Player::SpawnData& spawn_point, std::shared_ptr<Room> room) {
const Player::Data PLAYER{.spawn_data = spawn_point, .animations_path = "player.yaml", .room = std::move(room)};
const Player::Data PLAYER{.spawn_data = spawn_point, .animations_path = "player_animations.yaml", .room = std::move(room)};
player_ = std::make_shared<Player>(PLAYER);
}