1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-01-04 00:23:25 +08:00
hl2sdk/dlls/soundscape_system.h

60 lines
1.5 KiB
C
Raw Permalink Normal View History

//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================//
#ifndef SOUNDSCAPE_SYSTEM_H
#define SOUNDSCAPE_SYSTEM_H
#ifdef _WIN32
#pragma once
#endif
#include "stringregistry.h"
#include "tier1/utlstring.h"
class CEnvSoundscape;
class CSoundscapeSystem : public CAutoGameSystemPerFrame
{
public:
CSoundscapeSystem( char const *name ) : CAutoGameSystemPerFrame( name )
{
}
// game system
virtual bool Init( void );
virtual void Shutdown( void );
virtual void FrameUpdatePostEntityThink( void );
virtual void LevelInitPreEntity( void );
virtual void LevelInitPostEntity();
virtual void AddSoundscapeFile( const char *filename );
int GetSoundscapeIndex( const char *pName );
bool IsValidIndex( int index );
void FlushSoundscapes( void );
void AddSoundscapeEntity( CEnvSoundscape *pSoundscape );
void RemoveSoundscapeEntity( CEnvSoundscape *pSoundscape );
void PrintDebugInfo( void );
#ifdef _XBOX
void AddSoundscapeSounds( KeyValues *pSoundscape, int soundscapeIndex );
void PrecacheSounds( int soundscapeIndex );
#endif
private:
CStringRegistry m_soundscapes;
int m_soundscapeCount;
CUtlVector<CEnvSoundscape *> m_soundscapeEntities;
int m_activeIndex;
#ifdef _XBOX
CUtlVector< CUtlVector< CUtlString > > m_soundscapeSounds;
#endif
};
extern CSoundscapeSystem g_SoundscapeSystem;
#endif // SOUNDSCAPE_SYSTEM_H