aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorRobert Göffringmann2003-06-09 23:27:31 +0000
committerRobert Göffringmann2003-06-09 23:27:31 +0000
commit8f0bdc4657fde52407b2d094c9a0222aa8a2f210 (patch)
treee92a59e83fc98bbc6496249659b85f48abf72c7a /sky
parent4c5501d0c33107439fe9ad4ae7b4d40b434a657e (diff)
downloadscummvm-rg350-8f0bdc4657fde52407b2d094c9a0222aa8a2f210.tar.gz
scummvm-rg350-8f0bdc4657fde52407b2d094c9a0222aa8a2f210.tar.bz2
scummvm-rg350-8f0bdc4657fde52407b2d094c9a0222aa8a2f210.zip
Sky shouldn't error() if no speech file exists for a sentence
svn-id: r8425
Diffstat (limited to 'sky')
-rw-r--r--sky/logic.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/sky/logic.cpp b/sky/logic.cpp
index 8a8ae07103..f83f12af20 100644
--- a/sky/logic.cpp
+++ b/sky/logic.cpp
@@ -2333,8 +2333,10 @@ void SkyLogic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32
} else
target->grafixProg = 0;
+ bool speechUsed = false;
+ // startSpeech returns false if no speech file exists for that text
if (SkyState::isCDVersion())
- _skySound->fnStartSpeech((uint16)textNum);
+ speechUsed = _skySound->startSpeech((uint16)textNum);
//now form the text sprite
struct lowTextManager_t textInfo;
@@ -2384,7 +2386,7 @@ void SkyLogic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32
// In CD version, we're doing the timing by checking when the VOC has stopped playing.
// Setting spTime to 10 thus means that we're doing a pause of 10 gamecycles between
// each sentence.
- if (SkyState::isCDVersion()) target->extCompact->spTime = 10;
+ if (speechUsed) target->extCompact->spTime = 10;
else target->extCompact->spTime = (uint16)_skyText->_dtLetters + 5;
target->logic = L_TALK;
}