Crimson Engine
1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Toggle main menu visibility
Loading...
Searching...
No Matches
AudioSystem.hpp
Go to the documentation of this file.
1
#pragma once
2
#include "
ecs/System.hpp
"
3
#include "
ecs/Registry.hpp
"
4
#include "
editor/EditorModeState.hpp
"
5
#include "
core/EngineAPI.hpp
"
6
7
#include <unordered_map>
8
9
namespace
Engine
{
10
15
class
ENGINE_API
AudioSystem
:
public
System
{
16
public
:
17
AudioSystem
(
Registry
& reg,
EditorModeState
&
editorMode
);
18
virtual
~AudioSystem
();
19
20
virtual
void
update
(
float
dt)
override
;
21
22
private
:
23
Registry
&
registry
;
24
EditorModeState
&
editorMode
;
25
void
*
m_engine
=
nullptr
;
// Pointer to ma_engine
26
std::unordered_map<std::uint32_t, void*>
m_activeSounds
;
// Entity ID -> ma_sound*
27
};
28
29
}
// namespace Engine
EditorModeState.hpp
EngineAPI.hpp
ENGINE_API
#define ENGINE_API
Definition
EngineAPI.hpp:10
Registry.hpp
System.hpp
Engine::AudioSystem::registry
Registry & registry
Definition
AudioSystem.hpp:23
Engine::AudioSystem::m_engine
void * m_engine
Definition
AudioSystem.hpp:25
Engine::AudioSystem::m_activeSounds
std::unordered_map< std::uint32_t, void * > m_activeSounds
Definition
AudioSystem.hpp:26
Engine::AudioSystem::AudioSystem
AudioSystem(Registry ®, EditorModeState &editorMode)
Definition
AudioSystem.cpp:13
Engine::AudioSystem::editorMode
EditorModeState & editorMode
Definition
AudioSystem.hpp:24
Engine::AudioSystem::update
virtual void update(float dt) override
Pure virtual update function to implement system behaviors.
Definition
AudioSystem.cpp:43
Registry
Coordinates entities and components, providing creation, removal, lookup, and views.
Definition
Registry.hpp:30
System
Base class for ECS systems that process sets of entities.
Definition
System.hpp:12
Engine
Definition
Application.hpp:16
EditorModeState
Struct keeping track of active editor states (e.g. fly mode vs editor UI interaction).
Definition
EditorModeState.hpp:7
engine
include
ecs
systems
AudioSystem.hpp
Generated by
1.17.0