LOGO explota

This commit is contained in:
2025-12-02 08:50:38 +01:00
parent 73f222fcb7
commit 20538af4c6
22 changed files with 1754 additions and 1598 deletions

View File

@@ -7,42 +7,42 @@ namespace Options {
// Estructures de configuració
struct Window {
int width{640};
int height{480};
bool fullscreen{false};
int size_increment{100}; // Increment per F1/F2
int width{640};
int height{480};
bool fullscreen{false};
int size_increment{100}; // Increment per F1/F2
};
struct Physics {
float rotation_speed{3.14f}; // rad/s
float acceleration{400.0f}; // px/s²
float max_velocity{120.0f}; // px/s
float friction{20.0f}; // px/s²
float enemy_speed{2.0f}; // unitats/frame
float bullet_speed{6.0f}; // unitats/frame
float rotation_speed{3.14f}; // rad/s
float acceleration{400.0f}; // px/s²
float max_velocity{120.0f}; // px/s
float friction{20.0f}; // px/s²
float enemy_speed{2.0f}; // unitats/frame
float bullet_speed{6.0f}; // unitats/frame
};
struct Gameplay {
int max_enemies{15};
int max_bullets{3};
int max_enemies{15};
int max_bullets{3};
};
// Variables globals (inline per evitar ODR violations)
inline std::string version{}; // Versió del config per validació
inline bool console{false}; // Eixida de debug
inline std::string version{}; // Versió del config per validació
inline bool console{false}; // Eixida de debug
inline Window window{};
inline Physics physics{};
inline Gameplay gameplay{};
inline std::string config_file_path{}; // Establert per setConfigFile()
inline std::string config_file_path{}; // Establert per setConfigFile()
// Funcions públiques
void init(); // Inicialitzar amb valors per defecte
void init(); // Inicialitzar amb valors per defecte
void setConfigFile(
const std::string &path); // Establir ruta del fitxer de config
auto loadFromFile() -> bool; // Carregar config YAML
auto saveToFile() -> bool; // Guardar config YAML
const std::string& path); // Establir ruta del fitxer de config
auto loadFromFile() -> bool; // Carregar config YAML
auto saveToFile() -> bool; // Guardar config YAML
} // namespace Options
} // namespace Options