diff options
author | Florian Kagerer | 2009-10-09 17:31:01 +0000 |
---|---|---|
committer | Florian Kagerer | 2009-10-09 17:31:01 +0000 |
commit | 7825128639355fa66ec897dbc0779c6403f559e0 (patch) | |
tree | 2459c3439204534f02c503194ef5ad85c5cfdf69 /engines/kyra | |
parent | efb1c33715606d94f12e169669104f72a4423ce4 (diff) | |
download | scummvm-rg350-7825128639355fa66ec897dbc0779c6403f559e0.tar.gz scummvm-rg350-7825128639355fa66ec897dbc0779c6403f559e0.tar.bz2 scummvm-rg350-7825128639355fa66ec897dbc0779c6403f559e0.zip |
LOL/PC-98: fixed minor bugs in text displayer
svn-id: r44834
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/lol.cpp | 12 | ||||
-rw-r--r-- | engines/kyra/script_tim.cpp | 5 | ||||
-rw-r--r-- | engines/kyra/text_lol.cpp | 37 |
3 files changed, 42 insertions, 12 deletions
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 8f1e9d40a2..bfc530bf58 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -1579,7 +1579,7 @@ void LoLEngine::initDialogueSequence(int controlMode, int pageNum) { } else { _screen->fillRect(0, 128, 319, 199, 1); gui_drawBox(0, 129, 320, 71, 136, 251, -1); - gui_drawBox(1, 130, 318, 69, 136, 251, 252); + gui_drawBox(1, 130, 318, 69, 136, 251, 252); } _screen->modifyScreenDim(5, 8, 131, 306, 66); @@ -2510,7 +2510,10 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) { int sH = ((fb->progress / 8 + shp[2] + fireBallWH) << 8) / shp[2]; if (fb->finalize) { - _screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH); + if (_flags.use16ColorMode) + _screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 4, sW, sH); + else + _screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH); if (finShpIndex2[fb->finProgress] != -1) { shp = _fireballShapes[finShpIndex2[fb->finProgress]]; @@ -2522,7 +2525,10 @@ int LoLEngine::processMagicFireball(int charNum, int spellLevel) { } } else { - _screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH); + if (_flags.use16ColorMode) + _screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 4, sW, sH); + else + _screen->drawShape(_screen->_curPage, shp, fX, fY, 0, 0x1004, _trueLightTable1, _trueLightTable2, sW, sH); } if (fb->finalize) { diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 175cada45d..3f34fb6f09 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -1274,7 +1274,10 @@ uint16 TIMInterpreter_LoL::processDialogue() { _screen->fillRect(d->sx, d->sy + d->h - 9, d->sx + d->w - 1, d->sy + d->h - 1, d->unkA); } else { const ScreenDim *d = _screen->_curDim; - _screen->fillRect(d->sx, d->sy, d->sx + d->w - (_vm->gameFlags().use16ColorMode ? 3 : 2), d->sy + d->h - 1, d->unkA); + if (_vm->gameFlags().use16ColorMode) + _screen->fillRect(d->sx, d->sy, d->sx + d->w - 3, d->sy + d->h - 2, d->unkA); + else + _screen->fillRect(d->sx, d->sy, d->sx + d->w - 2, d->sy + d->h - 1, d->unkA); _vm->_txt->clearDim(4); _vm->_txt->resetDimTextPositions(4); } diff --git a/engines/kyra/text_lol.cpp b/engines/kyra/text_lol.cpp index fda46f2dfa..a327d88054 100644 --- a/engines/kyra/text_lol.cpp +++ b/engines/kyra/text_lol.cpp @@ -63,9 +63,22 @@ TextDisplayer_LoL::~TextDisplayer_LoL() { void TextDisplayer_LoL::setupField(bool mode) { if (_vm->textEnabled()) { + + int y = 142; + int h = 37; + int stepY = 3; + int stepH = 1; + + if (_vm->gameFlags().use16ColorMode) { + y = 140; + h = 39; + stepY = 4; + stepH = 2; + } + if (mode) { _screen->copyRegionToBuffer(3, 0, 0, 320, 40, _vm->_pageBuffer1); - _screen->copyRegion(80, 142, 0, 0, 240, 37, 0, 3, Screen::CR_NO_P_CHECK); + _screen->copyRegion(80, y, 0, 0, 240, h, 0, 3, Screen::CR_NO_P_CHECK); _screen->copyRegionToBuffer(3, 0, 0, 320, 40, _vm->_pageBuffer2); _screen->copyBlockToPage(3, 0, 0, 320, 40, _vm->_pageBuffer1); } else { @@ -73,11 +86,11 @@ void TextDisplayer_LoL::setupField(bool mode) { int cp = _screen->setCurPage(2); _screen->copyRegionToBuffer(3, 0, 0, 320, 40, _vm->_pageBuffer1); _screen->copyBlockToPage(3, 0, 0, 320, 40, _vm->_pageBuffer2); - _screen->copyRegion(0, 0, 80, 142, 240, 37, 3, _screen->_curPage, Screen::CR_NO_P_CHECK); + _screen->copyRegion(0, 0, 80, y, 240, h, 3, _screen->_curPage, Screen::CR_NO_P_CHECK); for (int i = 177; i > 141; i--) { uint32 endTime = _vm->_system->getMillis() + _vm->_tickLength; - _screen->copyRegion(83, i, 83, i - 1, 235, 3, 0, 0, Screen::CR_NO_P_CHECK); + _screen->copyRegion(83, i - stepH + 1, 83, i - stepH, 235, stepY, 0, 0, Screen::CR_NO_P_CHECK); _screen->copyRegion(83, i + 1, 83, i + 1, 235, 1, 2, 0, Screen::CR_NO_P_CHECK); _vm->updateInput(); _screen->updateScreen(); @@ -105,14 +118,22 @@ void TextDisplayer_LoL::expandField() { _vm->_timer->disable(11); _screen->setScreenDim(clearDim(3)); _screen->copyRegionToBuffer(3, 0, 0, 320, 10, tmp); - if (_vm->gameFlags().use16ColorMode) - _screen->copyRegion(83, 139, 0, 0, 235, 4, 0, 2, Screen::CR_NO_P_CHECK); - else - _screen->copyRegion(83, 140, 0, 0, 235, 3, 0, 2, Screen::CR_NO_P_CHECK); + + int y = 140; + int h = 3; + int stepH = 0; + + if (_vm->gameFlags().use16ColorMode) { + y = 139; + h = 4; + stepH = 1; + } + + _screen->copyRegion(83, y, 0, 0, 235, h, 0, 2, Screen::CR_NO_P_CHECK); for (int i = 140; i < 177; i++) { uint32 endTime = _vm->_system->getMillis() + _vm->_tickLength; - _screen->copyRegion(0, 0, 83, i, 235, 3, 2, 0, Screen::CR_NO_P_CHECK); + _screen->copyRegion(0, 0, 83, i - stepH, 235, h, 2, 0, Screen::CR_NO_P_CHECK); _vm->updateInput(); _screen->updateScreen(); _vm->delayUntil(endTime); |