diff options
author | Johannes Schickel | 2008-03-23 20:55:42 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-03-23 20:55:42 +0000 |
commit | 00033ff7470d2cb21c3ce8207e2deadacf63543e (patch) | |
tree | a05439b84933f883007a877bea530963e2570fbb | |
parent | 3236e308a497ad9a2d4f833648b209231f3facce (diff) | |
download | scummvm-rg350-00033ff7470d2cb21c3ce8207e2deadacf63543e.tar.gz scummvm-rg350-00033ff7470d2cb21c3ce8207e2deadacf63543e.tar.bz2 scummvm-rg350-00033ff7470d2cb21c3ce8207e2deadacf63543e.zip |
Respect text/voice settings in Kyrandia 1 Intro/Outro.
svn-id: r31228
-rw-r--r-- | engines/kyra/kyra.h | 7 | ||||
-rw-r--r-- | engines/kyra/seqplayer.cpp | 15 | ||||
-rw-r--r-- | engines/kyra/sequences_v1.cpp | 18 |
3 files changed, 25 insertions, 15 deletions
diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h index b024432b36..593990188f 100644 --- a/engines/kyra/kyra.h +++ b/engines/kyra/kyra.h @@ -123,6 +123,10 @@ public: Common::RandomSource _rnd; + // config specific + bool speechEnabled(); + bool textEnabled(); + // quit handling virtual void quitGame(); @@ -170,9 +174,6 @@ protected: bool _configSounds; uint8 _configVoice; - bool speechEnabled(); - bool textEnabled(); - // game speed virtual bool skipFlag() const = 0; virtual void resetSkipFlag(bool removeEvent = true) = 0; diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp index 180a5839f3..ddd8beb5dc 100644 --- a/engines/kyra/seqplayer.cpp +++ b/engines/kyra/seqplayer.cpp @@ -278,6 +278,10 @@ void SeqPlayer::s1_fadeToBlack() { void SeqPlayer::s1_printText() { static const uint8 colorMap[] = { 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0 }; uint8 txt = *_seqData++; + + if (!_vm->textEnabled()) + return; + if (_vm->gameFlags().platform == Common::kPlatformAmiga) _screen->fillRect(0, 180, 319, 195, 0); else @@ -301,6 +305,10 @@ void SeqPlayer::s1_printTalkText() { int x = READ_LE_UINT16(_seqData); _seqData += 2; int y = *_seqData++; uint8 fillColor = *_seqData++; + + if (!_vm->textEnabled()) + return; + int b; if (_seqTalkTextPrinted && !_seqTalkTextRestored) { if (_seqWsaCurDecodePage != 0 && !_specialBuffer) @@ -319,7 +327,7 @@ void SeqPlayer::s1_printTalkText() { } void SeqPlayer::s1_restoreTalkText() { - if (_seqTalkTextPrinted && !_seqTalkTextRestored) { + if (_seqTalkTextPrinted && !_seqTalkTextRestored && _vm->textEnabled()) { int b; if (_seqWsaCurDecodePage != 0 && !_specialBuffer) b = 2; @@ -475,7 +483,8 @@ void SeqPlayer::s1_loadIntroVRM() { void SeqPlayer::s1_playVocFile() { _vm->snd_voiceWaitForFinish(false); uint8 a = *_seqData++; - _vm->snd_playVoiceFile(a); + if (_vm->speechEnabled()) + _vm->snd_playVoiceFile(a); } void SeqPlayer::s1_miscUnk3() { @@ -629,7 +638,7 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) { seqSkippedFlag = true; } // used in Kallak writing intro - if (_seqDisplayTextFlag && _seqDisplayedTextTimer != 0xFFFFFFFF) { + if (_seqDisplayTextFlag && _seqDisplayedTextTimer != 0xFFFFFFFF && _vm->textEnabled()) { if (_seqDisplayedTextTimer < _system->getMillis()) { char charStr[3]; charStr[0] = _vm->seqTextsTable()[_seqDisplayedText][_seqDisplayedChar]; diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp index c78fdb352d..2896994679 100644 --- a/engines/kyra/sequences_v1.cpp +++ b/engines/kyra/sequences_v1.cpp @@ -237,14 +237,12 @@ void KyraEngine_v1::seq_introStory() { _screen->clearPage(3); _screen->clearPage(0); - if (_flags.isTalkie) { - // HACK: The Italian fan translation uses an special text screen here - // so we show it even though it is a talkie version. - if (_flags.lang == Common::IT_ITA) - _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, 0); - else - return; - } else if (_flags.lang == Common::EN_ANY && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga)) + // HACK: The Italian fan translation uses an special text screen here + // so we show it even when text is disabled + if (!textEnabled() && speechEnabled() && _flags.lang != Common::IT_ITA) + return; + + if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga)) _screen->loadBitmap("TEXT.CPS", 3, 3, _screen->_currentPalette); else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN) _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->_currentPalette); @@ -254,8 +252,10 @@ void KyraEngine_v1::seq_introStory() { _screen->loadBitmap("TEXT_FRE.CPS", 3, 3, _screen->_currentPalette); else if (_flags.lang == Common::ES_ESP) _screen->loadBitmap("TEXT_SPA.CPS", 3, 3, _screen->_currentPalette); - else if (_flags.lang == Common::IT_ITA) + else if (_flags.lang == Common::IT_ITA && !_flags.isTalkie) _screen->loadBitmap("TEXT_ITA.CPS", 3, 3, _screen->_currentPalette); + else if (_flags.lang == Common::IT_ITA && _flags.isTalkie) + _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->_currentPalette); else warning("no story graphics file found"); _screen->setScreenPalette(_screen->_currentPalette); |