diff options
| author | Gregory Montoir | 2004-11-22 22:16:50 +0000 |
|---|---|---|
| committer | Gregory Montoir | 2004-11-22 22:16:50 +0000 |
| commit | f66f7865585d0b84c2efbeccdff50fc0dedd615c (patch) | |
| tree | b33db8925402a9570024f6892b7701c289c74218 /queen/talk.cpp | |
| parent | 9bbb5fa0db998d35d7d05a256144ea7f49e79cf2 (diff) | |
| download | scummvm-rg350-f66f7865585d0b84c2efbeccdff50fc0dedd615c.tar.gz scummvm-rg350-f66f7865585d0b84c2efbeccdff50fc0dedd615c.tar.bz2 scummvm-rg350-f66f7865585d0b84c2efbeccdff50fc0dedd615c.zip | |
possible fix for 'bug' #1034715
svn-id: r15861
Diffstat (limited to 'queen/talk.cpp')
| -rw-r--r-- | queen/talk.cpp | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/queen/talk.cpp b/queen/talk.cpp index 41387d808a..0b8e852667 100644 --- a/queen/talk.cpp +++ b/queen/talk.cpp @@ -613,7 +613,7 @@ int Talk::countSpaces(const char *segment) { void Talk::headStringAnimation(const SpeechParameters *parameters, int bobNum, int bankNum) { // talk.c lines 1612-1635 BobSlot *bob2 = _vm->graphics()->bob(2); - + if (parameters->animation[0] == 'E') { int offset = 1; @@ -702,11 +702,8 @@ void Talk::defaultAnimation( // Why on earth would someone name a variable qzx? short qzx = 0; - int spaces = countSpaces(segment); - - int i; - for (i = 0; i < (spaces + 1) /* || sfxflag == 0*/; i++) { - + int len = countSpaces(segment); + while (1) { if (parameters != NULL) { int bf; @@ -743,7 +740,7 @@ void Talk::defaultAnimation( if (_vm->input()->talkQuit()) break; - + if (_vm->logic()->joeWalk() == JWM_SPEAK) { _vm->update(); } else { @@ -759,6 +756,19 @@ void Talk::defaultAnimation( _vm->sound()->stopSpeech(); break; } + + if (_vm->sound()->speechOn()) { + // sfx is finished, stop the speak animation + if (!_vm->sound()->isSpeechActive()) { + break; + } + } else { + // no sfx, stop the animation when speak segment 'length' is 0 + --len; + if (len <= 0) { + break; + } + } } } @@ -840,33 +850,16 @@ void Talk::speakSegment( if (_talkHead) { // talk.c lines 1491-1533 - if (isJoe) { - switch (_vm->logic()->currentRoom()) { - case FAYE_HEAD: - case AZURA_HEAD: - textX = 15; - break; - - default: - textX = 150; - break; - } - textY = 30; - } else { - // XXX spaces = (spaces * 5) / 2; - switch (_vm->logic()->currentRoom()) { - case FAYE_HEAD: - case AZURA_HEAD: - textX = 15; - textY = 60; - break; - - default: // Frank - textX = 150; - textY = 60; - break; - } + switch (_vm->logic()->currentRoom()) { + case FAYE_HEAD: + case AZURA_HEAD: + textX = 15; + break; + default: // FRANK_HEAD + textX = 150; + break; } + textY = isJoe ? 30 : 60; } else { textX = bob->x; textY = bob->y; |
