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/script.cpp | |
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/script.cpp')
-rw-r--r-- | scumm/script.cpp | 8 |
1 files changed, 5 insertions, 3 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 |