From f01b8e9c45e3349c84346f270c17610b0e5350b0 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 1 May 2016 13:56:42 -0400 Subject: TITANIC: Fix multi-line text writing --- engines/titanic/pet_control/pet_text.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/titanic/pet_control') diff --git a/engines/titanic/pet_control/pet_text.cpp b/engines/titanic/pet_control/pet_text.cpp index 1d2740249f..a4e00424fe 100644 --- a/engines/titanic/pet_control/pet_text.cpp +++ b/engines/titanic/pet_control/pet_text.cpp @@ -267,7 +267,7 @@ void CPetText::setMaxCharsPerLine(int maxChars) { void CPetText::updateStr3(int lineNum) { if (_field64 > 0 && _field68 > 0) { char line[5]; - line[0] = line[3] = TEXTCMD_26; + line[0] = line[3] = TEXTCMD_NPC; line[1] = _field64; line[2] = _field68; line[4] = '\0'; @@ -333,7 +333,7 @@ void CPetText::scrollToTop(CScreenManager *screenManager) { void CPetText::scrollToBottom(CScreenManager *screenManager) { int oldFontNumber = screenManager->setFontNumber(_fontNumber); - _scrollTop = _bounds.height(); + _scrollTop = getTextHeight(screenManager); constrainScrollDown(screenManager); screenManager->setFontNumber(oldFontNumber); } @@ -345,7 +345,7 @@ void CPetText::constrainScrollUp(CScreenManager *screenManager) { void CPetText::constrainScrollDown(CScreenManager *screenManager) { // Figure out the maximum scroll amount allowed - int maxScroll = _bounds.height() - getTextHeight(screenManager) - 4; + int maxScroll = getTextHeight(screenManager) - _bounds.height() - 4; if (maxScroll < 0) maxScroll = 0; -- cgit v1.2.3