equal
deleted
inserted
replaced
19 #include "SDLs.h" |
19 #include "SDLs.h" |
20 |
20 |
21 #include "SDL.h" |
21 #include "SDL.h" |
22 #include "hwconsts.h" |
22 #include "hwconsts.h" |
23 |
23 |
24 SDLInteraction::SDLInteraction() |
24 SDLInteraction::SDLInteraction(bool hardware_snd) |
25 { |
25 { |
26 music = -1; |
26 music = -1; |
27 |
27 |
28 SDL_Init(SDL_INIT_VIDEO); |
28 SDL_Init(SDL_INIT_VIDEO); |
|
29 openal_init(hardware_snd ? 1 : 0, 5); |
29 |
30 |
30 } |
31 } |
31 |
32 |
32 SDLInteraction::~SDLInteraction() |
33 SDLInteraction::~SDLInteraction() |
33 { |
34 { |
54 } |
55 } |
55 |
56 |
56 return result; |
57 return result; |
57 } |
58 } |
58 |
59 |
59 void SDLInteraction::StartMusic(bool hardware) |
60 void SDLInteraction::StartMusic() |
60 { |
61 { |
61 if (music < 0) { |
62 if (music < 0) { |
62 openal_init(hardware ? 1 : 0, 5); |
|
63 music = openal_loadfile(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData()); |
63 music = openal_loadfile(QString(datadir->absolutePath() + "/Music/main theme.ogg").toLocal8Bit().constData()); |
64 openal_toggleloop(music); |
64 openal_toggleloop(music); |
65 |
65 |
66 } |
66 } |
67 openal_setvolume(music, 60); |
67 openal_setvolume(music, 60); |