diff options
author | Max Horn | 2002-06-02 12:07:12 +0000 |
---|---|---|
committer | Max Horn | 2002-06-02 12:07:12 +0000 |
commit | da43c14569e7d83813e65e5187041ea11fccef13 (patch) | |
tree | 3bc391c8fba2371acd59691626d10d365ba48b79 | |
parent | d5f527fc622f14c91f5808d53db6d3097e485a35 (diff) | |
download | scummvm-rg350-da43c14569e7d83813e65e5187041ea11fccef13.tar.gz scummvm-rg350-da43c14569e7d83813e65e5187041ea11fccef13.tar.bz2 scummvm-rg350-da43c14569e7d83813e65e5187041ea11fccef13.zip |
another attempt to fix #529538
svn-id: r4394
-rw-r--r-- | scummvm.cpp | 2 | ||||
-rw-r--r-- | string.cpp | 25 |
2 files changed, 17 insertions, 10 deletions
diff --git a/scummvm.cpp b/scummvm.cpp index 7d74ccd289..26653cb0cd 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -241,7 +241,7 @@ int Scumm::scummLoop(int delta) } else { _vars[VAR_CAMERA_POS_X] = camera._cur.x; } - _vars[VAR_HAVE_MSG] = _haveMsg; + _vars[VAR_HAVE_MSG] = (_haveMsg == 0xFE) ? 0xFF : _haveMsg; _vars[VAR_VIRT_MOUSE_X] = _virtual_mouse_x; _vars[VAR_VIRT_MOUSE_Y] = _virtual_mouse_y; _vars[VAR_MOUSE_X] = mouse.x; diff --git a/string.cpp b/string.cpp index 192c034aab..4513ff12ca 100644 --- a/string.cpp +++ b/string.cpp @@ -202,13 +202,13 @@ void Scumm::CHARSET_1() Actor *a; byte *buffer; + if (!_haveMsg) + return; + if (!(_features & GF_AFTER_V7)) { - if (!_haveMsg || (camera._dest.x >> 3) != (camera._cur.x >> 3) || + if ((camera._dest.x >> 3) != (camera._cur.x >> 3) || camera._cur.x != camera._last.x) return; - } else { - if (!_haveMsg) - return; } a = NULL; @@ -279,10 +279,10 @@ void Scumm::CHARSET_1() charset._strBottom = gdi._mask_bottom; } - if (!_haveMsg || _talkDelay) + if (_talkDelay) return; - if (_haveMsg != 0xFF) { + if (_haveMsg != 0xFF && _haveMsg != 0xFE) { if (_sfxMode == 0) stopTalk(); return; @@ -331,6 +331,8 @@ void Scumm::CHARSET_1() do { c = *buffer++; if (c == 0) { + // End of text reached, set _haveMsg to 1 so that the text will be + // removed next time CHARSET_1 is called. _haveMsg = 1; _keepText = false; break; @@ -365,11 +367,11 @@ void Scumm::CHARSET_1() charset.printCharOld(c); else if (!(_features & GF_AFTER_V6)) { // if (!_vars[VAR_V5_CHARFLAG]) { /* FIXME */ - if (!(a && _noSubtitles)) + if (!(_haveMsg == 0xFE && _noSubtitles)) charset.printChar(c); // } } else { - if (!(a && _noSubtitles)) + if (!(_haveMsg == 0xFE && _noSubtitles)) charset.printChar(c); } @@ -381,7 +383,8 @@ void Scumm::CHARSET_1() c = *buffer++; if (c == 3) { - _haveMsg = 0xFF; + if (_haveMsg != 0xFE) + _haveMsg = 0xFF; _keepText = false; break; } else if (c == 1) { @@ -405,6 +408,10 @@ void Scumm::CHARSET_1() 24); talkSound(tmpA, tmpB, 2); buffer += 14; + + // Set flag that speech variant exist of this msg + if (_haveMsg == 0xFF) + _haveMsg = 0xFE; } else if (c == 14) { int oldy = getResourceAddress(rtCharset, charset._curId)[30]; |