diff options
author | Max Horn | 2008-09-17 18:56:13 +0000 |
---|---|---|
committer | Max Horn | 2008-09-17 18:56:13 +0000 |
commit | d4853dd9e84b43cfcc410829625c19c4b9d0b6c6 (patch) | |
tree | 82df78edbfb239eca1182feea3b0a578b8d944f0 /engines/scumm | |
parent | 468b387b9714f4a9ceea05b6ec505a66d67e1998 (diff) | |
download | scummvm-rg350-d4853dd9e84b43cfcc410829625c19c4b9d0b6c6.tar.gz scummvm-rg350-d4853dd9e84b43cfcc410829625c19c4b9d0b6c6.tar.bz2 scummvm-rg350-d4853dd9e84b43cfcc410829625c19c4b9d0b6c6.zip |
Patch #2060517: SCUMM: engine sets incorrect talkspeed value
svn-id: r34596
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/input.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/script.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/script_v8.cpp | 4 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/scumm.h | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index cc98cc00ae..bb67f2b31d 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -523,7 +523,7 @@ void ScummEngine::processKeyboard(Common::KeyState lastKeyHit) { _defaultTalkDelay = 9 - runDialog(dlg); // Save the new talkspeed value to ConfMan - setTalkspeed(_defaultTalkDelay); + setTalkDelay(_defaultTalkDelay); if (VAR_CHARINC != 0xFF) VAR(VAR_CHARINC) = _defaultTalkDelay; diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp index c727b59c64..642627d649 100644 --- a/engines/scumm/script.cpp +++ b/engines/scumm/script.cpp @@ -625,10 +625,10 @@ void ScummEngine::writeVar(uint var, int value) { if (var == VAR_CHARINC) { if (ConfMan.hasKey("talkspeed")) { - value = getTalkspeed(); + value = getTalkDelay(); } else { // Save the new talkspeed value to ConfMan - setTalkspeed(value); + setTalkDelay(value); } } diff --git a/engines/scumm/script_v8.cpp b/engines/scumm/script_v8.cpp index 63e54417a9..8859435dc9 100644 --- a/engines/scumm/script_v8.cpp +++ b/engines/scumm/script_v8.cpp @@ -424,10 +424,10 @@ void ScummEngine_v8::writeVar(uint var, int value) { if (var == VAR_CHARINC) { if (ConfMan.hasKey("talkspeed")) { - value = getTalkspeed(); + value = getTalkDelay(); } else { // Save the new talkspeed value to ConfMan - setTalkspeed(value); + setTalkDelay(value); } } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 00591f3d17..f87adfd9ac 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1693,17 +1693,17 @@ void ScummEngine::syncSoundSettings() { if (VAR_VOICE_MODE != 0xFF) VAR(VAR_VOICE_MODE) = _voiceMode; - _defaultTalkDelay = getTalkspeed(); + _defaultTalkDelay = getTalkDelay(); if (VAR_CHARINC != 0xFF) VAR(VAR_CHARINC) = _defaultTalkDelay; } -void ScummEngine::setTalkspeed(int talkspeed) { - ConfMan.setInt("talkspeed", (talkspeed * 255 + 9 / 2) / 9); +void ScummEngine::setTalkDelay(int talkdelay) { + ConfMan.setInt("talkspeed", ((9 - talkdelay) * 255 + 9 / 2) / 9); } -int ScummEngine::getTalkspeed() { - return (ConfMan.getInt("talkspeed") * 9 + 255 / 2) / 255; +int ScummEngine::getTalkDelay() { + return 9 - (ConfMan.getInt("talkspeed") * 9 + 255 / 2) / 255; } diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 96cc5bb31c..27c8943fee 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -463,8 +463,8 @@ protected: void loadCJKFont(); void setupMusic(int midi); virtual void syncSoundSettings(); - void setTalkspeed(int talkspeed); - int getTalkspeed(); + void setTalkDelay(int talkdelay); + int getTalkDelay(); // Scumm main loop & helper functions. virtual void scummLoop(int delta); |