parametrizats els colors de les camisetes dels jugadors quan pillen café

This commit is contained in:
2025-08-16 13:12:22 +02:00
parent a123b3aa93
commit 6102504d32
9 changed files with 173 additions and 14 deletions

View File

@@ -5,10 +5,10 @@
#include <array> // Para array
#include <string> // Para basic_string, string
#include "color.h" // Para Color
#include "color.h" // Para Color, Zone
#include "defaults.h" // Para los valores por defecto
#include "ui/notifier.h" // Para Notifier
#include "utils.h" // Para zone
#include "ui/notifier.h" // Para Notifier::Position
#include "utils.h"
// --- Parámetros del juego ---
struct ParamGame {
@@ -150,6 +150,43 @@ struct ParamTabe {
float max_spawn_time = GameDefaults::Tabe::MAX_SPAWN_TIME;
};
// --- Parámetros del Jugador ---
struct ParamPlayer {
// Configuración de camisetas del jugador
struct Shirt {
Color darkest; // Tono más oscuro - bordes y contornos
Color dark; // Tono oscuro - sombras
Color base; // Tono principal - color base de la camiseta
Color light; // Tono claro - zonas iluminadas/highlights
// Constructor por defecto
Shirt() = default;
// Constructor con tonalidades específicas
Shirt(const Color& darkest_tone, const Color& dark_tone, const Color& base_tone, const Color& light_tone)
: darkest(darkest_tone), dark(dark_tone), base(base_tone), light(light_tone) {}
};
// Inicialización con valores por defecto
std::array<Shirt, 2> one_coffee_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)),
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))}};
std::array<Shirt, 2> two_coffee_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)),
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))}};
};
// --- Estructura principal para almacenar todos los parámetros del juego ---
struct Param {
ParamGame game;
@@ -164,6 +201,7 @@ struct Param {
ParamDebug debug;
ParamResource resource;
ParamTabe tabe;
ParamPlayer player;
// Constructor que inicializa las zonas que dependen de otros valores
Param() {