-
Notifications
You must be signed in to change notification settings - Fork 0
/
sound.c
27 lines (25 loc) · 839 Bytes
/
sound.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#define SOUND_C
#include "options.h"
#include "sound.h"
#include "game.h"
void PlaySound(SoundSample Sample)
{
// Disable beeps in hard difficulty.
if (SoundEffects >= 0 && Game_Config.Difficulty == HARD_DIFFICULTY && Game_Status == STATUS_GAMEPLAY)
{
if ( Sample.SoundNo != 2 && Sample.SoundNo != 3 && Sample.SoundNo != 4)
{
SsUtKeyOn(SoundEffects, Sample.SoundNo, 0, Sample.NoteNo, 0, Sample.Volume, Sample.Volume);
}
}
// Beeps enabled
else if (SoundEffects >= 0 && Game_Config.Sound == 1)
{
SsUtKeyOn(SoundEffects, Sample.SoundNo, 0, Sample.NoteNo, 0, Sample.Volume, Sample.Volume);
}
// Beeps disabled (hidden option)
else if (Sample.SoundNo != 2 && Sample.SoundNo != 3 && Sample.SoundNo != 4)
{
SsUtKeyOn(SoundEffects, Sample.SoundNo, 0, Sample.NoteNo, 0, Sample.Volume, Sample.Volume);
}
}