ddnet/src/game/client/components/mapsounds.h

38 lines
783 B
C
Raw Normal View History

#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>
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;
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;
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();
virtual void OnMapLoad();
virtual void OnRender();
2014-10-18 13:21:13 +00:00
virtual void OnStateChange(int NewState, int OldState);
};
#endif // GAME_CLIENT_COMPONENTS_MAPSOUNDS_H