diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/scenemanager/soundentry.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/scenemanager/soundentry.h')
| -rw-r--r-- | utils/scenemanager/soundentry.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/utils/scenemanager/soundentry.h b/utils/scenemanager/soundentry.h new file mode 100644 index 0000000..aca3a4b --- /dev/null +++ b/utils/scenemanager/soundentry.h @@ -0,0 +1,95 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef SOUNDENTRY_H +#define SOUNDENTRY_H +#ifdef _WIN32 +#pragma once +#endif + +#include "itreeitem.h" +#include "SoundEmitterSystem/isoundemittersystembase.h" +#include "sentence.h" + +class CAudioSource; +class CVCDFile; +class CWaveFile; + +class CSoundEntry : public ITreeItem +{ +public: + CSoundEntry( CVCDFile *vcd, char const *name ); + ~CSoundEntry(); + + CVCDFile *GetOwnerVCDFile(); + + void SetName( char const *name ); + + char const *GetName() const; + + int GetWaveCount() const; + CWaveFile *GetWave( int index ); + void ClearWaves(); + void AddWave( CWaveFile *wave ); + void RemoveWave( CWaveFile *wave ); + int FindWave( CWaveFile *wave ); + + void ValidateTree( mxTreeView *tree, mxTreeViewItem* parent ); + + virtual CWorkspace *GetWorkspace() { return NULL; } + virtual CProject *GetProject() { return NULL; } + virtual CScene *GetScene() { return NULL; } + virtual CVCDFile *GetVCDFile() { return NULL; } + virtual CSoundEntry *GetSoundEntry() { return this; } + virtual CWaveFile *GetWaveFile() { return NULL; } + + void Play(); + + char const *GetScriptFile() const; + void SetScriptFile( char const *scriptfile ); + + char const *GetSentenceText( int wavindex ); + void GetCCText( wchar_t *out, int maxchars ); + + CSoundParametersInternal *GetSoundParameters(); + + virtual void Checkout( bool updatestateicons = true ); + virtual void Checkin( bool updatestateicons = true ); + + bool IsCheckedOut() const; + int GetIconIndex() const; + + + virtual void MoveChildUp( ITreeItem *child ); + virtual void MoveChildDown( ITreeItem *child ); + + virtual void SetDirty( bool dirty ); + + virtual bool IsChildFirst( ITreeItem *child ); + virtual bool IsChildLast( ITreeItem *child ); + +private: + + CSoundParameters m_Params; + + enum + { + MAX_SOUND_NAME = 256, + MAX_SCRIPT_FILE = 64, + MAX_SOUND_FILENAME = 128, + }; + + char m_szName[ MAX_SOUND_NAME ]; + char m_szScriptFile[ MAX_SCRIPT_FILE ]; + + CVCDFile *m_pOwner; + + CUtlVector< CWaveFile * > m_Waves; + + int m_nLastPlay; +}; + +#endif // SOUNDENTRY_H |