forked from LemonHaze420/DCPopulous
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopulous_sound.cpp
More file actions
50 lines (43 loc) · 914 Bytes
/
populous_sound.cpp
File metadata and controls
50 lines (43 loc) · 914 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "Populous.h"
#include "Object.h"
#include "SafeProgramming.h"
#include <windows.h>
#include "GraphicsClasses.h"
#include "SoundSystem.h"
#include "Controls.h"
#include "Platform.h"
#include "Preferences.h"
#include "Localization.h"
#include "God.h"
int CPopulous::test_channel(SHORT Num)
{
//return 0;
int ret = (int)TheSoundSystem->CheckChannel(Num);
return(ret);
}
// ----
void CPopulous::play_sound(USHORT number, USHORT channel)
{
if(effect_off)
{
TheSoundSystem->PlaySample( SampleArray[number].SampleRef,
channel,
SampleArray[number].Frequency,
1,
0.0f);
}
}
void CPopulous::mod_play_sound(USHORT number, USHORT channel)
{
if ( music_off
&& number>=0
&& number<=113
&& channel<=4)
{
TheSoundSystem->PlaySample( SampleArray[number].SampleRef,
channel,
SampleArray[number].Frequency,
1,
0.0f);
}
}