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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user