[Scummvm-cvs-logs] SF.net SVN: scummvm: [31228] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Mar 23 21:55:43 CET 2008


Revision: 31228
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31228&view=rev
Author:   lordhoto
Date:     2008-03-23 13:55:42 -0700 (Sun, 23 Mar 2008)

Log Message:
-----------
Respect text/voice settings in Kyrandia 1 Intro/Outro.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra.h
    scummvm/trunk/engines/kyra/seqplayer.cpp
    scummvm/trunk/engines/kyra/sequences_v1.cpp

Modified: scummvm/trunk/engines/kyra/kyra.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra.h	2008-03-23 11:46:55 UTC (rev 31227)
+++ scummvm/trunk/engines/kyra/kyra.h	2008-03-23 20:55:42 UTC (rev 31228)
@@ -123,6 +123,10 @@
 
 	Common::RandomSource _rnd;
 
+	// config specific
+	bool speechEnabled();
+	bool textEnabled();
+
 	// quit handling
 	virtual void quitGame();
 
@@ -170,9 +174,6 @@
 	bool _configSounds;
 	uint8 _configVoice;
 
-	bool speechEnabled();
-	bool textEnabled();
-
 	// game speed
 	virtual bool skipFlag() const = 0;
 	virtual void resetSkipFlag(bool removeEvent = true) = 0;

Modified: scummvm/trunk/engines/kyra/seqplayer.cpp
===================================================================
--- scummvm/trunk/engines/kyra/seqplayer.cpp	2008-03-23 11:46:55 UTC (rev 31227)
+++ scummvm/trunk/engines/kyra/seqplayer.cpp	2008-03-23 20:55:42 UTC (rev 31228)
@@ -278,6 +278,10 @@
 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 @@
 	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_restoreTalkText() {
-	if (_seqTalkTextPrinted && !_seqTalkTextRestored) {
+	if (_seqTalkTextPrinted && !_seqTalkTextRestored && _vm->textEnabled()) {
 		int b;
 		if (_seqWsaCurDecodePage != 0 && !_specialBuffer)
 			b = 2;
@@ -475,7 +483,8 @@
 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 @@
 			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];

Modified: scummvm/trunk/engines/kyra/sequences_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sequences_v1.cpp	2008-03-23 11:46:55 UTC (rev 31227)
+++ scummvm/trunk/engines/kyra/sequences_v1.cpp	2008-03-23 20:55:42 UTC (rev 31228)
@@ -237,14 +237,12 @@
 	_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 @@
 		_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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list