equal
deleted
inserted
replaced
21 |
21 |
22 |
22 |
23 #include <QStringList> |
23 #include <QStringList> |
24 #include "SDL_mixer.h" |
24 #include "SDL_mixer.h" |
25 |
25 |
26 |
26 /// Class for interacting with SDL (used for music and keys) |
27 class SDLInteraction : public QObject |
27 class SDLInteraction : public QObject |
28 { |
28 { |
29 Q_OBJECT |
29 Q_OBJECT |
30 |
30 |
31 private: |
31 private: |
32 Mix_Music *music; |
32 Mix_Music *music; |
33 int musicInitialized; |
33 int musicInitialized; |
34 |
34 |
35 public: |
35 public: |
|
36 /// Class Constructor. |
36 SDLInteraction(); |
37 SDLInteraction(); |
|
38 |
|
39 /// Class Destructor. |
37 ~SDLInteraction(); |
40 ~SDLInteraction(); |
|
41 |
|
42 /** |
|
43 * @brief Returns available (screen) resolutions. |
|
44 * |
|
45 * @return list of resolutions in the format WIDTHxHEIGHT. |
|
46 */ |
38 QStringList getResolutions() const; |
47 QStringList getResolutions() const; |
|
48 |
|
49 /// Adds all available joystick controlls to the list of SDL keys. |
39 void addGameControllerKeys() const; |
50 void addGameControllerKeys() const; |
|
51 |
|
52 /// Starts the background music. |
40 void StartMusic(); |
53 void StartMusic(); |
|
54 |
|
55 /// Fades out and stops the background music. |
41 void StopMusic(); |
56 void StopMusic(); |
|
57 |
|
58 /// Initializes SDL for playing music. |
42 void SDLMusicInit(); |
59 void SDLMusicInit(); |
43 }; |
60 }; |
44 |
61 |
45 |
62 |
46 #endif |
63 #endif |