sfx.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* $Id$
  2. * MegaZeux
  3. *
  4. * Copyright (C) 1996 Greg Janson
  5. * Copyright (C) 1998 Matthew D. Williams - dbwilli@scsn.net
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. /* Prototypes for SFX.CPP */
  22. #ifndef __SFX_H
  23. #define __SFX_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. void play_sfx(int sfx);
  28. void clear_sfx_queue(void);
  29. void sound_system(void);
  30. void play_note(char note,char octave,int delay);
  31. void submit_sound(int freq,int delay);
  32. char sfx_init(void);
  33. void sfx_exit(void);
  34. char is_playing(void);
  35. #ifdef __cplusplus
  36. }
  37. void play_str(unsigned char far *str,char sfx_play=0);
  38. #endif
  39. //Size of sound queue
  40. #define NOISEMAX 4096
  41. typedef struct
  42. {
  43. int duration;//This is the struc of the sound queue
  44. int freq;
  45. } noise;
  46. //Special freqs
  47. #define F_REST 1
  48. //Number of unique sound effects
  49. #define NUM_SFX 50
  50. extern unsigned char far *sfx_strs[NUM_SFX];
  51. extern unsigned char far *custom_sfx;//Ref. in chunks of 69
  52. extern char custom_sfx_on;//1 to turn on custom sfx
  53. #endif