1 #ifndef MUSIC_H
2 #define MUSIC_H
3 
4 #include "SoundSystem.h"
5 
6 #include <vector>
7 
8 #define musicroom(rx, ry) ((rx) + ((ry) * 20))
9 
10 class musicclass
11 {
12 public:
13 	musicclass();
14 
15 	void play(int t);
16 	void loopmusic();
17 	void stopmusic();
18 	void haltdasmusik();
19 	void silencedasmusik();
20 	void fadeMusicVolumeIn(int ms);
21 	void fadeout();
22 	void processmusicfade();
23 	void processmusicfadein();
24 	void processmusic();
25 	void niceplay(int t);
26 
27 	void changemusicarea(int x, int y);
28 
29 	// public var musicchan:Array = new Array();
30 	// public var musicchannel:SoundChannel, musicchannel2:SoundChannel;
31 	// public var currentmusicchan:int, musicchanlen:int, musicchancur:int, musicstopother:int, resumesong:int;
32 	// public var currentsong:int, musicfade:int, musicfadein:int;
33 	int currentsong, musicfade, musicfadein;
34 	int resumesong;
35 
36 	//public var nicefade:int, nicechange:int;
37 
38 	// Play a sound effect! There are 16 channels, which iterate
39 	void initefchannels();
40 
41 	void playef(int t, int offset = 0);
42 
43 	std::vector<SoundTrack> soundTracks;
44 	std::vector<MusicTrack> musicTracks;
45 	SoundSystem soundSystem;
46 	bool safeToProcessMusic;
47 
48 	int nicechange;
49 	int nicefade;
50 
51 	bool m_doFadeInVol;
52 	int FadeVolAmountPerFrame;
53 	int musicVolume;
54 
55 	float volume;
56 
57 	bool custompd;
58 
59 	// MMMMMM mod settings
60 	bool mmmmmm;
61 	bool usingmmmmmm;
62 };
63 
64 
65 #endif /* MUSIC_H */
66