arreglos en namespaces de defaults
This commit is contained in:
@@ -4,240 +4,209 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "color.hpp"
|
||||
#include "ui/notifier.hpp" // Para Notifier::Position
|
||||
#include "version.h" // Para Version::APP_NAME
|
||||
|
||||
// --- Namespace GameDefaults: configuración centralizada con valores por defecto del juego ---
|
||||
namespace GameDefaults {
|
||||
namespace Defaults::Game {
|
||||
constexpr float WIDTH = 320.0F;
|
||||
constexpr float HEIGHT = 256.0F;
|
||||
constexpr int NAME_ENTRY_IDLE_TIME = 10;
|
||||
constexpr int NAME_ENTRY_TOTAL_TIME = 60;
|
||||
constexpr bool HIT_STOP = false;
|
||||
constexpr int HIT_STOP_MS = 500;
|
||||
constexpr const char* ITEM_TEXT_OUTLINE_COLOR = "FFFFFF00";
|
||||
|
||||
// --- GAME ---
|
||||
namespace Game {
|
||||
constexpr float WIDTH = 320.0F;
|
||||
constexpr float HEIGHT = 256.0F;
|
||||
constexpr int NAME_ENTRY_IDLE_TIME = 10;
|
||||
constexpr int NAME_ENTRY_TOTAL_TIME = 60;
|
||||
constexpr bool HIT_STOP = false;
|
||||
constexpr int HIT_STOP_MS = 500;
|
||||
constexpr const char* ITEM_TEXT_OUTLINE_COLOR = "FFFFFF00"; // 255, 255, 255, 0
|
||||
constexpr float PLAY_AREA_X = 0.0F;
|
||||
constexpr float PLAY_AREA_Y = 0.0F;
|
||||
constexpr float PLAY_AREA_W = 320.0F;
|
||||
constexpr float PLAY_AREA_H = 216.0F;
|
||||
} // namespace Defaults::Game
|
||||
|
||||
// Play area por defecto
|
||||
constexpr float PLAY_AREA_X = 0.0F;
|
||||
constexpr float PLAY_AREA_Y = 0.0F;
|
||||
constexpr float PLAY_AREA_W = 320.0F;
|
||||
constexpr float PLAY_AREA_H = 216.0F;
|
||||
} // namespace Game
|
||||
namespace Defaults::Fade {
|
||||
constexpr const char* COLOR = "1F2B30";
|
||||
constexpr float NUM_SQUARES_WIDTH = 160.0F;
|
||||
constexpr float NUM_SQUARES_HEIGHT = 128.0F;
|
||||
constexpr int RANDOM_SQUARES_DURATION_MS = 1;
|
||||
constexpr int POST_DURATION_MS = 80;
|
||||
constexpr float VENETIAN_SIZE = 12.0F;
|
||||
} // namespace Defaults::Fade
|
||||
|
||||
// --- FADE ---
|
||||
namespace Fade {
|
||||
constexpr const char* COLOR = "1F2B30";
|
||||
constexpr float NUM_SQUARES_WIDTH = 160.0F;
|
||||
constexpr float NUM_SQUARES_HEIGHT = 128.0F;
|
||||
constexpr int RANDOM_SQUARES_DURATION_MS = 1;
|
||||
constexpr int POST_DURATION_MS = 80;
|
||||
constexpr float VENETIAN_SIZE = 12.0F;
|
||||
} // namespace Fade
|
||||
namespace Defaults::Scoreboard {
|
||||
constexpr float RECT_X = 0.0F;
|
||||
constexpr float RECT_Y = 216.0F;
|
||||
constexpr float RECT_W = 320.0F;
|
||||
constexpr float RECT_H = 40.0F;
|
||||
constexpr bool SEPARATOR_AUTOCOLOR = true;
|
||||
constexpr const char* SEPARATOR_COLOR = "0D1A2B";
|
||||
constexpr const char* EASY_COLOR = "4B692F";
|
||||
constexpr const char* NORMAL_COLOR = "2E3F47";
|
||||
constexpr const char* HARD_COLOR = "76428A";
|
||||
constexpr bool TEXT_AUTOCOLOR = true;
|
||||
constexpr const char* TEXT_COLOR1 = "FFFFFF";
|
||||
constexpr const char* TEXT_COLOR2 = "FFFFFF";
|
||||
constexpr int SKIP_COUNTDOWN_VALUE = 8;
|
||||
} // namespace Defaults::Scoreboard
|
||||
|
||||
// --- SCOREBOARD ---
|
||||
namespace Scoreboard {
|
||||
constexpr float RECT_X = 0.0F;
|
||||
constexpr float RECT_Y = 216.0F;
|
||||
constexpr float RECT_W = 320.0F;
|
||||
constexpr float RECT_H = 40.0F;
|
||||
constexpr bool SEPARATOR_AUTOCOLOR = true;
|
||||
constexpr const char* SEPARATOR_COLOR = "0D1A2B";
|
||||
constexpr const char* EASY_COLOR = "4B692F";
|
||||
constexpr const char* NORMAL_COLOR = "2E3F47";
|
||||
constexpr const char* HARD_COLOR = "76428A";
|
||||
constexpr bool TEXT_AUTOCOLOR = true;
|
||||
constexpr const char* TEXT_COLOR1 = "FFFFFF";
|
||||
constexpr const char* TEXT_COLOR2 = "FFFFFF";
|
||||
constexpr int SKIP_COUNTDOWN_VALUE = 8;
|
||||
} // namespace Scoreboard
|
||||
namespace Defaults::Title {
|
||||
constexpr int PRESS_START_POSITION = 180;
|
||||
constexpr float DURATION_S = 14.0F;
|
||||
constexpr int ARCADE_EDITION_POSITION = 123;
|
||||
constexpr int TITLE_C_C_POSITION = 80;
|
||||
constexpr const char* BG_COLOR = "41526F";
|
||||
} // namespace Defaults::Title
|
||||
|
||||
// --- TITLE ---
|
||||
namespace Title {
|
||||
constexpr int PRESS_START_POSITION = 180;
|
||||
constexpr float DURATION_S = 14.0F;
|
||||
constexpr int ARCADE_EDITION_POSITION = 123;
|
||||
constexpr int TITLE_C_C_POSITION = 80;
|
||||
constexpr const char* BG_COLOR = "41526F";
|
||||
} // namespace Title
|
||||
namespace Defaults::Background {
|
||||
constexpr const char* ATTENUATE_COLOR = "FFFFFF00";
|
||||
} // namespace Defaults::Background
|
||||
|
||||
// --- BACKGROUND ---
|
||||
namespace Background {
|
||||
constexpr const char* ATTENUATE_COLOR = "FFFFFF00";
|
||||
}
|
||||
namespace Defaults::Balloon {
|
||||
struct BalloonSettings {
|
||||
float vel;
|
||||
float grav;
|
||||
constexpr BalloonSettings(float v, float g)
|
||||
: vel(v),
|
||||
grav(g) {}
|
||||
};
|
||||
|
||||
// --- BALLOONS ---
|
||||
namespace Balloon {
|
||||
// Configuración de física para cada nivel de globo
|
||||
struct BalloonSettings {
|
||||
float vel;
|
||||
float grav;
|
||||
constexpr BalloonSettings(float v, float g)
|
||||
: vel(v),
|
||||
grav(g) {}
|
||||
};
|
||||
constexpr std::array<BalloonSettings, 4> SETTINGS = {{
|
||||
BalloonSettings(165.0F, 320.0F),
|
||||
BalloonSettings(222.0F, 360.0F),
|
||||
BalloonSettings(282.0F, 360.0F),
|
||||
BalloonSettings(327.0F, 360.0F),
|
||||
}};
|
||||
|
||||
// Valores para deltaTime en segundos: vel en pixels/s, grav en pixels/s² (aceleración)
|
||||
constexpr std::array<BalloonSettings, 4> SETTINGS = {{
|
||||
BalloonSettings(165.0F, 320.0F), // Globo 0: vel=165 pixels/s, grav=320 pixels/s²
|
||||
BalloonSettings(222.0F, 360.0F), // Globo 1: vel=222 pixels/s, grav=360 pixels/s²
|
||||
BalloonSettings(282.0F, 360.0F), // Globo 2: vel=282 pixels/s, grav=360 pixels/s²
|
||||
BalloonSettings(327.0F, 360.0F) // Globo 3: vel=327 pixels/s, grav=360 pixels/s²
|
||||
}};
|
||||
constexpr std::array<const char*, 4> COLORS = {
|
||||
"blue",
|
||||
"orange",
|
||||
"red",
|
||||
"green"};
|
||||
|
||||
constexpr std::array<const char*, 4> COLORS = {
|
||||
"blue",
|
||||
"orange",
|
||||
"red",
|
||||
"green"};
|
||||
constexpr bool BOUNCING_SOUND = false;
|
||||
} // namespace Defaults::Balloon
|
||||
|
||||
constexpr bool BOUNCING_SOUND = false;
|
||||
} // namespace Balloon
|
||||
namespace Defaults::Notification {
|
||||
constexpr Notifier::Position POS_V = Notifier::Position::TOP;
|
||||
constexpr Notifier::Position POS_H = Notifier::Position::LEFT;
|
||||
constexpr bool SOUND = false;
|
||||
constexpr const char* COLOR = "303030";
|
||||
} // namespace Defaults::Notification
|
||||
|
||||
// --- NOTIFICATION ---
|
||||
namespace Notification {
|
||||
constexpr Notifier::Position POS_V = Notifier::Position::TOP;
|
||||
constexpr Notifier::Position POS_H = Notifier::Position::LEFT;
|
||||
constexpr bool SOUND = false;
|
||||
constexpr const char* COLOR = "303030";
|
||||
} // namespace Notification
|
||||
namespace Defaults::ServiceMenu {
|
||||
constexpr const char* TITLE_COLOR = "99FF62";
|
||||
constexpr const char* TEXT_COLOR = "FFFFFF";
|
||||
constexpr const char* SELECTED_COLOR = "FFDC44";
|
||||
constexpr const char* BG_COLOR = "000F00F5";
|
||||
constexpr bool DROP_SHADOW = false;
|
||||
} // namespace Defaults::ServiceMenu
|
||||
|
||||
// --- SERVICE MENU ---
|
||||
namespace ServiceMenu {
|
||||
constexpr const char* TITLE_COLOR = "99FF62";
|
||||
constexpr const char* TEXT_COLOR = "FFFFFF";
|
||||
constexpr const char* SELECTED_COLOR = "FFDC44";
|
||||
constexpr const char* BG_COLOR = "000F00F5";
|
||||
constexpr bool DROP_SHADOW = false;
|
||||
namespace Defaults::ServiceMenu::WindowMessage {
|
||||
constexpr const char* BG_COLOR = "141E32F0";
|
||||
constexpr const char* BORDER_COLOR = "6496C8FF";
|
||||
constexpr const char* TITLE_COLOR = "6496C8FF";
|
||||
constexpr const char* TEXT_COLOR = "DCDCDCFF";
|
||||
constexpr float PADDING = 15.0F;
|
||||
constexpr float LINE_SPACING = 5.0F;
|
||||
constexpr float TITLE_SEPARATOR_SPACING = 10.0F;
|
||||
constexpr float MIN_WIDTH = 250.0F;
|
||||
constexpr float MIN_HEIGHT = 32.0F;
|
||||
constexpr float MAX_WIDTH_RATIO = 0.8F;
|
||||
constexpr float MAX_HEIGHT_RATIO = 0.8F;
|
||||
constexpr float TEXT_SAFETY_MARGIN = 15.0F;
|
||||
constexpr float ANIMATION_DURATION = 0.3F;
|
||||
} // namespace Defaults::ServiceMenu::WindowMessage
|
||||
|
||||
// WindowMessage defaults
|
||||
namespace WindowMessage {
|
||||
constexpr const char* BG_COLOR = "141E32F0"; // Color(20, 30, 50, 240)
|
||||
constexpr const char* BORDER_COLOR = "6496C8FF"; // Color(100, 150, 200, 255)
|
||||
constexpr const char* TITLE_COLOR = "6496C8FF"; // Color(100, 150, 200, 255)
|
||||
constexpr const char* TEXT_COLOR = "DCDCDCFF"; // Color(220, 220, 220, 255)
|
||||
constexpr float PADDING = 15.0F;
|
||||
constexpr float LINE_SPACING = 5.0F;
|
||||
constexpr float TITLE_SEPARATOR_SPACING = 10.0F; // Cambiado a float
|
||||
constexpr float MIN_WIDTH = 250.0F;
|
||||
constexpr float MIN_HEIGHT = 32.0F; // Cambiado a float
|
||||
constexpr float MAX_WIDTH_RATIO = 0.8F; // Nuevo
|
||||
constexpr float MAX_HEIGHT_RATIO = 0.8F; // Nuevo
|
||||
constexpr float TEXT_SAFETY_MARGIN = 15.0F;
|
||||
constexpr float ANIMATION_DURATION = 0.3F;
|
||||
} // namespace WindowMessage
|
||||
} // namespace ServiceMenu
|
||||
namespace Defaults::Intro {
|
||||
constexpr const char* BG_COLOR = "4664BD";
|
||||
constexpr const char* CARD_COLOR = "CBDBFC";
|
||||
constexpr const char* SHADOW_COLOR = "00000080";
|
||||
constexpr int TEXT_DISTANCE_FROM_BOTTOM = 48;
|
||||
} // namespace Defaults::Intro
|
||||
|
||||
// --- INTRO ---
|
||||
namespace Intro {
|
||||
constexpr const char* BG_COLOR = "4664BD";
|
||||
constexpr const char* CARD_COLOR = "CBDBFC";
|
||||
constexpr const char* SHADOW_COLOR = "00000080";
|
||||
constexpr int TEXT_DISTANCE_FROM_BOTTOM = 48;
|
||||
} // namespace Intro
|
||||
namespace Defaults::Debug {
|
||||
constexpr const char* COLOR = "00FFFF";
|
||||
} // namespace Defaults::Debug
|
||||
|
||||
// --- DEBUG ---
|
||||
namespace Debug {
|
||||
constexpr const char* COLOR = "00FFFF";
|
||||
}
|
||||
namespace Defaults::Resource {
|
||||
constexpr const char* COLOR = "FFFFFF";
|
||||
} // namespace Defaults::Resource
|
||||
|
||||
// --- RESOURCE ---
|
||||
namespace Resource {
|
||||
constexpr const char* COLOR = "FFFFFF";
|
||||
}
|
||||
namespace Defaults::Tabe {
|
||||
constexpr float MIN_SPAWN_TIME = 2.0F;
|
||||
constexpr float MAX_SPAWN_TIME = 3.0F;
|
||||
} // namespace Defaults::Tabe
|
||||
|
||||
// --- TABE ---
|
||||
namespace Tabe {
|
||||
constexpr float MIN_SPAWN_TIME = 2.0F;
|
||||
constexpr float MAX_SPAWN_TIME = 3.0F;
|
||||
} // namespace Tabe
|
||||
namespace Defaults::Player::DefaultShirt {
|
||||
constexpr const char* PLAYER0_DARKEST = "028ECFFF";
|
||||
constexpr const char* PLAYER0_DARK = "0297DBFF";
|
||||
constexpr const char* PLAYER0_BASE = "029FE8FF";
|
||||
constexpr const char* PLAYER0_LIGHT = "03A9F4FF";
|
||||
|
||||
// --- PLAYER ---
|
||||
namespace Player {
|
||||
namespace DefaultShirt {
|
||||
// Player 0 (Jugador 1)
|
||||
constexpr const char* PLAYER0_DARKEST = "028ECFFF"; // 2, 142, 207, 255
|
||||
constexpr const char* PLAYER0_DARK = "0297DBFF"; // 2, 151, 219, 255
|
||||
constexpr const char* PLAYER0_BASE = "029FE8FF"; // 2, 159, 232, 255
|
||||
constexpr const char* PLAYER0_LIGHT = "03A9F4FF"; // 3, 169, 244, 255
|
||||
constexpr const char* PLAYER1_DARKEST = "8E8E8EFF";
|
||||
constexpr const char* PLAYER1_DARK = "AEADADFF";
|
||||
constexpr const char* PLAYER1_BASE = "E4E4E4FF";
|
||||
constexpr const char* PLAYER1_LIGHT = "F7F1F1FF";
|
||||
} // namespace Defaults::Player::DefaultShirt
|
||||
|
||||
// Player 1 (Jugador 2)
|
||||
constexpr const char* PLAYER1_DARKEST = "8E8E8EFF"; // 142, 142, 142, 255
|
||||
constexpr const char* PLAYER1_DARK = "AEADADFF"; // 174, 173, 173, 255
|
||||
constexpr const char* PLAYER1_BASE = "E4E4E4FF"; // 228, 228, 228, 255
|
||||
constexpr const char* PLAYER1_LIGHT = "F7F1F1FF"; // 247, 241, 241, 255
|
||||
} // namespace DefaultShirt
|
||||
namespace Defaults::Player::OneCoffeeShirt {
|
||||
constexpr const char* PLAYER0_DARKEST = "3D9C70FF";
|
||||
constexpr const char* PLAYER0_DARK = "4FA370FF";
|
||||
constexpr const char* PLAYER0_BASE = "5DDE70FF";
|
||||
constexpr const char* PLAYER0_LIGHT = "7DF25CFF";
|
||||
|
||||
namespace OneCoffeeShirt {
|
||||
// Player 0 (Jugador 1)
|
||||
constexpr const char* PLAYER0_DARKEST = "3D9C70FF"; // 61, 156, 112, 255
|
||||
constexpr const char* PLAYER0_DARK = "4FA370FF"; // 79, 163, 112, 255
|
||||
constexpr const char* PLAYER0_BASE = "5DDE70FF"; // 93, 222, 112, 255
|
||||
constexpr const char* PLAYER0_LIGHT = "7DF25CFF"; // 125, 242, 92, 255
|
||||
constexpr const char* PLAYER1_DARKEST = "2E8B57FF";
|
||||
constexpr const char* PLAYER1_DARK = "3CB371FF";
|
||||
constexpr const char* PLAYER1_BASE = "48D181FF";
|
||||
constexpr const char* PLAYER1_LIGHT = "55EF8DFF";
|
||||
} // namespace Defaults::Player::OneCoffeeShirt
|
||||
|
||||
// Player 1 (Jugador 2)
|
||||
constexpr const char* PLAYER1_DARKEST = "2E8B57FF"; // 46, 139, 87, 255
|
||||
constexpr const char* PLAYER1_DARK = "3CB371FF"; // 60, 179, 113, 255
|
||||
constexpr const char* PLAYER1_BASE = "48D181FF"; // 72, 209, 129, 255
|
||||
constexpr const char* PLAYER1_LIGHT = "55EF8DFF"; // 85, 239, 141, 255
|
||||
} // namespace OneCoffeeShirt
|
||||
namespace Defaults::Player::TwoCoffeeShirt {
|
||||
constexpr const char* PLAYER0_DARKEST = "D6A41AFF";
|
||||
constexpr const char* PLAYER0_DARK = "E3AE1BFF";
|
||||
constexpr const char* PLAYER0_BASE = "EFB71DFF";
|
||||
constexpr const char* PLAYER0_LIGHT = "FCC11EFF";
|
||||
|
||||
namespace TwoCoffeeShirt {
|
||||
// Player 0 (Jugador 1)
|
||||
constexpr const char* PLAYER0_DARKEST = "D6A41AFF"; // 214, 164, 26, 255
|
||||
constexpr const char* PLAYER0_DARK = "E3AE1BFF"; // 227, 174, 27, 255
|
||||
constexpr const char* PLAYER0_BASE = "EFB71DFF"; // 239, 183, 29, 255
|
||||
constexpr const char* PLAYER0_LIGHT = "FCC11EFF"; // 252, 193, 30, 255
|
||||
constexpr const char* PLAYER1_DARKEST = "E08500FF";
|
||||
constexpr const char* PLAYER1_DARK = "FA7D00FF";
|
||||
constexpr const char* PLAYER1_BASE = "FAA200FF";
|
||||
constexpr const char* PLAYER1_LIGHT = "FA8500FF";
|
||||
} // namespace Defaults::Player::TwoCoffeeShirt
|
||||
|
||||
// Player 1 (Jugador 2)
|
||||
constexpr const char* PLAYER1_DARKEST = "E08500FF"; // 224, 133, 0, 255
|
||||
constexpr const char* PLAYER1_DARK = "FA7D00FF"; // 250, 125, 0, 255
|
||||
constexpr const char* PLAYER1_BASE = "FAA200FF"; // 250, 162, 0, 255
|
||||
constexpr const char* PLAYER1_LIGHT = "FA8500FF"; // 250, 133, 0, 255
|
||||
} // namespace TwoCoffeeShirt
|
||||
namespace Defaults::Player::OutlineColor {
|
||||
constexpr const char* PLAYER0 = "66323FFF";
|
||||
constexpr const char* PLAYER1 = "422028FF";
|
||||
} // namespace Defaults::Player::OutlineColor
|
||||
|
||||
namespace OutlineColor {
|
||||
// Player 0 (Jugador 1)
|
||||
constexpr const char* PLAYER0 = "66323FFF";
|
||||
namespace Defaults::Window {
|
||||
constexpr const char* CAPTION = "© 2025 Coffee Crisis Arcade Edition — JailDesigner";
|
||||
constexpr int ZOOM = 2;
|
||||
constexpr int MAX_ZOOM = 2;
|
||||
} // namespace Defaults::Window
|
||||
|
||||
// Player 1 (Jugador 2)
|
||||
constexpr const char* PLAYER1 = "422028FF";
|
||||
} // namespace OutlineColor
|
||||
} // namespace Player
|
||||
namespace Defaults::Video {
|
||||
constexpr SDL_ScaleMode SCALE_MODE = SDL_ScaleMode::SDL_SCALEMODE_NEAREST;
|
||||
constexpr bool FULLSCREEN = false;
|
||||
constexpr bool VSYNC = true;
|
||||
constexpr bool INTEGER_SCALE = true;
|
||||
constexpr bool POSTFX = false;
|
||||
constexpr int SUPERSAMPLING = 1;
|
||||
} // namespace Defaults::Video
|
||||
|
||||
// --- OPTIONS ---
|
||||
namespace Options {
|
||||
// Window
|
||||
constexpr const char* WINDOW_CAPTION = "© 2025 Coffee Crisis Arcade Edition — JailDesigner";
|
||||
constexpr int WINDOW_ZOOM = 2;
|
||||
constexpr int WINDOW_MAX_ZOOM = 2;
|
||||
namespace Defaults::Music {
|
||||
constexpr bool ENABLED = true;
|
||||
constexpr int VOLUME = 100;
|
||||
} // namespace Defaults::Music
|
||||
|
||||
// Video
|
||||
constexpr SDL_ScaleMode VIDEO_SCALE_MODE = SDL_ScaleMode::SDL_SCALEMODE_NEAREST;
|
||||
constexpr bool VIDEO_FULLSCREEN = false;
|
||||
constexpr bool VIDEO_VSYNC = true;
|
||||
constexpr bool VIDEO_INTEGER_SCALE = true;
|
||||
constexpr bool VIDEO_POSTFX = false;
|
||||
constexpr int VIDEO_SUPERSAMPLING = 1; // 1 = off, 2 = 2×, 3 = 3× SS
|
||||
namespace Defaults::Sound {
|
||||
constexpr bool ENABLED = true;
|
||||
constexpr int VOLUME = 100;
|
||||
} // namespace Defaults::Sound
|
||||
|
||||
// Music
|
||||
constexpr bool MUSIC_ENABLED = true;
|
||||
constexpr int MUSIC_VOLUME = 100;
|
||||
namespace Defaults::Audio {
|
||||
constexpr bool ENABLED = true;
|
||||
constexpr int VOLUME = 100;
|
||||
} // namespace Defaults::Audio
|
||||
|
||||
// Sound
|
||||
constexpr bool SOUND_ENABLED = true;
|
||||
constexpr int SOUND_VOLUME = 100;
|
||||
|
||||
// Audio
|
||||
constexpr bool AUDIO_ENABLED = true;
|
||||
constexpr int AUDIO_VOLUME = 100;
|
||||
|
||||
// Settings
|
||||
constexpr bool SETTINGS_AUTOFIRE = true;
|
||||
constexpr bool SETTINGS_SHUTDOWN_ENABLED = false;
|
||||
constexpr const char* PARAMS_FILE = "param_320x256.txt";
|
||||
} // namespace Options
|
||||
} // namespace GameDefaults
|
||||
namespace Defaults::Settings {
|
||||
constexpr bool AUTOFIRE = true;
|
||||
constexpr bool SHUTDOWN_ENABLED = false;
|
||||
constexpr const char* PARAMS_FILE = "param_320x256.txt";
|
||||
} // namespace Defaults::Settings
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <utility> // Para move
|
||||
#include <vector> // Para vector
|
||||
|
||||
#include "defaults.hpp" // for AUDIO_ENABLED, AUDIO_VOLUME, MUSIC_ENABLED, MUSIC_VOLUME, PARAMS_FILE, SETTINGS_AUTOFIRE, SETTINGS_SHUTDOWN_ENABLED, SOUND_ENABLED, SOUND_VOLUME, VIDEO_FULLSCREEN, VIDEO_INTEGER_SCALE, VIDEO_SCALE_MODE, VIDEO_VSYNC, WINDOW_CAPTION, WINDOW_MAX_ZOOM, WINDOW_ZOOM
|
||||
#include "defaults.hpp"
|
||||
#include "difficulty.hpp" // for Code
|
||||
#include "input.hpp" // for Input
|
||||
#include "lang.hpp" // for Code
|
||||
@@ -37,49 +37,49 @@ namespace Options {
|
||||
};
|
||||
|
||||
struct Window {
|
||||
std::string caption = GameDefaults::Options::WINDOW_CAPTION; // Texto que aparece en la barra de título de la ventana
|
||||
int zoom = GameDefaults::Options::WINDOW_ZOOM; // Valor por el que se multiplica el tamaño de la ventana
|
||||
int max_zoom = GameDefaults::Options::WINDOW_MAX_ZOOM; // Tamaño máximo para que la ventana no sea mayor que la pantalla
|
||||
std::string caption = Defaults::Window::CAPTION; // Texto que aparece en la barra de título de la ventana
|
||||
int zoom = Defaults::Window::ZOOM; // Valor por el que se multiplica el tamaño de la ventana
|
||||
int max_zoom = Defaults::Window::MAX_ZOOM; // Tamaño máximo para que la ventana no sea mayor que la pantalla
|
||||
};
|
||||
|
||||
struct Video {
|
||||
SDL_ScaleMode scale_mode = GameDefaults::Options::VIDEO_SCALE_MODE; // Filtro usado para el escalado de la imagen
|
||||
bool fullscreen = GameDefaults::Options::VIDEO_FULLSCREEN; // Indica si se usa pantalla completa
|
||||
bool vsync = GameDefaults::Options::VIDEO_VSYNC; // Indica si se usa vsync
|
||||
bool integer_scale = GameDefaults::Options::VIDEO_INTEGER_SCALE; // Indica si se usa escalado entero
|
||||
bool postfx = GameDefaults::Options::VIDEO_POSTFX; // Indica si se usan efectos PostFX
|
||||
int supersampling = GameDefaults::Options::VIDEO_SUPERSAMPLING; // Factor de supersampling: 1=off, 2=2×, 3=3×
|
||||
std::string info; // Información sobre el modo de vídeo
|
||||
SDL_ScaleMode scale_mode = Defaults::Video::SCALE_MODE; // Filtro usado para el escalado de la imagen
|
||||
bool fullscreen = Defaults::Video::FULLSCREEN; // Indica si se usa pantalla completa
|
||||
bool vsync = Defaults::Video::VSYNC; // Indica si se usa vsync
|
||||
bool integer_scale = Defaults::Video::INTEGER_SCALE; // Indica si se usa escalado entero
|
||||
bool postfx = Defaults::Video::POSTFX; // Indica si se usan efectos PostFX
|
||||
int supersampling = Defaults::Video::SUPERSAMPLING; // Factor de supersampling: 1=off, 2=2×, 3=3×
|
||||
std::string info; // Información sobre el modo de vídeo
|
||||
};
|
||||
|
||||
struct Music {
|
||||
bool enabled = GameDefaults::Options::MUSIC_ENABLED; // Indica si la música suena o no
|
||||
int volume = GameDefaults::Options::MUSIC_VOLUME; // Volumen de la música
|
||||
bool enabled = Defaults::Music::ENABLED; // Indica si la música suena o no
|
||||
int volume = Defaults::Music::VOLUME; // Volumen de la música
|
||||
};
|
||||
|
||||
struct Sound {
|
||||
bool enabled = GameDefaults::Options::SOUND_ENABLED; // Indica si los sonidos suenan o no
|
||||
int volume = GameDefaults::Options::SOUND_VOLUME; // Volumen de los sonidos
|
||||
bool enabled = Defaults::Sound::ENABLED; // Indica si los sonidos suenan o no
|
||||
int volume = Defaults::Sound::VOLUME; // Volumen de los sonidos
|
||||
};
|
||||
|
||||
struct Audio {
|
||||
Music music; // Opciones para la música
|
||||
Sound sound; // Opciones para los efectos de sonido
|
||||
bool enabled = GameDefaults::Options::AUDIO_ENABLED; // Indica si el audio está activo o no
|
||||
int volume = GameDefaults::Options::AUDIO_VOLUME; // Volumen general del audio
|
||||
Music music; // Opciones para la música
|
||||
Sound sound; // Opciones para los efectos de sonido
|
||||
bool enabled = Defaults::Audio::ENABLED; // Indica si el audio está activo o no
|
||||
int volume = Defaults::Audio::VOLUME; // Volumen general del audio
|
||||
};
|
||||
|
||||
struct Settings {
|
||||
int config_version = 2; // Versión del archivo de configuración
|
||||
Difficulty::Code difficulty = Difficulty::Code::NORMAL; // Dificultad del juego
|
||||
Lang::Code language = Lang::Code::VALENCIAN; // Idioma usado en el juego
|
||||
bool autofire = GameDefaults::Options::SETTINGS_AUTOFIRE; // Indicador de autofire
|
||||
bool shutdown_enabled = GameDefaults::Options::SETTINGS_SHUTDOWN_ENABLED; // Especifica si se puede apagar el sistema
|
||||
bool autofire = Defaults::Settings::AUTOFIRE; // Indicador de autofire
|
||||
bool shutdown_enabled = Defaults::Settings::SHUTDOWN_ENABLED; // Especifica si se puede apagar el sistema
|
||||
Table hi_score_table; // Tabla de mejores puntuaciones
|
||||
std::vector<int> glowing_entries = {ManageHiScoreTable::NO_ENTRY, ManageHiScoreTable::NO_ENTRY}; // Últimas posiciones de entrada en la tabla
|
||||
std::string config_file; // Ruta al fichero donde guardar la configuración y las opciones del juego
|
||||
std::string controllers_file; // Ruta al fichero con las configuraciones de los mandos
|
||||
std::string params_file = GameDefaults::Options::PARAMS_FILE; // Ruta al fichero de parámetros del juego
|
||||
std::string params_file = Defaults::Settings::PARAMS_FILE; // Ruta al fichero de parámetros del juego
|
||||
|
||||
// Reinicia las últimas entradas de puntuación
|
||||
void clearLastHiScoreEntries() {
|
||||
@@ -284,13 +284,13 @@ namespace Options {
|
||||
};
|
||||
|
||||
// --- Variables ---
|
||||
extern Window window; // Opciones de la ventana
|
||||
extern Settings settings; // Opciones del juego
|
||||
extern Video video; // Opciones de vídeo
|
||||
extern Audio audio; // Opciones de audio
|
||||
extern GamepadManager gamepad_manager; // Manager de mandos para cada jugador
|
||||
extern Keyboard keyboard; // Opciones para el teclado
|
||||
extern PendingChanges pending_changes; // Opciones que se aplican al cerrar
|
||||
extern Window window; // Opciones de la ventana
|
||||
extern Settings settings; // Opciones del juego
|
||||
extern Video video; // Opciones de vídeo
|
||||
extern Audio audio; // Opciones de audio
|
||||
extern GamepadManager gamepad_manager; // Manager de mandos para cada jugador
|
||||
extern Keyboard keyboard; // Opciones para el teclado
|
||||
extern PendingChanges pending_changes; // Opciones que se aplican al cerrar
|
||||
extern std::vector<PostFXPreset> postfx_presets; // Lista de presets de PostFX
|
||||
extern int current_postfx_preset; // Índice del preset PostFX activo
|
||||
extern std::string postfx_file_path; // Ruta al fichero de presets PostFX
|
||||
|
||||
197
source/param.hpp
197
source/param.hpp
@@ -12,37 +12,37 @@
|
||||
|
||||
// --- Parámetros del juego ---
|
||||
struct ParamGame {
|
||||
float width = GameDefaults::Game::WIDTH;
|
||||
float height = GameDefaults::Game::HEIGHT;
|
||||
float width = Defaults::Game::WIDTH;
|
||||
float height = Defaults::Game::HEIGHT;
|
||||
Zone play_area{}; // Se inicializa en el constructor de Param
|
||||
Zone game_area{}; // Se inicializa en el constructor de Param
|
||||
int name_entry_idle_time = GameDefaults::Game::NAME_ENTRY_IDLE_TIME;
|
||||
int name_entry_total_time = GameDefaults::Game::NAME_ENTRY_TOTAL_TIME;
|
||||
int name_entry_idle_time = Defaults::Game::NAME_ENTRY_IDLE_TIME;
|
||||
int name_entry_total_time = Defaults::Game::NAME_ENTRY_TOTAL_TIME;
|
||||
Color item_text_outline_color;
|
||||
};
|
||||
|
||||
// --- Parámetros del fade ---
|
||||
struct ParamFade {
|
||||
Color color = Color::fromHex(GameDefaults::Fade::COLOR);
|
||||
float num_squares_width = GameDefaults::Fade::NUM_SQUARES_WIDTH;
|
||||
float num_squares_height = GameDefaults::Fade::NUM_SQUARES_HEIGHT;
|
||||
int random_squares_duration_ms = GameDefaults::Fade::RANDOM_SQUARES_DURATION_MS;
|
||||
int post_duration_ms = GameDefaults::Fade::POST_DURATION_MS;
|
||||
float venetian_size = GameDefaults::Fade::VENETIAN_SIZE;
|
||||
Color color = Color::fromHex(Defaults::Fade::COLOR);
|
||||
float num_squares_width = Defaults::Fade::NUM_SQUARES_WIDTH;
|
||||
float num_squares_height = Defaults::Fade::NUM_SQUARES_HEIGHT;
|
||||
int random_squares_duration_ms = Defaults::Fade::RANDOM_SQUARES_DURATION_MS;
|
||||
int post_duration_ms = Defaults::Fade::POST_DURATION_MS;
|
||||
float venetian_size = Defaults::Fade::VENETIAN_SIZE;
|
||||
};
|
||||
|
||||
// --- Parámetros de la pantalla de título ---
|
||||
struct ParamTitle {
|
||||
int press_start_position = GameDefaults::Title::PRESS_START_POSITION;
|
||||
float title_duration = GameDefaults::Title::DURATION_S;
|
||||
int arcade_edition_position = GameDefaults::Title::ARCADE_EDITION_POSITION;
|
||||
int title_c_c_position = GameDefaults::Title::TITLE_C_C_POSITION;
|
||||
Color bg_color = Color::fromHex(GameDefaults::Title::BG_COLOR);
|
||||
int press_start_position = Defaults::Title::PRESS_START_POSITION;
|
||||
float title_duration = Defaults::Title::DURATION_S;
|
||||
int arcade_edition_position = Defaults::Title::ARCADE_EDITION_POSITION;
|
||||
int title_c_c_position = Defaults::Title::TITLE_C_C_POSITION;
|
||||
Color bg_color = Color::fromHex(Defaults::Title::BG_COLOR);
|
||||
};
|
||||
|
||||
// --- Parámetros del fondo ---
|
||||
struct ParamBackground {
|
||||
Color attenuate_color = Color::fromHex(GameDefaults::Background::ATTENUATE_COLOR);
|
||||
Color attenuate_color = Color::fromHex(Defaults::Background::ATTENUATE_COLOR);
|
||||
};
|
||||
|
||||
// --- Parámetros de los globos ---
|
||||
@@ -57,94 +57,93 @@ struct ParamBalloon {
|
||||
vel(vel_val) {}
|
||||
};
|
||||
|
||||
// Inicialización con los valores por defecto desde GameDefaults
|
||||
std::array<Settings, 4> settings = {{Settings(GameDefaults::Balloon::SETTINGS[0].grav, GameDefaults::Balloon::SETTINGS[0].vel),
|
||||
Settings(GameDefaults::Balloon::SETTINGS[1].grav, GameDefaults::Balloon::SETTINGS[1].vel),
|
||||
Settings(GameDefaults::Balloon::SETTINGS[2].grav, GameDefaults::Balloon::SETTINGS[2].vel),
|
||||
Settings(GameDefaults::Balloon::SETTINGS[3].grav, GameDefaults::Balloon::SETTINGS[3].vel)}};
|
||||
std::array<Settings, 4> settings = {{Settings(Defaults::Balloon::SETTINGS[0].grav, Defaults::Balloon::SETTINGS[0].vel),
|
||||
Settings(Defaults::Balloon::SETTINGS[1].grav, Defaults::Balloon::SETTINGS[1].vel),
|
||||
Settings(Defaults::Balloon::SETTINGS[2].grav, Defaults::Balloon::SETTINGS[2].vel),
|
||||
Settings(Defaults::Balloon::SETTINGS[3].grav, Defaults::Balloon::SETTINGS[3].vel)}};
|
||||
|
||||
std::array<std::string, 4> color = {{GameDefaults::Balloon::COLORS[0],
|
||||
GameDefaults::Balloon::COLORS[1],
|
||||
GameDefaults::Balloon::COLORS[2],
|
||||
GameDefaults::Balloon::COLORS[3]}};
|
||||
std::array<std::string, 4> color = {{Defaults::Balloon::COLORS[0],
|
||||
Defaults::Balloon::COLORS[1],
|
||||
Defaults::Balloon::COLORS[2],
|
||||
Defaults::Balloon::COLORS[3]}};
|
||||
|
||||
bool bouncing_sound = GameDefaults::Balloon::BOUNCING_SOUND;
|
||||
bool bouncing_sound = Defaults::Balloon::BOUNCING_SOUND;
|
||||
};
|
||||
|
||||
// --- Parámetros de las notificaciones ---
|
||||
struct ParamNotification {
|
||||
Notifier::Position pos_h = GameDefaults::Notification::POS_H;
|
||||
Notifier::Position pos_v = GameDefaults::Notification::POS_V;
|
||||
bool sound = GameDefaults::Notification::SOUND;
|
||||
Color color = Color::fromHex(GameDefaults::Notification::COLOR);
|
||||
Notifier::Position pos_h = Defaults::Notification::POS_H;
|
||||
Notifier::Position pos_v = Defaults::Notification::POS_V;
|
||||
bool sound = Defaults::Notification::SOUND;
|
||||
Color color = Color::fromHex(Defaults::Notification::COLOR);
|
||||
};
|
||||
|
||||
// --- Parámetros del marcador ---
|
||||
struct ParamScoreboard {
|
||||
SDL_FRect rect = {
|
||||
.x = GameDefaults::Scoreboard::RECT_X,
|
||||
.y = GameDefaults::Scoreboard::RECT_Y,
|
||||
.w = GameDefaults::Scoreboard::RECT_W,
|
||||
.h = GameDefaults::Scoreboard::RECT_H};
|
||||
bool separator_autocolor = GameDefaults::Scoreboard::SEPARATOR_AUTOCOLOR;
|
||||
Color separator_color = Color::fromHex(GameDefaults::Scoreboard::SEPARATOR_COLOR);
|
||||
Color easy_color = Color::fromHex(GameDefaults::Scoreboard::EASY_COLOR);
|
||||
Color normal_color = Color::fromHex(GameDefaults::Scoreboard::NORMAL_COLOR);
|
||||
Color hard_color = Color::fromHex(GameDefaults::Scoreboard::HARD_COLOR);
|
||||
bool text_autocolor = GameDefaults::Scoreboard::TEXT_AUTOCOLOR;
|
||||
Color text_color1 = Color::fromHex(GameDefaults::Scoreboard::TEXT_COLOR1);
|
||||
Color text_color2 = Color::fromHex(GameDefaults::Scoreboard::TEXT_COLOR2);
|
||||
int skip_countdown_value = GameDefaults::Scoreboard::SKIP_COUNTDOWN_VALUE;
|
||||
.x = Defaults::Scoreboard::RECT_X,
|
||||
.y = Defaults::Scoreboard::RECT_Y,
|
||||
.w = Defaults::Scoreboard::RECT_W,
|
||||
.h = Defaults::Scoreboard::RECT_H};
|
||||
bool separator_autocolor = Defaults::Scoreboard::SEPARATOR_AUTOCOLOR;
|
||||
Color separator_color = Color::fromHex(Defaults::Scoreboard::SEPARATOR_COLOR);
|
||||
Color easy_color = Color::fromHex(Defaults::Scoreboard::EASY_COLOR);
|
||||
Color normal_color = Color::fromHex(Defaults::Scoreboard::NORMAL_COLOR);
|
||||
Color hard_color = Color::fromHex(Defaults::Scoreboard::HARD_COLOR);
|
||||
bool text_autocolor = Defaults::Scoreboard::TEXT_AUTOCOLOR;
|
||||
Color text_color1 = Color::fromHex(Defaults::Scoreboard::TEXT_COLOR1);
|
||||
Color text_color2 = Color::fromHex(Defaults::Scoreboard::TEXT_COLOR2);
|
||||
int skip_countdown_value = Defaults::Scoreboard::SKIP_COUNTDOWN_VALUE;
|
||||
};
|
||||
|
||||
// --- Parámetros del menú de servicio ---
|
||||
struct ParamServiceMenu {
|
||||
Color title_color = Color::fromHex(GameDefaults::ServiceMenu::TITLE_COLOR);
|
||||
Color text_color = Color::fromHex(GameDefaults::ServiceMenu::TEXT_COLOR);
|
||||
Color selected_color = Color::fromHex(GameDefaults::ServiceMenu::SELECTED_COLOR);
|
||||
Color bg_color = Color::fromHex(GameDefaults::ServiceMenu::BG_COLOR);
|
||||
bool drop_shadow = GameDefaults::ServiceMenu::DROP_SHADOW;
|
||||
Color title_color = Color::fromHex(Defaults::ServiceMenu::TITLE_COLOR);
|
||||
Color text_color = Color::fromHex(Defaults::ServiceMenu::TEXT_COLOR);
|
||||
Color selected_color = Color::fromHex(Defaults::ServiceMenu::SELECTED_COLOR);
|
||||
Color bg_color = Color::fromHex(Defaults::ServiceMenu::BG_COLOR);
|
||||
bool drop_shadow = Defaults::ServiceMenu::DROP_SHADOW;
|
||||
|
||||
// Configuración para ventanas de mensaje
|
||||
struct WindowMessage {
|
||||
Color bg_color = Color::fromHex(GameDefaults::ServiceMenu::WindowMessage::BG_COLOR);
|
||||
Color border_color = Color::fromHex(GameDefaults::ServiceMenu::WindowMessage::BORDER_COLOR);
|
||||
Color title_color = Color::fromHex(GameDefaults::ServiceMenu::WindowMessage::TITLE_COLOR);
|
||||
Color text_color = Color::fromHex(GameDefaults::ServiceMenu::WindowMessage::TEXT_COLOR);
|
||||
float padding = GameDefaults::ServiceMenu::WindowMessage::PADDING;
|
||||
float line_spacing = GameDefaults::ServiceMenu::WindowMessage::LINE_SPACING;
|
||||
float title_separator_spacing = GameDefaults::ServiceMenu::WindowMessage::TITLE_SEPARATOR_SPACING;
|
||||
float min_width = GameDefaults::ServiceMenu::WindowMessage::MIN_WIDTH;
|
||||
float min_height = GameDefaults::ServiceMenu::WindowMessage::MIN_HEIGHT;
|
||||
float max_width_ratio = GameDefaults::ServiceMenu::WindowMessage::MAX_WIDTH_RATIO;
|
||||
float max_height_ratio = GameDefaults::ServiceMenu::WindowMessage::MAX_HEIGHT_RATIO;
|
||||
float text_safety_margin = GameDefaults::ServiceMenu::WindowMessage::TEXT_SAFETY_MARGIN;
|
||||
float animation_duration = GameDefaults::ServiceMenu::WindowMessage::ANIMATION_DURATION;
|
||||
Color bg_color = Color::fromHex(Defaults::ServiceMenu::WindowMessage::BG_COLOR);
|
||||
Color border_color = Color::fromHex(Defaults::ServiceMenu::WindowMessage::BORDER_COLOR);
|
||||
Color title_color = Color::fromHex(Defaults::ServiceMenu::WindowMessage::TITLE_COLOR);
|
||||
Color text_color = Color::fromHex(Defaults::ServiceMenu::WindowMessage::TEXT_COLOR);
|
||||
float padding = Defaults::ServiceMenu::WindowMessage::PADDING;
|
||||
float line_spacing = Defaults::ServiceMenu::WindowMessage::LINE_SPACING;
|
||||
float title_separator_spacing = Defaults::ServiceMenu::WindowMessage::TITLE_SEPARATOR_SPACING;
|
||||
float min_width = Defaults::ServiceMenu::WindowMessage::MIN_WIDTH;
|
||||
float min_height = Defaults::ServiceMenu::WindowMessage::MIN_HEIGHT;
|
||||
float max_width_ratio = Defaults::ServiceMenu::WindowMessage::MAX_WIDTH_RATIO;
|
||||
float max_height_ratio = Defaults::ServiceMenu::WindowMessage::MAX_HEIGHT_RATIO;
|
||||
float text_safety_margin = Defaults::ServiceMenu::WindowMessage::TEXT_SAFETY_MARGIN;
|
||||
float animation_duration = Defaults::ServiceMenu::WindowMessage::ANIMATION_DURATION;
|
||||
} window_message;
|
||||
};
|
||||
|
||||
// --- Parámetros de la intro ---
|
||||
struct ParamIntro {
|
||||
Color bg_color = Color::fromHex(GameDefaults::Intro::BG_COLOR);
|
||||
Color card_color = Color::fromHex(GameDefaults::Intro::CARD_COLOR);
|
||||
Color shadow_color = Color::fromHex(GameDefaults::Intro::SHADOW_COLOR);
|
||||
int text_distance_from_bottom = GameDefaults::Intro::TEXT_DISTANCE_FROM_BOTTOM;
|
||||
Color bg_color = Color::fromHex(Defaults::Intro::BG_COLOR);
|
||||
Color card_color = Color::fromHex(Defaults::Intro::CARD_COLOR);
|
||||
Color shadow_color = Color::fromHex(Defaults::Intro::SHADOW_COLOR);
|
||||
int text_distance_from_bottom = Defaults::Intro::TEXT_DISTANCE_FROM_BOTTOM;
|
||||
};
|
||||
|
||||
// --- Parámetros para Debug ---
|
||||
struct ParamDebug {
|
||||
Color color = Color::fromHex(GameDefaults::Debug::COLOR);
|
||||
Color color = Color::fromHex(Defaults::Debug::COLOR);
|
||||
};
|
||||
|
||||
// --- Parámetros para Resource ---
|
||||
struct ParamResource {
|
||||
Color color = Color::fromHex(GameDefaults::Resource::COLOR);
|
||||
Color color = Color::fromHex(Defaults::Resource::COLOR);
|
||||
};
|
||||
|
||||
// --- Parámetros para Tabe ---
|
||||
struct ParamTabe {
|
||||
float min_spawn_time = GameDefaults::Tabe::MIN_SPAWN_TIME;
|
||||
float max_spawn_time = GameDefaults::Tabe::MAX_SPAWN_TIME;
|
||||
float min_spawn_time = Defaults::Tabe::MIN_SPAWN_TIME;
|
||||
float max_spawn_time = Defaults::Tabe::MAX_SPAWN_TIME;
|
||||
};
|
||||
|
||||
// --- Parámetros del Jugador ---
|
||||
@@ -169,49 +168,49 @@ struct ParamPlayer {
|
||||
|
||||
// Inicialización con valores por defecto
|
||||
const Shirt default_player0_shirt = Shirt(
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER0_DARKEST),
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER0_DARK),
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER0_BASE),
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER0_LIGHT));
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER0_DARKEST),
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER0_DARK),
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER0_BASE),
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER0_LIGHT));
|
||||
|
||||
const Shirt default_player1_shirt = Shirt(
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER1_DARKEST),
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER1_DARK),
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER1_BASE),
|
||||
Color::fromHex(GameDefaults::Player::DefaultShirt::PLAYER1_LIGHT));
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER1_DARKEST),
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER1_DARK),
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER1_BASE),
|
||||
Color::fromHex(Defaults::Player::DefaultShirt::PLAYER1_LIGHT));
|
||||
|
||||
std::array<Shirt, 2> default_shirt = {default_player0_shirt, default_player1_shirt};
|
||||
|
||||
const Shirt one_coffee_player0_shirt = Shirt(
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER0_DARKEST),
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER0_DARK),
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER0_BASE),
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER0_LIGHT));
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER0_DARKEST),
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER0_DARK),
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER0_BASE),
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER0_LIGHT));
|
||||
|
||||
const Shirt one_coffee_player1_shirt = Shirt(
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER1_DARKEST),
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER1_DARK),
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER1_BASE),
|
||||
Color::fromHex(GameDefaults::Player::OneCoffeeShirt::PLAYER1_LIGHT));
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER1_DARKEST),
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER1_DARK),
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER1_BASE),
|
||||
Color::fromHex(Defaults::Player::OneCoffeeShirt::PLAYER1_LIGHT));
|
||||
|
||||
std::array<Shirt, 2> one_coffee_shirt = {one_coffee_player0_shirt, one_coffee_player1_shirt};
|
||||
|
||||
const Shirt two_coffee_player0_shirt = Shirt(
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER0_DARKEST),
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER0_DARK),
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER0_BASE),
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER0_LIGHT));
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER0_DARKEST),
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER0_DARK),
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER0_BASE),
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER0_LIGHT));
|
||||
|
||||
const Shirt two_coffee_player1_shirt = Shirt(
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER1_DARKEST),
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER1_DARK),
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER1_BASE),
|
||||
Color::fromHex(GameDefaults::Player::TwoCoffeeShirt::PLAYER1_LIGHT));
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER1_DARKEST),
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER1_DARK),
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER1_BASE),
|
||||
Color::fromHex(Defaults::Player::TwoCoffeeShirt::PLAYER1_LIGHT));
|
||||
|
||||
std::array<Shirt, 2> two_coffee_shirt = {two_coffee_player0_shirt, two_coffee_player1_shirt};
|
||||
|
||||
const Color outline_player0_color = Color::fromHex(GameDefaults::Player::OutlineColor::PLAYER0);
|
||||
const Color outline_player1_color = Color::fromHex(GameDefaults::Player::OutlineColor::PLAYER1);
|
||||
const Color outline_player0_color = Color::fromHex(Defaults::Player::OutlineColor::PLAYER0);
|
||||
const Color outline_player1_color = Color::fromHex(Defaults::Player::OutlineColor::PLAYER1);
|
||||
std::array<Color, 2> outline_color = {outline_player0_color, outline_player1_color};
|
||||
};
|
||||
|
||||
@@ -235,10 +234,10 @@ struct Param {
|
||||
Param() {
|
||||
// Inicializar play_area usando los valores por defecto
|
||||
game.play_area.rect = {
|
||||
.x = GameDefaults::Game::PLAY_AREA_X,
|
||||
.y = GameDefaults::Game::PLAY_AREA_Y,
|
||||
.w = GameDefaults::Game::PLAY_AREA_W,
|
||||
.h = GameDefaults::Game::PLAY_AREA_H};
|
||||
.x = Defaults::Game::PLAY_AREA_X,
|
||||
.y = Defaults::Game::PLAY_AREA_Y,
|
||||
.w = Defaults::Game::PLAY_AREA_W,
|
||||
.h = Defaults::Game::PLAY_AREA_H};
|
||||
|
||||
// Las zonas calculadas se inicializarán en precalculateZones()
|
||||
precalculateZones();
|
||||
|
||||
Reference in New Issue
Block a user