mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-27 22:52:44 +00:00
736ec20d4d
Don't include the lazy precompiled.h everywhere, only what's required for the compilation unit. platform.h needs to be included instead to provide all essential defines and types. All includes use the relative path to the neo or the game specific root. Move all idlib related includes from idlib/Lib.h to precompiled.h. precompiled.h still exists for the MFC stuff in tools/. Add some missing header guards.
65 lines
1,007 B
C++
65 lines
1,007 B
C++
/*
|
|
*/
|
|
|
|
#ifndef __EFXLIBH
|
|
#define __EFXLIBH
|
|
|
|
#if ID_OPENAL_EAX
|
|
#include <eax4.h>
|
|
#endif
|
|
|
|
#include "idlib/containers/List.h"
|
|
#include "idlib/Str.h"
|
|
#include "idlib/Lexer.h"
|
|
#include "idlib/Heap.h"
|
|
#include "sound/sound.h"
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// Class definitions.
|
|
class idSoundEffect
|
|
{
|
|
public:
|
|
idSoundEffect() {
|
|
};
|
|
~idSoundEffect() {
|
|
if ( data && datasize ) {
|
|
Mem_Free( data );
|
|
data = NULL;
|
|
}
|
|
}
|
|
|
|
idStr name;
|
|
int datasize;
|
|
void *data;
|
|
};
|
|
|
|
class idEFXFile
|
|
{
|
|
private:
|
|
|
|
protected:
|
|
// Protected data members.
|
|
|
|
public:
|
|
// Public data members.
|
|
|
|
private:
|
|
|
|
public:
|
|
idEFXFile();
|
|
~idEFXFile();
|
|
|
|
bool FindEffect( idStr &name, idSoundEffect **effect, int *index );
|
|
bool ReadEffect( idLexer &lexer, idSoundEffect *effect );
|
|
bool LoadFile( const char *filename, bool OSPath = false );
|
|
void UnloadFile( void );
|
|
void Clear( void );
|
|
|
|
idList<idSoundEffect *>effects;
|
|
};
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#endif // __EFXLIBH
|