aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/sequences_lol.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-05-29 17:12:45 +0000
committerJohannes Schickel2009-05-29 17:12:45 +0000
commit95d11e6e37e423ace2c382636e2cd2d4c8d1c725 (patch)
tree23d4723a63b53bf2e705c2f80aac174de1139dab /engines/kyra/sequences_lol.cpp
parente2641cbd251579e58fa3918bbd8966db2a97d09c (diff)
downloadscummvm-rg350-95d11e6e37e423ace2c382636e2cd2d4c8d1c725.tar.gz
scummvm-rg350-95d11e6e37e423ace2c382636e2cd2d4c8d1c725.tar.bz2
scummvm-rg350-95d11e6e37e423ace2c382636e2cd2d4c8d1c725.zip
- Add new method "isVoicePresent" to "Sound".
- Change LoL character selection to use it. - Allow quitting ScummVM in LoL character selection. svn-id: r41008
Diffstat (limited to 'engines/kyra/sequences_lol.cpp')
-rw-r--r--engines/kyra/sequences_lol.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index 95d218ab10..98479492c6 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -547,7 +547,7 @@ int LoLEngine::selectionCharInfo(int character) {
selectionCharInfoIntro(vocFilename);
if (_charSelectionInfoResult == -1) {
- while (_charSelectionInfoResult == -1) {
+ while (_charSelectionInfoResult == -1 && !shouldQuit()) {
_charSelectionInfoResult = selectionCharAccept();
_system->delayMillis(10);
}
@@ -581,16 +581,18 @@ void LoLEngine::selectionCharInfoIntro(char *file) {
file[4] = '0';
while (_charSelectionInfoResult == -1 && !shouldQuit()) {
- if (!_sound->voicePlay(file, &_speechHandle))
+ if (!_sound->isVoicePresent(file))
break;
+ _sound->voicePlay(file, &_speechHandle);
+
int i = 0;
while (_sound->voiceIsPlaying(&_speechHandle) && _charSelectionInfoResult == -1 && !shouldQuit()) {
_screen->drawShape(0, _screen->getPtrToShape(_screen->getCPagePtr(9), _charInfoFrameTable[i]), 11, 130, 0, 0);
_screen->updateScreen();
uint32 nextFrame = _system->getMillis() + 8 * _tickLength;
- while (nextFrame > _system->getMillis() && _charSelectionInfoResult == -1) {
+ while (nextFrame > _system->getMillis() && _charSelectionInfoResult == -1 && !shouldQuit()) {
_charSelectionInfoResult = selectionCharAccept();
_system->delayMillis(10);
}