From 2fe58fac489ecc21f062b0d10a1b388fc7abd1eb Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 13 Feb 2015 07:20:31 +0100 Subject: ACCESS: MM - Fix a bug in doBox_v1, implement some TYPE_3 code --- engines/access/bubble_box.cpp | 19 +++++++++++++++---- engines/access/bubble_box.h | 1 + 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'engines/access') diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp index d3254d4773..43333c9220 100644 --- a/engines/access/bubble_box.cpp +++ b/engines/access/bubble_box.cpp @@ -507,13 +507,24 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) { tmpY = BOXENDY = _vm->_screen->_orgY1; if (_type == TYPE_3) - BICONSTARTY = tmpY - 7; + BICONSTARTY = tmpY + 9; else BICONSTARTY = tmpY + 1; - if (_type == TYPE_3) - warning("TODO: Implement more of TYPE_3"); - + if (_type == TYPE_3) { + _fileStart = Common::Point((tmpX + 2) >> 3, (tmpY + 2) >> 3); + int rowOff = tmpY - (_fileStart.y << 3) + 1; + if (rowOff == 8) { + rowOff = 0; + ++_fileStart.y; + } + _fileOff.y = _rowOff = rowOff; + SETCURSORPOS(_fileStart.x, _fileStart.y); + _vm->_fonts._charFor._lo = 0xF7; + _vm->_fonts._charFor._hi = 0; + PRINTSTR("FILE: "); + _vm->_fonts._charFor._hi = 0xFF; + } _vm->_screen->_orgY1 = oldY; } diff --git a/engines/access/bubble_box.h b/engines/access/bubble_box.h index d279ed19c6..35b7ca2cdb 100644 --- a/engines/access/bubble_box.h +++ b/engines/access/bubble_box.h @@ -43,6 +43,7 @@ private: int _startItem, _startBox; int _charCol, _rowOff; Common::Point _fileStart; + Common::Point _fileOff; int BOXSTARTX, BOXSTARTY; int BOXENDX, BOXENDY; int BICONSTARTX, BICONSTARTY; -- cgit v1.2.3