aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/text_lol.cpp
diff options
context:
space:
mode:
authorFlorian Kagerer2010-11-08 00:08:38 +0000
committerFlorian Kagerer2010-11-08 00:08:38 +0000
commit97a98cf9db150f41c704ff92609b30fa9bf8ee30 (patch)
tree4afb4af3a184e12f699ce89f1a667baee930cbbe /engines/kyra/text_lol.cpp
parent74d0ad83711ae515befa1ed8dcff9dc6f59c5275 (diff)
downloadscummvm-rg350-97a98cf9db150f41c704ff92609b30fa9bf8ee30.tar.gz
scummvm-rg350-97a98cf9db150f41c704ff92609b30fa9bf8ee30.tar.bz2
scummvm-rg350-97a98cf9db150f41c704ff92609b30fa9bf8ee30.zip
LOL: fixed minor text displayer bug
svn-id: r54132
Diffstat (limited to 'engines/kyra/text_lol.cpp')
-rw-r--r--engines/kyra/text_lol.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp
index c5341cd8a6..9f98586303 100644
--- a/engines/kyra/text_lol.cpp
+++ b/engines/kyra/text_lol.cpp
@@ -188,6 +188,7 @@ void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script,
} else {
oldDim = _screen->curDimIndex();
_screen->setScreenDim(dim);
+ _lineCount = 0;
_textDimData[dim].color1 = isPc98 ? 0x33 : 254;
_textDimData[dim].color2 = _screen->_curDim->unkA;
}
@@ -200,6 +201,7 @@ void TextDisplayer_LoL::printDialogueText(int dim, char *str, EMCState *script,
displayText(_dialogueBuffer);
_screen->setScreenDim(oldDim);
+ _lineCount = 0;
_screen->setCurPage(cp);
_screen->setFont(of);
@@ -246,6 +248,7 @@ void TextDisplayer_LoL::printMessage(uint16 type, const char *str, ...) {
displayText(_buffer);
_screen->setScreenDim(od);
+ _lineCount = 0;
if (!(type & 0x8000)) {
if (soundEffect[type])
@@ -376,7 +379,6 @@ void TextDisplayer_LoL::displayText(char *str, ...) {
_tempString2 = 0;
_currentLine[0] = 0;
-
memset(_ctrl, 0, 3);
char c = parseCommand();
@@ -594,13 +596,13 @@ void TextDisplayer_LoL::printLine(char *str) {
int n2 = 0;
int n1 = (w / 4) - 1;
- do {
+ while (n2 < n1 && n2 < s) {
c = str[n2];
uint8 cu = (uint8) c;
if (cu >= 0xE0 || (cu > 0x80 && cu < 0xA0))
n2++;
n2++;
- } while (n2 < n1 && n2 < s);
+ }
s = n2;
}
} else {