DDraceNetwork Docs
mapsounds.h
Go to the documentation of this file.
1#ifndef GAME_CLIENT_COMPONENTS_MAPSOUNDS_H
2#define GAME_CLIENT_COMPONENTS_MAPSOUNDS_H
3
4#include <engine/sound.h>
5
7#include <game/mapitems.h>
8
9#include <vector>
10
11class CMapSounds : public CComponent
12{
15
17 {
18 public:
24 };
25 std::vector<CSourceQueueEntry> m_vSourceQueue;
26 void Clear();
27
28public:
29 CMapSounds();
30 virtual int Sizeof() const override { return sizeof(*this); }
31
32 void Play(int Channel, int SoundId);
33 void PlayAt(int Channel, int SoundId, vec2 Position);
34
35 virtual void OnMapLoad() override;
36 virtual void OnRender() override;
37 virtual void OnStateChange(int NewState, int OldState) override;
38};
39
40#endif // GAME_CLIENT_COMPONENTS_MAPSOUNDS_H
Definition: component.h:20
Definition: mapsounds.h:17
ISound::CVoiceHandle m_Voice
Definition: mapsounds.h:21
int m_Sound
Definition: mapsounds.h:19
bool m_HighDetail
Definition: mapsounds.h:20
const CSoundSource * m_pSource
Definition: mapsounds.h:23
const CMapItemGroup * m_pGroup
Definition: mapsounds.h:22
Definition: mapsounds.h:12
virtual void OnRender() override
Definition: mapsounds.cpp:130
virtual void OnStateChange(int NewState, int OldState) override
Definition: mapsounds.cpp:232
int m_Count
Definition: mapsounds.h:14
std::vector< CSourceQueueEntry > m_vSourceQueue
Definition: mapsounds.h:25
virtual int Sizeof() const override
Definition: mapsounds.h:30
int m_aSounds[MAX_MAPSOUNDS]
Definition: mapsounds.h:13
void Play(int Channel, int SoundId)
Definition: mapsounds.cpp:20
void PlayAt(int Channel, int SoundId, vec2 Position)
Definition: mapsounds.cpp:28
CMapSounds()
Definition: mapsounds.cpp:15
void Clear()
Definition: mapsounds.cpp:220
virtual void OnMapLoad() override
Definition: mapsounds.cpp:36
Definition: sound.h:48
static constexpr size_t MAX_MAPSOUNDS
Definition: mapitems.h:217
Definition: mapitems.h:298
Definition: mapitems.h:483