diff options
author | Travis Howell | 2004-02-21 02:03:53 +0000 |
---|---|---|
committer | Travis Howell | 2004-02-21 02:03:53 +0000 |
commit | dfe5828d4fc98a880a7f6de61585c21208b945aa (patch) | |
tree | f0ed057f41c87c500d8a03e913b89f1da4db77da /scumm | |
parent | e0b723a54c22806c45170ecca3f3456da14ce690 (diff) | |
download | scummvm-rg350-dfe5828d4fc98a880a7f6de61585c21208b945aa.tar.gz scummvm-rg350-dfe5828d4fc98a880a7f6de61585c21208b945aa.tar.bz2 scummvm-rg350-dfe5828d4fc98a880a7f6de61585c21208b945aa.zip |
Use correct method for subtitle speed.
svn-id: r12949
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script.cpp | 8 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 6 | ||||
-rw-r--r-- | scumm/scummvm.cpp | 16 | ||||
-rw-r--r-- | scumm/string.cpp | 9 |
4 files changed, 14 insertions, 25 deletions
diff --git a/scumm/script.cpp b/scumm/script.cpp index 0c18a87831..ed8c79bc9f 100644 --- a/scumm/script.cpp +++ b/scumm/script.cpp @@ -543,9 +543,11 @@ void ScummEngine::writeVar(uint var, int value) { checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)"); // FIXME: Find some better place to put this. - if (var == VAR_CHARINC) - VAR(VAR_CHARINC) = _defaultTalkDelay / 20; - else + if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) { + int talkspeed = ConfMan.getInt("talkspeed") / 20; + if (talkspeed >= 0 && talkspeed <= 180) + VAR(VAR_CHARINC) = talkspeed; + } else _scummVars[var] = value; // stay in sync with loom cd subtitle var diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 37541b4371..725f8b90c7 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -422,8 +422,10 @@ void ScummEngine_v8::writeVar(uint var, int value) { if (!(var & 0xF0000000)) { checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)"); - if (var == VAR_CHARINC) { - VAR(VAR_CHARINC) = _defaultTalkDelay / 20; + if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) { + int talkspeed = ConfMan.getInt("talkspeed") / 20; + if (talkspeed >= 0 && talkspeed <= 180) + VAR(VAR_CHARINC) = talkspeed; } else _scummVars[var] = value; diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 770ae991ef..ea763c3404 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -642,7 +642,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS ConfMan.set("subtitles", !ConfMan.getBool("nosubtitles")); } _confirmExit = ConfMan.getBool("confirm_exit"); - _defaultTalkDelay = ConfMan.getInt("talkspeed"); _native_mt32 = ConfMan.getBool("native_mt32"); // TODO: We shouldn't rely on the global Language values matching those COMI etc. expect. // Rather we should explicitly translate them. @@ -1200,6 +1199,7 @@ void ScummEngine::initScummVars() { VAR(VAR_CURRENT_LIGHTS) = LIGHTMODE_actor_base | LIGHTMODE_actor_color | LIGHTMODE_screen; } + _defaultTalkDelay = 60; VAR(VAR_CHARINC) = 4; talkingActor(0); } @@ -1884,17 +1884,11 @@ void ScummEngine::processKbd(bool smushMode) { if (_imuse) _imuse->set_music_volume (vol); } else if (_lastKeyHit == '-') { // - text speed down - _defaultTalkDelay += 5; - if (_defaultTalkDelay > 90) - _defaultTalkDelay = 90; - - VAR(VAR_CHARINC) = _defaultTalkDelay / 20; + if (VAR(VAR_CHARINC) < 9) + VAR(VAR_CHARINC) = + 1; } else if (_lastKeyHit == '+') { // + text speed up - _defaultTalkDelay -= 5; - if (_defaultTalkDelay < 5) - _defaultTalkDelay = 5; - - VAR(VAR_CHARINC) = _defaultTalkDelay / 20; + if (VAR(VAR_CHARINC) > 0) + VAR(VAR_CHARINC) -= 1; } else if (_lastKeyHit == '~' || _lastKeyHit == '#') { // Debug console _debugger->attach(); } else if (_version <= 2) { diff --git a/scumm/string.cpp b/scumm/string.cpp index 8bad5d1d7a..e36f612ae8 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -177,15 +177,6 @@ void ScummEngine::CHARSET_1() { _useTalkAnims = true; } - // HACK: Most of the audio sync in Loom is handled by the "MI1 - // timer", but some of it depends on text strings timing out at - // the right moment. - - if (_gameId == GID_LOOM256) { - _defaultTalkDelay = 100; - VAR(VAR_CHARINC) = 5; - } - _talkDelay = _defaultTalkDelay; if (!_keepText) { |