diff options
author | Oystein Eftevaag | 2006-05-28 02:51:03 +0000 |
---|---|---|
committer | Oystein Eftevaag | 2006-05-28 02:51:03 +0000 |
commit | 76d722d941c788f7660809abbad422c1bf14ec6e (patch) | |
tree | 7b137a0aa7fcf7b4dbec3e2ddc1ec7b162cb6e1e /engines/kyra | |
parent | 25c295abc5c429bd764923d3ee0b027c8159ed8c (diff) | |
download | scummvm-rg350-76d722d941c788f7660809abbad422c1bf14ec6e.tar.gz scummvm-rg350-76d722d941c788f7660809abbad422c1bf14ec6e.tar.bz2 scummvm-rg350-76d722d941c788f7660809abbad422c1bf14ec6e.zip |
Fixes bug [ 1480746 ] KYRA1: menu triggers assertion, and sets the text/speech config options correctly for CD versions
svn-id: r22693
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/gui.cpp | 12 | ||||
-rw-r--r-- | engines/kyra/script_v1.cpp | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 0e2ac3b076..ff9dbe024d 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -677,19 +677,19 @@ void KyraEngine::calcCoords(Menu &menu) { int textX = menu.item[i].labelX + menu_x1; int offset; - if (textWidth + textX > x1) { - offset = (textWidth + textX) - x1; - menu.width += offset/2; - + if (textWidth/2 + textX >= x1) { + offset = ((textWidth + textX) - x1) / 2; if (maxOffset < offset) maxOffset = offset; } } } - if (maxOffset > 0) + if (maxOffset > 0) { for (int i = 0; i < menu.nrOfItems; i++) - menu.item[i].x += maxOffset - 10; + menu.item[i].x += maxOffset + 20; + menu.width += maxOffset + 20; + } if (menu.width > 310) menu.width = 310; diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index ff1494b894..946983d7c9 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -49,7 +49,7 @@ int KyraEngine::cmd_characterSays(ScriptState *script) { snd_voiceWaitForFinish(); snd_playVoiceFile(stackPos(0)); } - if (_configVoice == 0 || _configVoice == 1) + if (_configVoice == 0 || _configVoice == 2) characterSays(stackPosString(1), stackPos(2), stackPos(3)); } else { debugC(3, kDebugLevelScriptFuncs, "cmd_characterSays(%p) ('%s', %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2)); @@ -623,7 +623,7 @@ int KyraEngine::cmd_customPrintTalkString(ScriptState *script) { snd_playVoiceFile(stackPos(0)); } _skipFlag = false; - if (_configVoice == 0 || _configVoice == 1) + if (_configVoice == 0 || _configVoice == 2) _text->printTalkTextMessage(stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF, 0, 2); } else { debugC(3, kDebugLevelScriptFuncs, "cmd_customPrintTalkString(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF); |