diff --git a/source/game/scenes/title.cpp b/source/game/scenes/title.cpp index cb38d8f..2e831df 100644 --- a/source/game/scenes/title.cpp +++ b/source/game/scenes/title.cpp @@ -652,19 +652,6 @@ auto Title::isKeyDuplicate(SDL_Scancode scancode, int current_step) -> bool { / } // Retorna el nombre de la accion para el paso actual -auto Title::getActionName(int step) -> std::string { // NOLINT(readability-convert-member-functions-to-static) - switch (step) { - case 0: - return "LEFT"; - case 1: - return "RIGHT"; - case 2: - return "JUMP"; - default: - return "UNKNOWN"; - } -} - // Aplica y guarda las teclas redefinidas void Title::applyKeyboardRemap() { // NOLINT(readability-convert-member-functions-to-static) // Guardar las nuevas teclas en Options::controls diff --git a/source/game/scenes/title.hpp b/source/game/scenes/title.hpp index 5fc1211..23ecde5 100644 --- a/source/game/scenes/title.hpp +++ b/source/game/scenes/title.hpp @@ -88,7 +88,6 @@ class Title : public Scene { auto isButtonDuplicate(int button, int current_step) -> bool; // Valida si un boton esta duplicado void applyKeyboardRemap(); // Aplica y guarda las teclas redefinidas void applyJoystickRemap(); // Aplica y guarda los botones del gamepad redefinidos - static auto getActionName(int step) -> std::string; // Retorna el nombre de la accion (LEFT/RIGHT/JUMP) static auto getButtonName(int button) -> std::string; // Retorna el nombre amigable del boton del gamepad void createCheevosTexture(); // Crea y rellena la surface para mostrar los logros void resetCheevosScroll(); // Resetea el scroll de la lista de logros diff --git a/source/game/ui/console_commands.cpp b/source/game/ui/console_commands.cpp index d9d7b67..745f39a 100644 --- a/source/game/ui/console_commands.cpp +++ b/source/game/ui/console_commands.cpp @@ -836,13 +836,12 @@ static auto cmdCheat(const std::vector& args) -> std::string { // if (args.size() < 2 || args[1] != "LIVES") { return "usage: cheat infinite lives [on|off]"; } auto& cheat = Options::cheats.infinite_lives; using State = Options::Cheat::State; - const std::vector REST(args.begin() + 2, args.end()); - if (REST.empty()) { + if (args.size() == 2) { cheat = (cheat == State::ENABLED) ? State::DISABLED : State::ENABLED; - } else if (REST[0] == "ON") { + } else if (args[2] == "ON") { if (cheat == State::ENABLED) { return "Infinite lives already ON"; } cheat = State::ENABLED; - } else if (REST[0] == "OFF") { + } else if (args[2] == "OFF") { if (cheat == State::DISABLED) { return "Infinite lives already OFF"; } cheat = State::DISABLED; } else {