Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
1.4 KiB

  1. /***********/
  2. /* sound.c */
  3. /***********/
  4. #define _WINDOWS
  5. #include <windows.h>
  6. #include <port1632.h>
  7. #include "main.h"
  8. #include "sound.h"
  9. #include "pref.h"
  10. #include "rtns.h"
  11. extern PREF Preferences;
  12. extern INT blkCurr;
  13. /****** F I N I T T U N E S ******/
  14. INT FInitTunes(VOID)
  15. {
  16. // if (OpenSound() < 1)
  17. return fsoundOff;
  18. // SetVoiceAccent(1, 120, 128, S_LEGATO, 0);
  19. return fsoundOn;
  20. }
  21. /****** K I L L T U N E ******/
  22. VOID KillTune(VOID)
  23. {
  24. // if (FSoundOn())
  25. // StopSound();
  26. }
  27. /****** E N D T U N E S ******/
  28. VOID EndTunes(VOID)
  29. {
  30. if (FSoundOn())
  31. {
  32. KillTune();
  33. // CloseSound();
  34. }
  35. }
  36. /****** P L A Y T U N E ******/
  37. VOID PlayTune(INT tune)
  38. {
  39. if (!FSoundOn())
  40. return;
  41. // StopSound();
  42. switch (tune)
  43. {
  44. case TUNE_DROP:
  45. case TUNE_MOVE:
  46. // if (blkCurr >= 0)
  47. // SetVoiceNote(1, 10+blkCurr, 16, 1);
  48. break;
  49. case TUNE_WINGAME:
  50. // SetVoiceNote(1, 24, 16, 1);
  51. // SetVoiceNote(1, 26, 16, 1);
  52. // SetVoiceNote(1, 28, 16, 1);
  53. // SetVoiceNote(1, 29, 16, 1);
  54. // SetVoiceNote(1, 31, 16, 1);
  55. // SetVoiceNote(1, 33, 16, 1);
  56. // SetVoiceNote(1, 35, 16, 1);
  57. // SetVoiceNote(1, 36, 16, 1);
  58. break;
  59. case TUNE_LOSEGAME:
  60. // SetVoiceNote(1, 36, 8, 1);
  61. // SetVoiceNote(1, 24, 8, 1);
  62. // SetVoiceNote(1, 36, 8, 1);
  63. // SetVoiceNote(1, 24, 8, 1);
  64. // SetVoiceNote(1, 36, 8, 1);
  65. // SetVoiceNote(1, 24, 8, 1);
  66. break;
  67. #ifdef DEBUG
  68. default:
  69. Oops("Invalid Tune");
  70. break;
  71. #endif
  72. }
  73. // StartSound();
  74. }