aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/utils.cpp
diff options
context:
space:
mode:
authorThierry Crozat2013-08-04 12:59:34 +0100
committerThierry Crozat2013-08-04 12:59:34 +0100
commit7b517f7fd1b463f268b2aa381ab00351092ba97b (patch)
treeb749e11498f9a7f33662b41dfd17d58c1dd4d23e /engines/mortevielle/utils.cpp
parentdeef0b955ca95c6c4141668f60fd0bccc0b9949d (diff)
downloadscummvm-rg350-7b517f7fd1b463f268b2aa381ab00351092ba97b.tar.gz
scummvm-rg350-7b517f7fd1b463f268b2aa381ab00351092ba97b.tar.bz2
scummvm-rg350-7b517f7fd1b463f268b2aa381ab00351092ba97b.zip
MORTEVIELLE: Improve looping of the intro song
Using a LoopingAudioStream gets rid of the pause between each loop (and simplifies the code).
Diffstat (limited to 'engines/mortevielle/utils.cpp')
-rw-r--r--engines/mortevielle/utils.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/engines/mortevielle/utils.cpp b/engines/mortevielle/utils.cpp
index d5dc678a72..5667e6e5c0 100644
--- a/engines/mortevielle/utils.cpp
+++ b/engines/mortevielle/utils.cpp
@@ -2213,14 +2213,7 @@ void MortevielleEngine::music() {
_addFix = (float)((kTempoMusic - 8)) / 256;
_speechManager.cctable(_speechManager._tbi);
- bool fin = false;
- int k = 0;
- do {
- fin = keyPressed();
- _soundManager.playSong(musicBuf, musicSize);
- ++k;
- fin = fin | keyPressed() | (k >= 5);
- } while (!fin);
+ _soundManager.playSong(musicBuf, musicSize, 5);
while (keyPressed())
getChar();