diff options
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/input.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/script.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/script_v8.cpp | 14 |
3 files changed, 18 insertions, 8 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 397ac8bddb..7dfe6fa782 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -447,7 +447,7 @@ void ScummEngine::processKbd(bool smushMode) { _defaultTalkDelay = 9 - runDialog(dlg); // Save the new talkspeed value to ConfMan - setTalkspeed(9 - _defaultTalkDelay); + setTalkspeed(_defaultTalkDelay); if (VAR_CHARINC != 0xFF) VAR(VAR_CHARINC) = _defaultTalkDelay; diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index 078f213a24..79f083e05e 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -616,9 +616,13 @@ void ScummEngine::writeVar(uint var, int value) { ConfMan.setBool("subtitles", !value); } - if (var == VAR_CHARINC && ConfMan.hasKey("talkspeed")) { - _defaultTalkDelay = getTalkspeed(); - VAR(VAR_CHARINC) = _defaultTalkDelay; + if (var == VAR_CHARINC) { + if (ConfMan.hasKey("talkspeed")) { + VAR(VAR_CHARINC) = getTalkspeed(); + } else { + // Save the new talkspeed value to ConfMan + setTalkspeed(_defaultTalkDelay); + } } else { _scummVars[var] = value; } diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index 14e59d42d6..8dae96397d 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -419,11 +419,17 @@ 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 && ConfMan.hasKey("talkspeed")) { - _defaultTalkDelay = getTalkspeed(); - VAR(VAR_CHARINC) = _defaultTalkDelay; - } else + if (var == VAR_CHARINC) { + if (ConfMan.hasKey("talkspeed")) { + _defaultTalkDelay = getTalkspeed(); + VAR(VAR_CHARINC) = _defaultTalkDelay; + } else { + // Save the new talkspeed value to ConfMan + setTalkspeed(_defaultTalkDelay); + } + } else { _scummVars[var] = value; + } if ((_varwatch == (int)var) || (_varwatch == 0)) { if (vm.slot[_currentScript].number < 100) |