aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control
diff options
context:
space:
mode:
authorPaul Gilbert2016-05-01 13:56:42 -0400
committerPaul Gilbert2016-07-10 16:38:00 -0400
commitf01b8e9c45e3349c84346f270c17610b0e5350b0 (patch)
treef6169ad8205219c3d451c6a81b91b64333525b91 /engines/titanic/pet_control
parent21f98fff46e48e79d3e977d4f20edf90022a825a (diff)
downloadscummvm-rg350-f01b8e9c45e3349c84346f270c17610b0e5350b0.tar.gz
scummvm-rg350-f01b8e9c45e3349c84346f270c17610b0e5350b0.tar.bz2
scummvm-rg350-f01b8e9c45e3349c84346f270c17610b0e5350b0.zip
TITANIC: Fix multi-line text writing
Diffstat (limited to 'engines/titanic/pet_control')
-rw-r--r--engines/titanic/pet_control/pet_text.cpp6
1 files changed, 3 insertions, 3 deletions
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;