dhewm3/neo/sound/efxlib.h

48 lines
801 B
C
Raw Normal View History

2011-11-22 21:28:15 +00:00
/*
*/
#ifndef __EFXLIBH
#define __EFXLIBH
#include "idlib/containers/List.h"
#include "idlib/Str.h"
#include "idlib/Lexer.h"
#include "idlib/Heap.h"
#include "framework/Common.h"
#include "sound/sound.h"
2011-11-22 21:28:15 +00:00
#define EFX_VERBOSE 0
#if EFX_VERBOSE
#define EFXprintf(...) do { common->Printf(__VA_ARGS__); } while (false)
#else
#define EFXprintf(...) do { } while (false)
#endif
struct idSoundEffect {
idSoundEffect();
~idSoundEffect();
bool alloc();
2011-12-11 15:02:05 +00:00
2011-11-22 21:28:15 +00:00
idStr name;
ALuint effect;
2011-11-22 21:28:15 +00:00
};
class idEFXFile {
2011-11-22 21:28:15 +00:00
public:
idEFXFile();
~idEFXFile();
bool FindEffect( idStr &name, ALuint *effect );
2011-11-22 21:28:15 +00:00
bool LoadFile( const char *filename, bool OSPath = false );
void Clear( void );
private:
bool ReadEffect( idLexer &lexer, idSoundEffect *effect );
2011-11-22 21:28:15 +00:00
idList<idSoundEffect *>effects;
};
#endif // __EFXLIBH