aboutsummaryrefslogtreecommitdiff
path: root/engines/saga/saga.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2006-06-11 20:30:43 +0000
committerEugene Sandulenko2006-06-11 20:30:43 +0000
commitde95d463a8c091ea55a8ae8166fb447a9f56a195 (patch)
tree4a2d0e93f714439be7846b094b9f38afa252966e /engines/saga/saga.cpp
parentfd7e9847fcfa79fe8a76f97b720956a59b91d8c2 (diff)
downloadscummvm-rg350-de95d463a8c091ea55a8ae8166fb447a9f56a195.tar.gz
scummvm-rg350-de95d463a8c091ea55a8ae8166fb447a9f56a195.tar.bz2
scummvm-rg350-de95d463a8c091ea55a8ae8166fb447a9f56a195.zip
Support of new subtitles code. Patch from salty-horse.
svn-id: r23031
Diffstat (limited to 'engines/saga/saga.cpp')
-rw-r--r--engines/saga/saga.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 2bb81e3841..f952cdb60b 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -150,7 +150,7 @@ int SagaEngine::init() {
_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 @@ ColorId SagaEngine::KnownColor2ColorId(KnownColor knownColor) {
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