svn-id: r24533
This commit is contained in:
Travis Howell 2006-10-27 13:28:32 +00:00
parent f07fc242b3
commit 9f85511537
6 changed files with 14 additions and 22 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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;
}

View file

@ -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();
}
}

View file

@ -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)

View file

@ -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) {