Minor - Adds FMOD integration for audio support - V13.4.0

Initializes FMOD sound system within the application class and propagates it to the entity manager and entities. This allows for audio components to access and use the FMOD system for playing sounds.

Removes redundant FMOD system initialization from the audio component.
This commit is contained in:
2025-09-16 16:34:08 +02:00
parent 42b7ca04a4
commit f875580197
6 changed files with 44 additions and 23 deletions

View File

@@ -32,6 +32,7 @@ public:
auto entity = std::make_shared<Entity>(id);
entity->SetCamera(camera_);
entity->SetSoundSystem(sound_system_);
m_Entities[id] = entity;
return entity;
@@ -148,11 +149,15 @@ public:
void SetCamera(camera_class* camera) { camera_ = camera; }
camera_class* GetCamera() const { return camera_; }
void SetSoundSystem(FMOD::System* sound_system) { sound_system_ = sound_system; }
FMOD::System* GetSoundSystem() const { return sound_system_; }
private:
EntityID m_NextEntityID;
std::unordered_map<EntityID, std::shared_ptr<Entity>> m_Entities;
std::queue<EntityID> m_FreeIDs; // IDs <20> r<>utiliser
camera_class* camera_ = nullptr;
FMOD::System* sound_system_ = nullptr;
};
} // namespace ecs