Commit | Line | Data |
---|---|---|
acbc5679 JB |
1 | diff -purN REminiscence-0.1.9.orig/game.cpp REminiscence-0.1.9/game.cpp |
2 | --- REminiscence-0.1.9.orig/game.cpp 2010-01-13 19:55:11.318625003 +0100 | |
3 | +++ REminiscence-0.1.9/game.cpp 2010-01-13 20:06:37.770629950 +0100 | |
4 | @@ -47,7 +47,9 @@ void Game::run() {\r | |
5 | }\r | |
6 | #endif\r | |
7 | \r | |
8 | +#ifndef NO_SDL_MIXER\r | |
9 | _mix.init();\r | |
10 | +#endif\r | |
11 | \r | |
12 | playCutscene(0x40);\r | |
13 | playCutscene(0x0D);\r | |
14 | @@ -77,8 +79,9 @@ void Game::run() {\r | |
15 | }\r | |
16 | \r | |
17 | _res.free_TEXT();\r | |
18 | -\r | |
19 | +#ifndef NO_SDL_MIXER\r | |
20 | _mix.free();\r | |
21 | +#endif\r | |
22 | _stub->destroy();\r | |
23 | }\r | |
24 | \r | |
25 | @@ -615,17 +618,21 @@ void Game::drawStoryTexts() {\r | |
26 | }\r | |
27 | MixerChunk chunk;\r | |
28 | _res.load_VCE(_textToDisplay, textSpeechSegment++, &chunk.data, &chunk.len);\r | |
29 | +#ifndef NO_SDL_MIXER\r | |
30 | if (chunk.data) {\r | |
31 | _mix.play(&chunk, 32000, Mixer::MAX_VOLUME);\r | |
32 | }\r | |
33 | +#endif\r | |
34 | _vid.updateScreen();\r | |
35 | while (!_stub->_pi.backspace && !_stub->_pi.quit) {\r | |
36 | inp_update();\r | |
37 | _stub->sleep(80);\r | |
38 | }\r | |
39 | +#ifndef NO_SDL_MIXER\r | |
40 | if (chunk.data) {\r | |
41 | _mix.stopAll();\r | |
42 | }\r | |
43 | +#endif\r | |
44 | _stub->_pi.backspace = false;\r | |
45 | if (*str == 0) {\r | |
46 | break;\r | |
47 | @@ -1191,7 +1198,9 @@ void Game::playSound(uint8 sfxId, uint8 | |
48 | MixerChunk mc;\r | |
49 | mc.data = sfx->data;\r | |
50 | mc.len = sfx->len;\r | |
51 | +#ifndef NO_SDL_MIXER\r | |
52 | _mix.play(&mc, 6000, Mixer::MAX_VOLUME >> softVol);\r | |
53 | +#endif\r | |
54 | }\r | |
55 | } else {\r | |
56 | // in-game music\r |