diff options
author | Strangerke | 2015-01-16 01:32:01 +0100 |
---|---|---|
committer | Strangerke | 2015-01-16 01:32:01 +0100 |
commit | 519ecbb7be987d8a2e01fb3687ef021b2afb16e6 (patch) | |
tree | 1bab2f0886cf7665f0744bd2aca9220a7ff19e40 | |
parent | 0c14e42bd2dcbbc1029b835cd379c163345468ad (diff) | |
download | scummvm-rg350-519ecbb7be987d8a2e01fb3687ef021b2afb16e6.tar.gz scummvm-rg350-519ecbb7be987d8a2e01fb3687ef021b2afb16e6.tar.bz2 scummvm-rg350-519ecbb7be987d8a2e01fb3687ef021b2afb16e6.zip |
ACCESS: MM - Initial string display in doBox_v1
-rw-r--r-- | engines/access/bubble_box.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp index f0d3c8baef..740512110e 100644 --- a/engines/access/bubble_box.cpp +++ b/engines/access/bubble_box.cpp @@ -331,7 +331,8 @@ void BubbleBox::displayBoxData() { while (true) { // SETCURSORPOS(BOXPSTARTX, BOXPSTARTY); -// _vm->_fonts._font1.drawString(_vm->_screen, _tempListPtr[idx], Common::Point((BOXPSTARTX << 3) + _rowOff, BOXPSTARTY << 3)); + warning("%d %d -> %d %d", BOXPSTARTX, BOXPSTARTY, (BOXPSTARTX << 3) + _rowOff, BOXPSTARTY << 3); + _vm->_fonts._font1.drawString(_vm->_screen, _tempListPtr[idx], Common::Point((BOXPSTARTX << 3) + _rowOff, BOXPSTARTY << 3)); warning("TODO: PRINTSTR"); ++idx; @@ -492,27 +493,28 @@ int BubbleBox::doBox_v1(int item, int box, int &type) { } int len = _bubbleDisplStr.size(); - int ax = _bounds.top >> 3; - ax -= len; - ax /= 2; - int cx = _bounds.left >> 3; - BOXPSTARTX = cx; - ax += cx << 16; - - cx = _bounds.right >> 3; - int bp = _bounds.right - (cx << 3) + 1; + int newX = _bounds.top >> 3; + newX = (len - newX) / 2; + + BOXPSTARTX = _bounds.left >> 3; + newX += BOXPSTARTX; + + int newY = _bounds.top >> 3; + int bp = _bounds.top - (newY << 3) + 1; if (bp == 8) { - ++cx; + ++newY; bp = 0; } _rowOff = bp; - BOXPSTARTY = cx; - ax += cx; + BOXPSTARTY = newY; - _vm->_fonts._charFor._lo = -1; - _vm->_events->setCursor(CURSOR_ARROW); + // setcursorpos + _vm->_screen->_printOrg.y = _vm->_screen->_printStart.y = (newY << 3) + _rowOff; + _vm->_screen->_printOrg.x = _vm->_screen->_printStart.x = (newX << 3); + // + _vm->_fonts._charFor._lo = -1; _vm->_fonts._font1.drawString(_vm->_screen, _bubbleDisplStr, _vm->_screen->_printOrg); if (_type == TYPE_2) { |