[Scummvm-cvs-logs] SF.net SVN: scummvm: [23031] scummvm/trunk/engines/saga

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Jun 11 22:31:00 CEST 2006


Revision: 23031
Author:   sev
Date:     2006-06-11 13:30:43 -0700 (Sun, 11 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23031&view=rev

Log Message:
-----------
Support of new subtitles code. Patch from salty-horse.

Modified Paths:
--------------
    scummvm/trunk/engines/saga/actor.cpp
    scummvm/trunk/engines/saga/interface.cpp
    scummvm/trunk/engines/saga/saga.cpp
    scummvm/trunk/engines/saga/saga.h
Modified: scummvm/trunk/engines/saga/actor.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor.cpp	2006-06-11 20:29:07 UTC (rev 23030)
+++ scummvm/trunk/engines/saga/actor.cpp	2006-06-11 20:30:43 UTC (rev 23031)
@@ -1148,13 +1148,13 @@
 		if (sampleLength < 0) {
 			_activeSpeech.playingTime = stringLength * 1000 / 22;
 			switch (_vm->_readingSpeed) {
-			case 1:
+			case 2:
 				_activeSpeech.playingTime *= 2;
 				break;
-			case 2:
+			case 1:
 				_activeSpeech.playingTime *= 4;
 				break;
-			case 3:
+			case 0:
 				_activeSpeech.playingTime = 0x7fffff;
 				break;
 			}

Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp	2006-06-11 20:29:07 UTC (rev 23030)
+++ scummvm/trunk/engines/saga/interface.cpp	2006-06-11 20:30:43 UTC (rev 23031)
@@ -1367,7 +1367,7 @@
 			ConfMan.setBool("subtitles", _vm->_subtitlesEnabled);
 		} else {
 			_vm->_readingSpeed = (_vm->_readingSpeed + 1) % 4;
-			ConfMan.setInt("talkspeed", _vm->_readingSpeed);
+			_vm->setTalkspeed(_vm->_readingSpeed);
 		}
 		break;
 	case kTextMusic:
@@ -1893,7 +1893,7 @@
 	ds->fillRect(fill, solidColor);
 }
 
-static const int readingSpeeds[] = { kTextFast, kTextMid, kTextSlow, kTextClick };
+static const int readingSpeeds[] = { kTextClick, kTextSlow, kTextMid, kTextFast };
 
 void Interface::drawPanelButtonText(Surface *ds, InterfacePanel *panel, PanelButton *panelButton) {
 	const char *text;

Modified: scummvm/trunk/engines/saga/saga.cpp
===================================================================
--- scummvm/trunk/engines/saga/saga.cpp	2006-06-11 20:29:07 UTC (rev 23030)
+++ scummvm/trunk/engines/saga/saga.cpp	2006-06-11 20:30:43 UTC (rev 23031)
@@ -150,7 +150,7 @@
 	_soundVolume = ConfMan.getInt("sfx_volume") / 25;
 	_musicVolume = ConfMan.getInt("music_volume") / 25;
 	_subtitlesEnabled = ConfMan.getBool("subtitles");
-	_readingSpeed = ConfMan.getInt("talkspeed");
+	_readingSpeed = getTalkspeed();
 	_copyProtection = ConfMan.getBool("copy_protection");
 
 	if (_readingSpeed > 3)
@@ -457,5 +457,12 @@
 	return colorId;
 }
 
+void SagaEngine::setTalkspeed(int talkspeed) {
+	ConfMan.setInt("talkspeed", (talkspeed * 255 + 3 / 2) / 3);
+}
 
+int SagaEngine::getTalkspeed() {
+	return (ConfMan.getInt("talkspeed") * 3 + 255 / 2) / 255;
+}
+
 } // End of namespace Saga

Modified: scummvm/trunk/engines/saga/saga.h
===================================================================
--- scummvm/trunk/engines/saga/saga.h	2006-06-11 20:29:07 UTC (rev 23030)
+++ scummvm/trunk/engines/saga/saga.h	2006-06-11 20:30:43 UTC (rev 23031)
@@ -409,9 +409,10 @@
 
 public:
 	ColorId KnownColor2ColorId(KnownColor knownColor);
+	void setTalkspeed(int talkspeed); 
+	int getTalkspeed(); 
 };
 
-
 } // End of namespace Saga
 
 #endif


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