neteja tidy: ranges::fill, default member init, NOLINT _USE_MATH_DEFINES
This commit is contained in:
@@ -259,7 +259,7 @@ namespace Ja {
|
|||||||
sdl_audio_device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &audio_spec);
|
sdl_audio_device = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &audio_spec);
|
||||||
if (sdl_audio_device == 0) { std::cout << "Failed to initialize SDL audio!" << '\n'; }
|
if (sdl_audio_device == 0) { std::cout << "Failed to initialize SDL audio!" << '\n'; }
|
||||||
for (auto& ch : channels) { ch.state = ChannelState::FREE; }
|
for (auto& ch : channels) { ch.state = ChannelState::FREE; }
|
||||||
std::fill(std::begin(sound_volume), std::end(sound_volume), 0.5F);
|
std::ranges::fill(sound_volume, 0.5F);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void quit() {
|
inline void quit() {
|
||||||
@@ -663,7 +663,7 @@ namespace Ja {
|
|||||||
const float V = SDL_clamp(volume, 0.0F, 1.0F);
|
const float V = SDL_clamp(volume, 0.0F, 1.0F);
|
||||||
|
|
||||||
if (group == -1) {
|
if (group == -1) {
|
||||||
std::fill(std::begin(sound_volume), std::end(sound_volume), V);
|
std::ranges::fill(sound_volume, V);
|
||||||
} else if (group >= 0 && group < MAX_GROUPS) {
|
} else if (group >= 0 && group < MAX_GROUPS) {
|
||||||
sound_volume[group] = V;
|
sound_volume[group] = V;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// NOLINTNEXTLINE(bugprone-reserved-identifier) -- requerido por <cmath> para exponer M_PI en MSVC
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
#include "core/rendering/background.hpp"
|
#include "core/rendering/background.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -17,16 +17,13 @@
|
|||||||
#ifndef NO_SHADERS
|
#ifndef NO_SHADERS
|
||||||
#include "core/rendering/sdl3gpu/sdl3gpu_shader.hpp" // Para SDL3GPUShader
|
#include "core/rendering/sdl3gpu/sdl3gpu_shader.hpp" // Para SDL3GPUShader
|
||||||
#endif
|
#endif
|
||||||
#include "core/rendering/text.hpp" // Para Text
|
#include "core/rendering/text.hpp" // Para Text
|
||||||
#include "core/rendering/texture.hpp" // Para Texture
|
#include "core/rendering/texture.hpp" // Para Texture
|
||||||
#include "core/resources/asset.hpp" // Para Asset
|
#include "core/resources/asset.hpp" // Para Asset
|
||||||
#include "core/resources/resource.hpp" // Para Resource
|
#include "game/options.hpp" // Para Video, video, Window, window
|
||||||
#include "core/system/director.hpp" // Para Director::debug_config
|
#include "game/ui/notifier.hpp" // Para Notifier
|
||||||
#include "game/options.hpp" // Para Video, video, Window, window
|
#include "game/ui/service_menu.hpp" // Para ServiceMenu
|
||||||
#include "game/ui/notifier.hpp" // Para Notifier
|
#include "utils/param.hpp" // Para Param, param, ParamGame, ParamDebug
|
||||||
#include "game/ui/service_menu.hpp" // Para ServiceMenu
|
|
||||||
#include "utils/param.hpp" // Para Param, param, ParamGame, ParamDebug
|
|
||||||
#include "utils/utils.hpp" // Para toLower
|
|
||||||
|
|
||||||
// Singleton
|
// Singleton
|
||||||
Screen* Screen::instance = nullptr;
|
Screen* Screen::instance = nullptr;
|
||||||
@@ -82,12 +79,7 @@ auto Screen::get() -> Screen* { return Screen::instance; }
|
|||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
Screen::Screen()
|
Screen::Screen()
|
||||||
: window_(nullptr),
|
: src_rect_(SDL_FRect{.x = 0, .y = 0, .w = param.game.width, .h = param.game.height}),
|
||||||
renderer_(nullptr),
|
|
||||||
game_canvas_(nullptr),
|
|
||||||
service_menu_(nullptr),
|
|
||||||
notifier_(nullptr),
|
|
||||||
src_rect_(SDL_FRect{.x = 0, .y = 0, .w = param.game.width, .h = param.game.height}),
|
|
||||||
dst_rect_(SDL_FRect{.x = 0, .y = 0, .w = param.game.width, .h = param.game.height}) {
|
dst_rect_(SDL_FRect{.x = 0, .y = 0, .w = param.game.width, .h = param.game.height}) {
|
||||||
// Arranca SDL VIDEO, crea la ventana y el renderizador
|
// Arranca SDL VIDEO, crea la ventana y el renderizador
|
||||||
initSDLVideo();
|
initSDLVideo();
|
||||||
|
|||||||
@@ -214,11 +214,11 @@ class Screen {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// --- Objetos y punteros ---
|
// --- Objetos y punteros ---
|
||||||
SDL_Window* window_; // Ventana de la aplicación
|
SDL_Window* window_ = nullptr; // Ventana de la aplicación
|
||||||
SDL_Renderer* renderer_; // El renderizador de la ventana
|
SDL_Renderer* renderer_ = nullptr; // El renderizador de la ventana
|
||||||
SDL_Texture* game_canvas_; // Textura donde se dibuja todo antes de volcarse al renderizador
|
SDL_Texture* game_canvas_ = nullptr; // Textura donde se dibuja todo antes de volcarse al renderizador
|
||||||
ServiceMenu* service_menu_; // Objeto para mostrar el menú de servicio
|
ServiceMenu* service_menu_ = nullptr; // Objeto para mostrar el menú de servicio
|
||||||
Notifier* notifier_; // Objeto para mostrar las notificaciones por pantalla
|
Notifier* notifier_ = nullptr; // Objeto para mostrar las notificaciones por pantalla
|
||||||
std::shared_ptr<Text> text_; // Objeto para escribir texto en pantalla
|
std::shared_ptr<Text> text_; // Objeto para escribir texto en pantalla
|
||||||
std::unique_ptr<Rendering::ShaderBackend> shader_backend_; // Backend de shaders (SDL3GPU)
|
std::unique_ptr<Rendering::ShaderBackend> shader_backend_; // Backend de shaders (SDL3GPU)
|
||||||
|
|
||||||
@@ -236,20 +236,20 @@ class Screen {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// --- Métodos internos ---
|
// --- Métodos internos ---
|
||||||
auto initSDLVideo() -> bool; // Arranca SDL VIDEO y crea la ventana
|
auto initSDLVideo() -> bool; // Arranca SDL VIDEO y crea la ventana
|
||||||
void registerEmscriptenEventCallbacks(); // Registra callbacks nativos para restaurar el canvas en wasm (no-op fuera de emscripten)
|
void registerEmscriptenEventCallbacks(); // Registra callbacks nativos para restaurar el canvas en wasm (no-op fuera de emscripten)
|
||||||
void renderFlash(); // Dibuja el efecto de flash en la pantalla
|
void renderFlash(); // Dibuja el efecto de flash en la pantalla
|
||||||
void renderShake(); // Aplica el efecto de agitar la pantalla
|
void renderShake(); // Aplica el efecto de agitar la pantalla
|
||||||
void renderInfo() const; // Muestra información por pantalla
|
void renderInfo() const; // Muestra información por pantalla
|
||||||
[[nodiscard]] auto buildDebugInfoText() const -> std::string; // Compone fps + driver + shader/preset para renderInfo
|
[[nodiscard]] auto buildDebugInfoText() const -> std::string; // Compone fps + driver + shader/preset para renderInfo
|
||||||
void renderPresent(); // Selecciona y ejecuta el método de renderizado adecuado
|
void renderPresent(); // Selecciona y ejecuta el método de renderizado adecuado
|
||||||
void applyCurrentPostFXPreset(); // Aplica el preset PostFX activo al backend
|
void applyCurrentPostFXPreset(); // Aplica el preset PostFX activo al backend
|
||||||
void applyCurrentCrtPiPreset(); // Aplica el preset CrtPi activo al backend
|
void applyCurrentCrtPiPreset(); // Aplica el preset CrtPi activo al backend
|
||||||
void adjustWindowSize(); // Calcula el tamaño de la ventana
|
void adjustWindowSize(); // Calcula el tamaño de la ventana
|
||||||
void getDisplayInfo(); // Obtiene información sobre la pantalla
|
void getDisplayInfo(); // Obtiene información sobre la pantalla
|
||||||
void renderOverlays(); // Renderiza todos los overlays y efectos
|
void renderOverlays(); // Renderiza todos los overlays y efectos
|
||||||
void renderAttenuate(); // Atenúa la pantalla
|
void renderAttenuate(); // Atenúa la pantalla
|
||||||
void createText(); // Crea el objeto de texto
|
void createText(); // Crea el objeto de texto
|
||||||
|
|
||||||
// --- Constructores y destructor privados (singleton) ---
|
// --- Constructores y destructor privados (singleton) ---
|
||||||
Screen(); // Constructor privado
|
Screen(); // Constructor privado
|
||||||
|
|||||||
@@ -9,9 +9,7 @@
|
|||||||
|
|
||||||
std::unique_ptr<ResourceLoader> ResourceLoader::instance = nullptr;
|
std::unique_ptr<ResourceLoader> ResourceLoader::instance = nullptr;
|
||||||
|
|
||||||
ResourceLoader::ResourceLoader()
|
ResourceLoader::ResourceLoader() = default;
|
||||||
: resource_pack_(nullptr),
|
|
||||||
fallback_to_files_(true) {}
|
|
||||||
|
|
||||||
auto ResourceLoader::getInstance() -> ResourceLoader& {
|
auto ResourceLoader::getInstance() -> ResourceLoader& {
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ class ResourcePack;
|
|||||||
class ResourceLoader {
|
class ResourceLoader {
|
||||||
private:
|
private:
|
||||||
static std::unique_ptr<ResourceLoader> instance;
|
static std::unique_ptr<ResourceLoader> instance;
|
||||||
ResourcePack* resource_pack_;
|
ResourcePack* resource_pack_ = nullptr;
|
||||||
std::string pack_path_;
|
std::string pack_path_;
|
||||||
bool fallback_to_files_;
|
bool fallback_to_files_ = true;
|
||||||
|
|
||||||
ResourceLoader();
|
ResourceLoader();
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
|
|
||||||
const std::string ResourcePack::DEFAULT_ENCRYPT_KEY = "CCAE_RESOURCES__2024";
|
const std::string ResourcePack::DEFAULT_ENCRYPT_KEY = "CCAE_RESOURCES__2024";
|
||||||
|
|
||||||
ResourcePack::ResourcePack()
|
ResourcePack::ResourcePack() = default;
|
||||||
: loaded_(false) {}
|
|
||||||
|
|
||||||
ResourcePack::~ResourcePack() {
|
ResourcePack::~ResourcePack() {
|
||||||
clear();
|
clear();
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ResourcePack {
|
|||||||
private:
|
private:
|
||||||
std::unordered_map<std::string, ResourceEntry> resources_;
|
std::unordered_map<std::string, ResourceEntry> resources_;
|
||||||
std::vector<uint8_t> data_;
|
std::vector<uint8_t> data_;
|
||||||
bool loaded_;
|
bool loaded_ = false;
|
||||||
|
|
||||||
static auto calculateChecksum(const std::vector<uint8_t>& data) -> uint32_t;
|
static auto calculateChecksum(const std::vector<uint8_t>& data) -> uint32_t;
|
||||||
static void encryptData(std::vector<uint8_t>& data, const std::string& key);
|
static void encryptData(std::vector<uint8_t>& data, const std::string& key);
|
||||||
|
|||||||
@@ -9,19 +9,13 @@
|
|||||||
|
|
||||||
// Implementación de StageData
|
// Implementación de StageData
|
||||||
StageData::StageData(int power_to_complete, int min_menace, int max_menace, std::string name)
|
StageData::StageData(int power_to_complete, int min_menace, int max_menace, std::string name)
|
||||||
: status_(StageStatus::LOCKED),
|
: name_(std::move(name)),
|
||||||
name_(std::move(name)),
|
|
||||||
power_to_complete_(power_to_complete),
|
power_to_complete_(power_to_complete),
|
||||||
min_menace_(min_menace),
|
min_menace_(min_menace),
|
||||||
max_menace_(max_menace) {}
|
max_menace_(max_menace) {}
|
||||||
|
|
||||||
// Implementación de StageManager
|
// Implementación de StageManager
|
||||||
StageManager::StageManager()
|
StageManager::StageManager() { initialize(); }
|
||||||
: power_change_callback_(nullptr),
|
|
||||||
power_collection_state_(PowerCollectionState::ENABLED),
|
|
||||||
current_stage_index_(0),
|
|
||||||
current_power_(0),
|
|
||||||
total_power_(0) { initialize(); }
|
|
||||||
|
|
||||||
void StageManager::initialize() {
|
void StageManager::initialize() {
|
||||||
stages_.clear();
|
stages_.clear();
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ class StageData {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// --- Variables de estado ---
|
// --- Variables de estado ---
|
||||||
StageStatus status_; // Estado actual de la fase
|
StageStatus status_ = StageStatus::LOCKED; // Estado actual de la fase
|
||||||
std::string name_; // Nombre de la fase
|
std::string name_; // Nombre de la fase
|
||||||
int power_to_complete_; // Poder necesario para completar la fase
|
int power_to_complete_; // Poder necesario para completar la fase
|
||||||
int min_menace_; // Nivel mínimo de amenaza
|
int min_menace_; // Nivel mínimo de amenaza
|
||||||
int max_menace_; // Nivel máximo de amenaza
|
int max_menace_; // Nivel máximo de amenaza
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- Clase StageManager: gestor principal del sistema de fases del juego ---
|
// --- Clase StageManager: gestor principal del sistema de fases del juego ---
|
||||||
@@ -100,12 +100,12 @@ class StageManager : public IStageInfo {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// --- Variables de estado ---
|
// --- Variables de estado ---
|
||||||
std::vector<StageData> stages_; // Lista de todas las fases
|
std::vector<StageData> stages_; // Lista de todas las fases
|
||||||
PowerChangeCallback power_change_callback_; // Callback para notificar cambios de poder
|
PowerChangeCallback power_change_callback_; // Callback para notificar cambios de poder
|
||||||
PowerCollectionState power_collection_state_; // Estado de recolección de poder
|
PowerCollectionState power_collection_state_ = PowerCollectionState::ENABLED; // Estado de recolección de poder
|
||||||
size_t current_stage_index_; // Índice de la fase actual
|
size_t current_stage_index_ = 0; // Índice de la fase actual
|
||||||
int current_power_; // Poder actual en la fase activa
|
int current_power_ = 0; // Poder actual en la fase activa
|
||||||
int total_power_; // Poder total acumulado en todo el juego
|
int total_power_ = 0; // Poder total acumulado en todo el juego
|
||||||
|
|
||||||
// --- Métodos internos ---
|
// --- Métodos internos ---
|
||||||
void createDefaultStages(); // Crea las fases predeterminadas del juego
|
void createDefaultStages(); // Crea las fases predeterminadas del juego
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ HiScoreTable::HiScoreTable()
|
|||||||
background_(std::make_unique<Background>()),
|
background_(std::make_unique<Background>()),
|
||||||
|
|
||||||
view_area_(SDL_FRect{.x = 0, .y = 0, .w = param.game.width, .h = param.game.height}),
|
view_area_(SDL_FRect{.x = 0, .y = 0, .w = param.game.width, .h = param.game.height}),
|
||||||
fade_mode_(Fade::Mode::IN),
|
|
||||||
background_fade_color_(Color(0, 0, 0)) {
|
background_fade_color_(Color(0, 0, 0)) {
|
||||||
// Inicializa el resto
|
// Inicializa el resto
|
||||||
Section::name = Section::Name::HI_SCORE_TABLE;
|
Section::name = Section::Name::HI_SCORE_TABLE;
|
||||||
|
|||||||
@@ -55,12 +55,12 @@ class HiScoreTable {
|
|||||||
std::vector<Path> paths_; // Vector con los recorridos precalculados
|
std::vector<Path> paths_; // Vector con los recorridos precalculados
|
||||||
|
|
||||||
// --- Variables ---
|
// --- Variables ---
|
||||||
float elapsed_time_ = 0.0F; // Tiempo transcurrido (segundos)
|
float elapsed_time_ = 0.0F; // Tiempo transcurrido (segundos)
|
||||||
Uint64 last_time_ = 0; // Último timestamp para calcular delta-time
|
Uint64 last_time_ = 0; // Último timestamp para calcular delta-time
|
||||||
SDL_FRect view_area_; // Parte de la textura que se muestra en pantalla
|
SDL_FRect view_area_; // Parte de la textura que se muestra en pantalla
|
||||||
Fade::Mode fade_mode_; // Modo de fade a utilizar
|
Fade::Mode fade_mode_ = Fade::Mode::IN; // Modo de fade a utilizar
|
||||||
Color background_fade_color_; // Color de atenuación del fondo
|
Color background_fade_color_; // Color de atenuación del fondo
|
||||||
std::vector<Color> entry_colors_; // Colores para destacar las entradas en la tabla
|
std::vector<Color> entry_colors_; // Colores para destacar las entradas en la tabla
|
||||||
|
|
||||||
// --- Flags para eventos basados en tiempo ---
|
// --- Flags para eventos basados en tiempo ---
|
||||||
struct HiScoreFlags {
|
struct HiScoreFlags {
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ Title::Title()
|
|||||||
tiled_bg_(std::make_unique<TiledBG>(param.game.game_area.rect, TiledBGMode::RANDOM)),
|
tiled_bg_(std::make_unique<TiledBG>(param.game.game_area.rect, TiledBGMode::RANDOM)),
|
||||||
game_logo_(std::make_unique<GameLogo>(param.game.game_area.center_x, param.title.title_c_c_position)),
|
game_logo_(std::make_unique<GameLogo>(param.game.game_area.center_x, param.title.title_c_c_position)),
|
||||||
mini_logo_sprite_(std::make_unique<Sprite>(Resource::get()->getTexture("logo_jailgames_mini.png"))),
|
mini_logo_sprite_(std::make_unique<Sprite>(Resource::get()->getTexture("logo_jailgames_mini.png"))),
|
||||||
state_(State::LOGO_ANIMATING),
|
|
||||||
num_controllers_(Input::get()->getNumGamepads()) {
|
num_controllers_(Input::get()->getNumGamepads()) {
|
||||||
// Configura objetos
|
// Configura objetos
|
||||||
tiled_bg_->setColor(param.title.bg_color);
|
tiled_bg_->setColor(param.title.bg_color);
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class Title {
|
|||||||
Anchor anchor_; // Anclas para definir la posición de los elementos del título
|
Anchor anchor_; // Anclas para definir la posición de los elementos del título
|
||||||
Section::Name next_section_; // Siguiente sección a cargar
|
Section::Name next_section_; // Siguiente sección a cargar
|
||||||
Section::Options selection_ = Section::Options::TITLE_TIME_OUT; // Opción elegida en el título
|
Section::Options selection_ = Section::Options::TITLE_TIME_OUT; // Opción elegida en el título
|
||||||
State state_; // Estado actual de la sección
|
State state_ = State::LOGO_ANIMATING; // Estado actual de la sección
|
||||||
Uint64 last_time_ = 0; // Último timestamp para calcular delta-time
|
Uint64 last_time_ = 0; // Último timestamp para calcular delta-time
|
||||||
float counter_time_ = 0.0F; // Temporizador para la pantalla de título (en segundos)
|
float counter_time_ = 0.0F; // Temporizador para la pantalla de título (en segundos)
|
||||||
float blink_accumulator_ = 0.0F; // Acumulador para el parpadeo (en segundos)
|
float blink_accumulator_ = 0.0F; // Acumulador para el parpadeo (en segundos)
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ Notifier::Notifier(const std::string& icon_file, std::shared_ptr<Text> text)
|
|||||||
icon_texture_(!icon_file.empty() ? std::make_unique<Texture>(renderer_, icon_file) : nullptr),
|
icon_texture_(!icon_file.empty() ? std::make_unique<Texture>(renderer_, icon_file) : nullptr),
|
||||||
text_(std::move(text)),
|
text_(std::move(text)),
|
||||||
bg_color_(param.notification.color),
|
bg_color_(param.notification.color),
|
||||||
stack_(false),
|
|
||||||
has_icons_(!icon_file.empty()) {}
|
has_icons_(!icon_file.empty()) {}
|
||||||
|
|
||||||
// Dibuja las notificaciones por pantalla
|
// Dibuja las notificaciones por pantalla
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ class Notifier {
|
|||||||
std::vector<Notification> notifications_; // Lista de notificaciones activas
|
std::vector<Notification> notifications_; // Lista de notificaciones activas
|
||||||
Color bg_color_; // Color de fondo de las notificaciones
|
Color bg_color_; // Color de fondo de las notificaciones
|
||||||
// Nota: wait_time_ eliminado, ahora se usa STAY_DURATION_S
|
// Nota: wait_time_ eliminado, ahora se usa STAY_DURATION_S
|
||||||
bool stack_; // Indica si las notificaciones se apilan
|
bool stack_ = false; // Indica si las notificaciones se apilan
|
||||||
bool has_icons_; // Indica si el notificador tiene textura para iconos
|
bool has_icons_; // Indica si el notificador tiene textura para iconos
|
||||||
|
|
||||||
// --- Métodos internos ---
|
// --- Métodos internos ---
|
||||||
void clearFinishedNotifications(); // Elimina las notificaciones cuyo estado es FINISHED
|
void clearFinishedNotifications(); // Elimina las notificaciones cuyo estado es FINISHED
|
||||||
|
|||||||
@@ -28,9 +28,7 @@ void ServiceMenu::destroy() { delete ServiceMenu::instance; }
|
|||||||
auto ServiceMenu::get() -> ServiceMenu* { return ServiceMenu::instance; }
|
auto ServiceMenu::get() -> ServiceMenu* { return ServiceMenu::instance; }
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
ServiceMenu::ServiceMenu()
|
ServiceMenu::ServiceMenu() {
|
||||||
: current_settings_group_(SettingsGroup::MAIN),
|
|
||||||
previous_settings_group_(current_settings_group_) {
|
|
||||||
auto element_text = Resource::get()->getText("04b_25_flat");
|
auto element_text = Resource::get()->getText("04b_25_flat");
|
||||||
auto title_text = Resource::get()->getText("04b_25_flat_2x");
|
auto title_text = Resource::get()->getText("04b_25_flat_2x");
|
||||||
|
|
||||||
|
|||||||
@@ -88,8 +88,8 @@ class ServiceMenu {
|
|||||||
std::vector<std::unique_ptr<MenuOption>> options_;
|
std::vector<std::unique_ptr<MenuOption>> options_;
|
||||||
std::vector<MenuOption*> display_options_;
|
std::vector<MenuOption*> display_options_;
|
||||||
std::vector<std::pair<std::string, std::string>> option_pairs_;
|
std::vector<std::pair<std::string, std::string>> option_pairs_;
|
||||||
SettingsGroup current_settings_group_;
|
SettingsGroup current_settings_group_ = SettingsGroup::MAIN;
|
||||||
SettingsGroup previous_settings_group_;
|
SettingsGroup previous_settings_group_ = SettingsGroup::MAIN;
|
||||||
std::string title_;
|
std::string title_;
|
||||||
size_t selected_ = 0;
|
size_t selected_ = 0;
|
||||||
size_t main_menu_selected_ = 0;
|
size_t main_menu_selected_ = 0;
|
||||||
@@ -103,15 +103,15 @@ class ServiceMenu {
|
|||||||
void updateDisplayOptions();
|
void updateDisplayOptions();
|
||||||
void updateOptionPairs();
|
void updateOptionPairs();
|
||||||
void initializeOptions();
|
void initializeOptions();
|
||||||
void addControlsOptions(); // CONTROLS: mandos 1/2, teclat, swap
|
void addControlsOptions(); // CONTROLS: mandos 1/2, teclat, swap
|
||||||
void addVideoOptions(); // VIDEO: orquestra els blocs de vídeo
|
void addVideoOptions(); // VIDEO: orquestra els blocs de vídeo
|
||||||
void addVideoShaderOption(); // VIDEO: tria de shader (Disabled/PostFX/CrtPi)
|
void addVideoShaderOption(); // VIDEO: tria de shader (Disabled/PostFX/CrtPi)
|
||||||
void addVideoPresetOption(); // VIDEO: cicla presets del shader actiu
|
void addVideoPresetOption(); // VIDEO: cicla presets del shader actiu
|
||||||
void addVideoFilterOption(); // VIDEO: filtre Nearest/Linear (fallback SDL)
|
void addVideoFilterOption(); // VIDEO: filtre Nearest/Linear (fallback SDL)
|
||||||
void addAudioOptions(); // AUDIO: enabled + tres volums
|
void addAudioOptions(); // AUDIO: enabled + tres volums
|
||||||
void addSettingsOptions(); // SETTINGS: autofire, idioma, dificultat, shutdown
|
void addSettingsOptions(); // SETTINGS: autofire, idioma, dificultat, shutdown
|
||||||
void addSystemOptions(); // SYSTEM: reset, quit, shutdown
|
void addSystemOptions(); // SYSTEM: reset, quit, shutdown
|
||||||
void addMainMenuOptions(); // MAIN: carpetes de menú
|
void addMainMenuOptions(); // MAIN: carpetes de menú
|
||||||
void updateMenu();
|
void updateMenu();
|
||||||
void applySettings();
|
void applySettings();
|
||||||
void applyControlsSettings();
|
void applyControlsSettings();
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// NOLINTNEXTLINE(bugprone-reserved-identifier) -- requerido por <cmath> para exponer M_PI en MSVC
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
#include "utils/color.hpp"
|
#include "utils/color.hpp"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user