#pragma once #include namespace Options { // Estructures de configuració struct Window { 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 }; struct Gameplay { 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 Window window{}; inline Physics physics{}; inline Gameplay gameplay{}; inline std::string config_file_path{}; // Establert per setConfigFile() // Funcions públiques 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 } // namespace Options