Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef SOUNDSCAPE_SYSTEM_H
  7. #define SOUNDSCAPE_SYSTEM_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "stringregistry.h"
  12. #include "tier1/utlstring.h"
  13. class CEnvSoundscape;
  14. struct clusterSoundscapeList_t
  15. {
  16. unsigned short soundscapeCount;
  17. unsigned short firstSoundscape;
  18. };
  19. class CSoundscapeSystem : public CAutoGameSystemPerFrame
  20. {
  21. public:
  22. CSoundscapeSystem( char const *name ) : CAutoGameSystemPerFrame( name )
  23. {
  24. }
  25. // game system
  26. virtual bool Init( void );
  27. virtual void Shutdown( void );
  28. virtual void FrameUpdatePostEntityThink( void );
  29. virtual void LevelInitPreEntity( void );
  30. virtual void LevelInitPostEntity();
  31. virtual void AddSoundscapeFile( const char *filename );
  32. int GetSoundscapeIndex( const char *pName );
  33. bool IsValidIndex( int index );
  34. void FlushSoundscapes( void );
  35. void AddSoundscapeEntity( CEnvSoundscape *pSoundscape );
  36. void RemoveSoundscapeEntity( CEnvSoundscape *pSoundscape );
  37. void PrintDebugInfo( void );
  38. void AddSoundscapeSounds( KeyValues *pSoundscape, int soundscapeIndex );
  39. void PrecacheSounds( int soundscapeIndex );
  40. private:
  41. CStringRegistry m_soundscapes;
  42. int m_soundscapeCount;
  43. CUtlVector< CEnvSoundscape * > m_soundscapeEntities;
  44. CUtlVector<clusterSoundscapeList_t> m_soundscapesInCluster;
  45. CUtlVector<unsigned short> m_soundscapeIndexList;
  46. int m_activeIndex;
  47. CUtlVector< CUtlVector< CUtlString > > m_soundscapeSounds;
  48. };
  49. extern CSoundscapeSystem g_SoundscapeSystem;
  50. #endif // SOUNDSCAPE_SYSTEM_H