DDNet documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
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
6
#include <
game/client/component.h
>
7
#include <
game/mapitems.h
>
8
9
#include <vector>
10
11
class
CMapSounds
:
public
CComponent
12
{
13
int
m_aSounds
[MAX_MAPSOUNDS];
14
int
m_Count
;
15
16
class
CSourceQueueEntry
17
{
18
public
:
19
int
m_Sound
;
20
bool
m_HighDetail
;
21
ISound::CVoiceHandle
m_Voice
;
22
const
CMapItemGroup
*
m_pGroup
;
23
const
CSoundSource
*
m_pSource
;
24
};
25
std::vector<CSourceQueueEntry>
m_vSourceQueue
;
26
void
Clear
();
27
bool
SoundEnabled
();
28
29
public
:
30
CMapSounds
();
31
int
Sizeof
()
const override
{
return
sizeof
(*this); }
32
33
void
Play
(
int
Channel,
int
SoundId);
34
void
PlayAt
(
int
Channel,
int
SoundId,
vec2
Position);
35
void
StopAll
();
36
37
void
OnMapLoad
()
override
;
38
void
OnRender
()
override
;
39
void
OnStateChange
(
int
NewState,
int
OldState)
override
;
40
};
41
42
#endif
// GAME_CLIENT_COMPONENTS_MAPSOUNDS_H
CComponent
Definition
component.h:165
CMapItemGroup
Definition
mapitems.h:408
CMapSounds::CSourceQueueEntry
Definition
mapsounds.h:17
CMapSounds::CSourceQueueEntry::m_Voice
ISound::CVoiceHandle m_Voice
Definition
mapsounds.h:21
CMapSounds::CSourceQueueEntry::m_Sound
int m_Sound
Definition
mapsounds.h:19
CMapSounds::CSourceQueueEntry::m_HighDetail
bool m_HighDetail
Definition
mapsounds.h:20
CMapSounds::CSourceQueueEntry::m_pSource
const CSoundSource * m_pSource
Definition
mapsounds.h:23
CMapSounds::CSourceQueueEntry::m_pGroup
const CMapItemGroup * m_pGroup
Definition
mapsounds.h:22
CMapSounds::Sizeof
int Sizeof() const override
Definition
mapsounds.h:31
CMapSounds::OnRender
void OnRender() override
Definition
mapsounds.cpp:150
CMapSounds::OnStateChange
void OnStateChange(int NewState, int OldState) override
Definition
mapsounds.cpp:251
CMapSounds::m_Count
int m_Count
Definition
mapsounds.h:14
CMapSounds::m_vSourceQueue
std::vector< CSourceQueueEntry > m_vSourceQueue
Definition
mapsounds.h:25
CMapSounds::SoundEnabled
bool SoundEnabled()
Definition
mapsounds.cpp:257
CMapSounds::m_aSounds
int m_aSounds[MAX_MAPSOUNDS]
Definition
mapsounds.h:13
CMapSounds::Play
void Play(int Channel, int SoundId)
Definition
mapsounds.cpp:21
CMapSounds::PlayAt
void PlayAt(int Channel, int SoundId, vec2 Position)
Definition
mapsounds.cpp:31
CMapSounds::StopAll
void StopAll()
Definition
mapsounds.cpp:41
CMapSounds::CMapSounds
CMapSounds()
Definition
mapsounds.cpp:16
CMapSounds::Clear
void Clear()
Definition
mapsounds.cpp:239
CMapSounds::OnMapLoad
void OnMapLoad() override
Definition
mapsounds.cpp:50
CSoundSource
Definition
mapitems.h:608
ISound::CVoiceHandle
Definition
sound.h:48
component.h
sound.h
mapitems.h
vec2
vector2_base< float > vec2
Definition
vmath.h:168
src
game
client
components
mapsounds.h
Generated by
1.18.0