diff options
author | Willem Jan Palenstijn | 2016-01-05 22:59:14 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2016-01-05 22:59:14 +0100 |
commit | 1eed77c376d9131be926a6e2f587afdb5e52b456 (patch) | |
tree | 43b65a25b707dfe73fe8b70094865cee0d419e8d /engines/lab | |
parent | 9cb7535e6df646f3989c58bed8e327f5e765a56a (diff) | |
download | scummvm-rg350-1eed77c376d9131be926a6e2f587afdb5e52b456.tar.gz scummvm-rg350-1eed77c376d9131be926a6e2f587afdb5e52b456.tar.bz2 scummvm-rg350-1eed77c376d9131be926a6e2f587afdb5e52b456.zip |
LAB: Fix end-of-text detection in monitor
Diffstat (limited to 'engines/lab')
-rw-r--r-- | engines/lab/special.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 6613b384b7..d06d5911ee 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -288,8 +288,6 @@ void LabEngine::doJournal() { void LabEngine::drawMonText(const char *text, TextFont *monitorFont, Common::Rect textRect, bool isinteractive) { uint16 drawingToPage = 0, yspacing = 0; - int charsDrawn = 0; - const char *curText = text; _event->mouseHide(); @@ -319,10 +317,10 @@ void LabEngine::drawMonText(const char *text, TextFont *monitorFont, Common::Rec _graphics->rectFill(textRect, 0); } + const char *curText = text; while (drawingToPage < _monitorPage) { updateEvents(); - curText = text + charsDrawn; - charsDrawn += _graphics->flowText(monitorFont, yspacing, 0, 0, false, false, false, false, textRect, curText); + curText += _graphics->flowText(monitorFont, yspacing, 0, 0, false, false, false, false, textRect, curText); _lastPage = (*curText == 0); if (_lastPage) @@ -331,9 +329,8 @@ void LabEngine::drawMonText(const char *text, TextFont *monitorFont, Common::Rec drawingToPage++; } - curText = text + charsDrawn; + curText += _graphics->flowText(monitorFont, yspacing, 2, 0, false, false, false, true, textRect, curText); _lastPage = (*curText == 0); - _graphics->flowText(monitorFont, yspacing, 2, 0, false, false, false, true, textRect, curText); _event->mouseShow(); } |