diff options
author | Strangerke | 2015-01-16 08:09:57 +0100 |
---|---|---|
committer | Strangerke | 2015-01-16 08:09:57 +0100 |
commit | 6f2b648b083d795e2b6148b1b60936e67c615a3a (patch) | |
tree | 9887428d5658b57a58bf25caf93fecbfbb8c7cff /engines | |
parent | 519ecbb7be987d8a2e01fb3687ef021b2afb16e6 (diff) | |
download | scummvm-rg350-6f2b648b083d795e2b6148b1b60936e67c615a3a.tar.gz scummvm-rg350-6f2b648b083d795e2b6148b1b60936e67c615a3a.tar.bz2 scummvm-rg350-6f2b648b083d795e2b6148b1b60936e67c615a3a.zip |
ACCESS: MM - Implement drawSelectBox
Diffstat (limited to 'engines')
-rw-r--r-- | engines/access/bubble_box.cpp | 48 | ||||
-rw-r--r-- | engines/access/bubble_box.h | 1 |
2 files changed, 42 insertions, 7 deletions
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp index 740512110e..e40001ae7a 100644 --- a/engines/access/bubble_box.cpp +++ b/engines/access/bubble_box.cpp @@ -288,8 +288,13 @@ void BubbleBox::doBox(int item, int box) { } void BubbleBox::SETCURSORPOS(int posX, int posY) { -// _vm->_screen->_printStart = _vm->_screen->_printOrg = Common::Point((posX << 3) + _rowOff, posY << 3); - warning("TODO: CURSORSET"); + _vm->_screen->_printStart = _vm->_screen->_printOrg = Common::Point((posX << 3) + _rowOff, posY << 3); + warning("Missing call to SETCURSOR"); +} + +void BubbleBox::PRINTSTR(Common::String msg) { + warning("TODO: Proper implementation of PRINTSTR"); + _vm->_fonts._font1.drawString(_vm->_screen, msg, _vm->_screen->_printOrg); } void BubbleBox::displayBoxData() { @@ -330,11 +335,9 @@ void BubbleBox::displayBoxData() { idx += _vm->BOXDATASTART; while (true) { -// SETCURSORPOS(BOXPSTARTX, BOXPSTARTY); - 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)); + SETCURSORPOS(BOXPSTARTX, BOXPSTARTY); + PRINTSTR(_tempListPtr[idx]); - warning("TODO: PRINTSTR"); ++idx; ++BOXPSTARTY; ++_vm->BCNT; @@ -354,7 +357,38 @@ void BubbleBox::displayBoxData() { } void BubbleBox::drawSelectBox() { - warning("TODO drawSelectBox"); + if (_tempListPtr[0].size() == 0) + return; + + if (((_type != TYPE_1) && (_type != TYPE_3)) || !_vm->BCNT) + return; + + if (_vm->BOXSELECTYOLD != -1) { + _vm->_events->hideCursor(); + _vm->_screen->_lColor = 0xFA; + + int val = _vm->BOXSELECTYOLD + BOXPSTARTY + 1; + _vm->_screen->_orgY1 = (val << 3) + 2; + _vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 7; + _vm->_screen->_orgX1 = BOXSTARTX; + _vm->_screen->_orgX2 = BOXENDX; + _vm->_screen->drawBox(); + _vm->_events->showCursor(); + } + + _vm->_events->hideCursor(); + _vm->BOXSELECTYOLD = _vm->BOXSELECTY; + int val = BOXPSTARTY + _vm->BOXSELECTY + 1; + _vm->_screen->_orgY1 = (val << 3) + 2; + _vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 7; + _vm->_screen->_orgX1 = BOXSTARTX; + _vm->_screen->_orgX2 = BOXENDX; + _vm->_screen->_lColor = 0xFE; + _vm->_screen->drawBox(); + _vm->_events->showCursor(); + + if (_type == TYPE_3) + warning("TODO: List filenames"); } int BubbleBox::doBox_v1(int item, int box, int &type) { diff --git a/engines/access/bubble_box.h b/engines/access/bubble_box.h index 15dee099d0..52ee497106 100644 --- a/engines/access/bubble_box.h +++ b/engines/access/bubble_box.h @@ -97,6 +97,7 @@ public: int doBox_v1(int item, int box, int &type); void getList(const char *data[], int *flags); void SETCURSORPOS(int posX, int posY); + void PRINTSTR(Common::String msg); }; } // End of namespace Access |