forked from RippeR37/BattleCity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAudio.h
37 lines (30 loc) · 1.16 KB
/
Audio.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
/**************************************************
Autor: Damian "RippeR" Dyńdo
URL: http://warsztat.gd/projects.php?x=view&id=2063
**************************************************/
#ifndef AUDIO_H_INCLUDED
#define AUDIO_H_INCLUDED
#include <SDL/SDL_mixer.h>
#include "Types.h"
using namespace std;
struct Sound {
Sound() : is_played(false) { }
bool is_played;
Mix_Chunk *sound;
};
class CAudio {
public:
~CAudio(); //konstruktor
void Init(); //inicjalizacja
void PlayChunk(SOUNDS type); //odtworzenie dŸwiêku typu 'type'
void StopChunk(SOUNDS type); //zatrzymanie dŸwieku typu 'type'
void StopAll(); //zatrzymanie wszystkich dŸwiêków
private:
Sound OnMove; //instancja dŸwiêku podczas ruchu gracza
Sound Fire; //-||- strza³u gracza
Sound Explosion; //-||-
Sound Bonus; //-||-
Sound GameStart; //-||-
Sound GameOver; //-||-
};
#endif // AUDIO_H_INCLUDED