diff options
author | Strangerke | 2015-01-21 01:10:37 +0100 |
---|---|---|
committer | Strangerke | 2015-01-21 01:10:37 +0100 |
commit | d7f37d213c37a8f0f92ac672a49fc77333b1036b (patch) | |
tree | 944506685340c6004b8b3f81380f94cb19788e82 | |
parent | f60a4d3e71e2de6a5159f0044874755671933d55 (diff) | |
download | scummvm-rg350-d7f37d213c37a8f0f92ac672a49fc77333b1036b.tar.gz scummvm-rg350-d7f37d213c37a8f0f92ac672a49fc77333b1036b.tar.bz2 scummvm-rg350-d7f37d213c37a8f0f92ac672a49fc77333b1036b.zip |
ACCESS: MM - Implement printWatch and clearWatch
-rw-r--r-- | engines/access/scripts.cpp | 43 | ||||
-rw-r--r-- | engines/access/scripts.h | 1 |
2 files changed, 43 insertions, 1 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 4e19659f75..cc8eb61012 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -172,8 +172,49 @@ void Scripts::charLoop() { _endFlag = endFlag; } +void Scripts::clearWatch() { + _vm->_events->hideCursor(); + _vm->_screen->_orgX1 = 128; + _vm->_screen->_orgY1 = 57; + _vm->_screen->_orgX2 = 228; + _vm->_screen->_orgY2 = 106; + _vm->_screen->_lColor = 0; + _vm->_screen->drawRect(); + + _vm->_events->showCursor(); +} + void Scripts::printWatch() { - error("TODO: printWatch"); + _vm->_fonts._charSet._lo = 8; + _vm->_fonts._charSet._hi = 2; + _vm->_fonts._charFor._lo = 2; + _vm->_fonts._charFor._hi = 255; + + _vm->_screen->_maxChars = 19; + _vm->_screen->_printOrg = Common::Point(128, 58); + _vm->_screen->_printStart = Common::Point(128, 58); + clearWatch(); + + Common::String msg = readString(); + Common::String line = ""; + int width = 0; + bool lastLine; + do { + lastLine = _vm->_fonts._font2.getLine(msg, _vm->_screen->_maxChars * 6, line, width); + warning("TODO: use printString"); + // Draw the text + _vm->_fonts._font2.drawString(_vm->_screen, line, _vm->_screen->_printOrg); + + _vm->_screen->_printOrg.y += 6; + _vm->_screen->_printOrg.x = _vm->_screen->_printStart.x; + + if (_vm->_screen->_printOrg.y == 106) { + _vm->_events->waitKeyMouse(); + clearWatch(); + _vm->_screen->_printOrg.y = _vm->_screen->_printStart.y; + } + } while (!lastLine); + _vm->_events->waitKeyMouse(); } void Scripts::findNull() { diff --git a/engines/access/scripts.h b/engines/access/scripts.h index 905137d944..b1a4120fc3 100644 --- a/engines/access/scripts.h +++ b/engines/access/scripts.h @@ -43,6 +43,7 @@ private: int _specialFunction; void charLoop(); + void clearWatch(); void printWatch(); protected: |