2018-07-06 14:11:38 +00:00
|
|
|
#ifndef GAME_CLIENT_COMPONENTS_MAPSOUNDS_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_MAPSOUNDS_H
|
2014-10-10 17:10:57 +00:00
|
|
|
|
|
|
|
#include <base/tl/array.h>
|
|
|
|
|
2014-10-12 14:12:13 +00:00
|
|
|
#include <engine/sound.h>
|
|
|
|
|
2014-10-10 17:10:57 +00:00
|
|
|
#include <game/client/component.h>
|
|
|
|
|
2021-07-12 09:29:59 +00:00
|
|
|
struct CSoundSource;
|
|
|
|
|
2014-10-10 17:10:57 +00:00
|
|
|
class CMapSounds : public CComponent
|
|
|
|
{
|
|
|
|
int m_aSounds[64];
|
|
|
|
int m_Count;
|
|
|
|
|
2014-10-12 14:12:13 +00:00
|
|
|
struct CSourceQueueEntry
|
2014-10-11 11:38:08 +00:00
|
|
|
{
|
|
|
|
int m_Sound;
|
2014-11-25 20:01:31 +00:00
|
|
|
bool m_HighDetail;
|
2014-10-18 13:21:13 +00:00
|
|
|
ISound::CVoiceHandle m_Voice;
|
2014-10-11 11:38:08 +00:00
|
|
|
CSoundSource *m_pSource;
|
|
|
|
|
2020-09-26 19:41:58 +00:00
|
|
|
bool operator==(const CSourceQueueEntry &Other) const { return (m_Sound == Other.m_Sound) && (m_Voice == Other.m_Voice) && (m_pSource == Other.m_pSource); }
|
2014-10-11 11:38:08 +00:00
|
|
|
};
|
|
|
|
|
2014-10-12 14:12:13 +00:00
|
|
|
array<CSourceQueueEntry> m_lSourceQueue;
|
|
|
|
|
2014-10-18 13:21:13 +00:00
|
|
|
void Clear();
|
2014-10-10 17:10:57 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
CMapSounds();
|
2022-01-31 02:11:47 +00:00
|
|
|
virtual int Sizeof() const override { return sizeof(*this); }
|
2014-10-10 17:10:57 +00:00
|
|
|
|
2022-01-30 23:43:56 +00:00
|
|
|
virtual void OnMapLoad() override;
|
|
|
|
virtual void OnRender() override;
|
|
|
|
virtual void OnStateChange(int NewState, int OldState) override;
|
2014-11-25 20:01:31 +00:00
|
|
|
};
|
2018-07-06 14:11:38 +00:00
|
|
|
|
|
|
|
#endif // GAME_CLIENT_COMPONENTS_MAPSOUNDS_H
|