From e670951a469b33e28bc9352f8417ba42868468a8 Mon Sep 17 00:00:00 2001 From: Kirben Date: Tue, 9 Jun 2015 11:58:59 +1000 Subject: SCUMM: Fix bug #6592 SCUMM: ZAK - Read Ticket is too fast to read. --- engines/scumm/scumm.cpp | 1 + engines/scumm/scumm.h | 1 + engines/scumm/string.cpp | 7 +++++++ 3 files changed, 9 insertions(+) (limited to 'engines/scumm') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 99b4e695bb..c2e0cb2e05 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -316,6 +316,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _NES_lastTalkingActor = 0; _NES_talkColor = 0; _keepText = false; + _msgCount = 0; _costumeLoader = NULL; _costumeRenderer = NULL; _2byteFontPtr = 0; diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 30b4d61880..6e0adc3ff3 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1182,6 +1182,7 @@ protected: byte _charsetBuffer[512]; bool _keepText; + byte _msgCount; int _nextLeft, _nextTop; diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index d60c4c6a50..3049fbcf62 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -283,6 +283,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) { switch (c) { case 1: c = 13; // new line + _msgCount = _screenWidth; endLoop = true; break; case 2: @@ -293,6 +294,7 @@ bool ScummEngine::handleNextCharsetCode(Actor *a, int *code) { case 3: _haveMsg = (_game.version >= 7) ? 1 : 0xFF; _keepText = false; + _msgCount = 0; endLoop = true; break; case 8: @@ -573,6 +575,9 @@ void ScummEngine::CHARSET_1() { #endif restoreCharsetBg(); } + _msgCount = 0; + } else if (_game.version <= 2) { + _talkDelay += _msgCount * _defaultTalkDelay; } if (_game.version > 3) { @@ -600,6 +605,7 @@ void ScummEngine::CHARSET_1() { // End of text reached, set _haveMsg accordingly _haveMsg = (_game.version >= 7) ? 2 : 1; _keepText = false; + _msgCount = 0; break; } @@ -648,6 +654,7 @@ void ScummEngine::CHARSET_1() { } if (_game.version <= 3) { _charset->printChar(c, false); + _msgCount += 1; } else { if (_game.features & GF_16BIT_COLOR) { // HE games which use sprites for subtitles -- cgit v1.2.3