el indicador de trucos ja no es el color del jugador sino que es veu al marcador

This commit is contained in:
2026-04-01 22:12:52 +02:00
parent b37b62ef1e
commit 950eeffb07
14 changed files with 86 additions and 65 deletions

View File

@@ -2,24 +2,24 @@
#include <SDL3/SDL.h>
#include <algorithm> // Para ranges::transform, ranges::find
#include <array> // Para array
#include <iostream> // Para cout
#include <sstream> // Para ostringstream
#include <string> // Para string
#include <vector> // Para vector
#include <algorithm> // Para ranges::transform, ranges::find
#include <array> // Para array
#include <iostream> // Para cout
#include <sstream> // Para ostringstream
#include <string> // Para string
#include <vector> // Para vector
#include "core/audio/audio.hpp" // Para Audio
#include "core/locale/locale.hpp" // Para Locale
#include "core/rendering/render_info.hpp" // Para RenderInfo
#include "core/rendering/screen.hpp" // Para Screen
#include "core/audio/audio.hpp" // Para Audio
#include "core/locale/locale.hpp" // Para Locale
#include "core/rendering/render_info.hpp" // Para RenderInfo
#include "core/rendering/screen.hpp" // Para Screen
#include "core/resources/resource_helper.hpp" // Para Resource::Helper
#include "external/fkyaml_node.hpp" // Para fkyaml::node
#include "game/game_control.hpp" // Para GameControl
#include "game/options.hpp" // Para Options
#include "game/scene_manager.hpp" // Para SceneManager
#include "game/ui/notifier.hpp" // Para Notifier
#include "utils/utils.hpp" // Para toUpper, prettyName
#include "external/fkyaml_node.hpp" // Para fkyaml::node
#include "game/game_control.hpp" // Para GameControl
#include "game/options.hpp" // Para Options
#include "game/scene_manager.hpp" // Para SceneManager
#include "game/ui/notifier.hpp" // Para Notifier
#include "utils/utils.hpp" // Para toUpper, prettyName
#ifdef _DEBUG
#include "core/system/debug.hpp" // Para Debug
@@ -159,7 +159,11 @@ static auto applyPreset(const std::vector<std::string>& args) -> std::string {
}
}
if (IS_CRTPI) { Screen::get()->reloadCrtPi(); } else { Screen::get()->reloadPostFX(); }
if (IS_CRTPI) {
Screen::get()->reloadCrtPi();
} else {
Screen::get()->reloadPostFX();
}
return shader_label + " preset: " + presetName();
}
@@ -581,7 +585,6 @@ static auto cmd_cheat(const std::vector<std::string>& args) -> std::string {
} else {
return "usage: cheat infinite lives [on|off]";
}
if (GameControl::refresh_player_color) { GameControl::refresh_player_color(); }
return std::string("Infinite lives ") + (cheat == State::ENABLED ? "ON" : "OFF");
}
@@ -600,7 +603,6 @@ static auto cmd_cheat(const std::vector<std::string>& args) -> std::string {
} else {
return "usage: cheat invincibility [on|off]";
}
if (GameControl::refresh_player_color) { GameControl::refresh_player_color(); }
return std::string("Invincibility ") + (cheat == State::ENABLED ? "ON" : "OFF");
}
@@ -646,7 +648,9 @@ static auto cmd_player(const std::vector<std::string>& args) -> std::string {
// PLAYER COLOR <0-15>
if (args.size() >= 2 && args[0] == "COLOR") {
int color = -1;
try { color = std::stoi(args[1]); } catch (...) {}
try {
color = std::stoi(args[1]);
} catch (...) {}
if (color < 0 || color > 15) { return "usage: player color <0-15>|default"; }
if (!GameControl::change_player_color) { return "Game not initialized"; }
GameControl::change_player_color(color);
@@ -955,7 +959,8 @@ auto CommandRegistry::generateTerminalHelp() const -> std::string {
if (cmd.category != current_category) {
current_category = cmd.category;
out << '\n' << '[' << current_category << ']' << '\n';
out << '\n'
<< '[' << current_category << ']' << '\n';
}
// Formatear: usage alineado a la izquierda, descripción a la derecha