diff options
-rw-r--r-- | engines/agos/agos.h | 2 | ||||
-rw-r--r-- | engines/agos/charset.cpp | 16 | ||||
-rw-r--r-- | engines/agos/input.cpp | 5 | ||||
-rw-r--r-- | engines/agos/script.cpp | 5 | ||||
-rw-r--r-- | engines/agos/string.cpp | 2 | ||||
-rw-r--r-- | engines/agos/window.cpp | 6 |
6 files changed, 14 insertions, 22 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 2e96635aae..624387c239 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -821,7 +821,7 @@ protected: void permitInput(); uint getFeebleFontSize(byte chr); - void justifyStart(uint a, uint b); + void justifyStart(); void justifyOutPut(byte chr); void loadZone(uint zoneNum); diff --git a/engines/agos/charset.cpp b/engines/agos/charset.cpp index cf14bd5ec0..6650581eef 100644 --- a/engines/agos/charset.cpp +++ b/engines/agos/charset.cpp @@ -314,10 +314,7 @@ void AGOSEngine::showMessageFormat(const char *s, ...) { openTextWindow(); if (!_showMessageFlag) { _windowArray[0] = _textWindow; - if (getGameType() == GType_FF || getGameType() == GType_PP) - justifyStart(_textWindow->textColumn, _textWindow->width); - else - justifyStart(_textWindow->textLength, _textWindow->textMaxLength); + justifyStart(); } _showMessageFlag = true; _fcsData1[_curWindow] = 1; @@ -327,9 +324,14 @@ void AGOSEngine::showMessageFormat(const char *s, ...) { justifyOutPut(*str); } -void AGOSEngine::justifyStart(uint a, uint b) { - _printCharCurPos = a; - _printCharMaxPos = b; +void AGOSEngine::justifyStart() { + if (getGameType() == GType_FF || getGameType() == GType_PP) { + _printCharCurPos = _textWindow->textColumn; + _printCharMaxPos = _textWindow->width; + } else { + _printCharCurPos = _textWindow->textLength; + _printCharMaxPos = _textWindow->textMaxLength; + } _printCharPixelCount = 0; _numLettersToPrint = 0; _newLines = 0; diff --git a/engines/agos/input.cpp b/engines/agos/input.cpp index 993cc49b3b..6729cf7da0 100644 --- a/engines/agos/input.cpp +++ b/engines/agos/input.cpp @@ -432,10 +432,7 @@ void AGOSEngine::permitInput() { _curWindow = 0; if (_windowArray[0] != 0) { _textWindow = _windowArray[0]; - if (getGameType() == GType_FF || getGameType() == GType_PP) - justifyStart(_textWindow->textColumn, _textWindow->width); - else - justifyStart(_textWindow->textLength, _textWindow->textMaxLength); + justifyStart(); } _mortalFlag = false; } diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index ef0b07a547..1186ebb14d 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -667,10 +667,7 @@ void AGOSEngine::o_defWindow() { if (num == _curWindow) { _textWindow = _windowArray[num]; - if (getGameType() == GType_FF || getGameType() == GType_PP) - justifyStart(_textWindow->textColumn, _textWindow->width); - else - justifyStart(_textWindow->textLength, _textWindow->textMaxLength); + justifyStart(); } } diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index 2bd7f76db8..2b999a6eca 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -726,7 +726,7 @@ void AGOSEngine::printBox() { _textWindow->textRow = 0; _textWindow->textColumnOffset = 0; _textWindow->textLength = 0; - justifyStart(_textWindow->textLength, _textWindow->textMaxLength); + justifyStart(); waitForSync(99); BoxBufferPtr = _boxBuffer; while (*BoxBufferPtr) diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp index 129ad193ba..61921b5a94 100644 --- a/engines/agos/window.cpp +++ b/engines/agos/window.cpp @@ -78,11 +78,7 @@ void AGOSEngine::changeWindow(uint a) { _curWindow = a; justifyOutPut(0); _textWindow = _windowArray[a]; - - if (getGameType() == GType_FF || getGameType() == GType_PP) - justifyStart(_textWindow->textColumn, _textWindow->width); - else - justifyStart(_textWindow->textLength, _textWindow->textMaxLength); + justifyStart(); } void AGOSEngine::closeWindow(uint a) { |