efxlib.h 920 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. */
  3. #ifndef __EFXLIBH
  4. #define __EFXLIBH
  5. #include "eax4.h"
  6. ///////////////////////////////////////////////////////////
  7. // Class definitions.
  8. class idSoundEffect
  9. {
  10. public:
  11. idSoundEffect() {
  12. };
  13. ~idSoundEffect() {
  14. if ( data && datasize ) {
  15. Mem_Free( data );
  16. data = NULL;
  17. }
  18. }
  19. idStr name;
  20. int datasize;
  21. void *data;
  22. };
  23. class idEFXFile
  24. {
  25. private:
  26. protected:
  27. // Protected data members.
  28. public:
  29. // Public data members.
  30. private:
  31. public:
  32. idEFXFile();
  33. ~idEFXFile();
  34. bool FindEffect( idStr &name, idSoundEffect **effect, int *index );
  35. bool ReadEffect( idLexer &lexer, idSoundEffect *effect );
  36. bool LoadFile( const char *filename, bool OSPath = false );
  37. void UnloadFile( void );
  38. void Clear( void );
  39. idList<idSoundEffect *>effects;
  40. };
  41. ///////////////////////////////////////////////////////////
  42. #endif // __EFXLIBH