1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Updated CSoundParameters and ISoundEmitterSystemBase.

This commit is contained in:
Nicholas Hastings 2013-11-12 11:26:59 -05:00
parent 9b7fc95b59
commit 895e77b7cd

View File

@ -23,8 +23,8 @@
#define SOUNDGENDER_MACRO_LENGTH 7 // Length of above including $
class KeyValues;
typedef short HSOUNDSCRIPTHANDLE;
#define SOUNDEMITTER_INVALID_HANDLE (HSOUNDSCRIPTHANDLE)-1
typedef unsigned int HSOUNDSCRIPTHASH;
#define SOUNDEMITTER_INVALID_HASH (HSOUNDSCRIPTHASH)-1
//-----------------------------------------------------------------------------
@ -47,6 +47,12 @@ struct CSoundParameters
count = 0;
delay_msec = 0;
m_nSoundEntryVersion = 1;
m_hSoundScriptHash = SOUNDEMITTER_INVALID_HASH;
m_pOperatorsKV = NULL;
m_nRandomSeed = -1;
}
int channel;
@ -59,6 +65,11 @@ struct CSoundParameters
int count;
char soundname[ 128 ];
int delay_msec;
HSOUNDSCRIPTHASH m_hSoundScriptHash;
int m_nSoundEntryVersion;
KeyValues *m_pOperatorsKV;
int m_nRandomSeed;
};
// A bit of a hack, but these are just utility function which are implemented in the SouneParametersInternal.cpp file which all users of this lib also compile
@ -259,12 +270,14 @@ public:
// Called by either client or server in LevelShutdown to clear out custom overrides
virtual void ClearSoundOverrides() = 0;
virtual bool GetParametersForSoundEx( const char *soundname, HSOUNDSCRIPTHANDLE& handle, CSoundParameters& params, gender_t gender, bool isbeingemitted = false ) = 0;
virtual soundlevel_t LookupSoundLevelByHandle( char const *soundname, HSOUNDSCRIPTHANDLE& handle ) = 0;
virtual bool GetParametersForSoundEx( const char *soundname, HSOUNDSCRIPTHASH& handle, CSoundParameters& params, gender_t gender, bool isbeingemitted = false ) = 0;
virtual soundlevel_t LookupSoundLevelByHandle( char const *soundname, HSOUNDSCRIPTHASH& handle ) = 0;
virtual KeyValues *GetOperatorKVByHandle( HSOUNDSCRIPTHASH& handle ) = 0;
virtual char const *GetSoundNameForHash( unsigned int hash ) = 0; // Returns NULL if hash not found!!!
virtual unsigned int HashSoundName( char const *pchSndName ) = 0;
virtual bool IsValidHash( unsigned int hash ) = 0;
virtual char const *GetSoundNameForHash( HSOUNDSCRIPTHASH hash ) const = 0; // Returns NULL if hash not found!!!
virtual int GetSoundIndexForHash( HSOUNDSCRIPTHASH hash ) const = 0;
virtual HSOUNDSCRIPTHASH HashSoundName( char const *pchSndName ) const = 0;
virtual bool IsValidHash( HSOUNDSCRIPTHASH hash ) const = 0;
virtual void DescribeSound( char const *soundname ) = 0;
// Flush and reload