forked from eu07/maszyna
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathAdvSound.h
52 lines (46 loc) · 1.34 KB
/
AdvSound.h
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
51
52
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
#ifndef AdvSoundH
#define AdvSoundH
#include "Sound.h"
#include "RealSound.h"
#include "QueryParserComp.hpp"
typedef enum
{
ss_Off,
ss_Starting,
ss_Commencing,
ss_ShuttingDown
} TSoundState;
class TAdvancedSound
{ // klasa dŸwiêków maj¹cych pocz¹tek, dowolnie d³ugi œrodek oraz zakoñczenie (np. Rp1)
TRealSound SoundStart;
TRealSound SoundCommencing;
TRealSound SoundShut;
TSoundState State;
double fTime;
double fStartLength;
double fShutLength;
double defAM;
double defFM;
public:
TAdvancedSound();
~TAdvancedSound();
void Init(char *NameOn, char *Name, char *NameOff, double DistanceAttenuation,
vector3 pPosition);
void Load(TQueryParserComp *Parser, vector3 pPosition);
void TurnOn(bool ListenerInside, vector3 NewPosition);
void TurnOff(bool ListenerInside, vector3 NewPosition);
void Free();
void Update(bool ListenerInside, vector3 NewPosition);
void UpdateAF(double A, double F, bool ListenerInside, vector3 NewPosition);
void CopyIfEmpty(TAdvancedSound &s);
};
//---------------------------------------------------------------------------
#endif