afegit sistema de audio

This commit is contained in:
2025-12-02 13:51:54 +01:00
parent 9ceb21c04f
commit e51749dbc6
10 changed files with 5685 additions and 2 deletions

View File

@@ -31,6 +31,23 @@ struct Rendering {
int vsync{1}; // 0=disabled, 1=enabled
};
struct Music {
bool enabled{true};
float volume{0.8f};
};
struct Sound {
bool enabled{true};
float volume{1.0f};
};
struct Audio {
Music music{};
Sound sound{};
bool enabled{true};
float volume{1.0f};
};
// Variables globals (inline per evitar ODR violations)
inline std::string version{}; // Versió del config per validació
@@ -39,6 +56,7 @@ inline Window window{};
inline Physics physics{};
inline Gameplay gameplay{};
inline Rendering rendering{};
inline Audio audio{};
inline std::string config_file_path{}; // Establert per setConfigFile()