diff options
author | Strangerke | 2014-08-25 23:34:40 +0200 |
---|---|---|
committer | Strangerke | 2014-08-25 23:34:40 +0200 |
commit | 7d0392aa83a44b075cedd8d669a61f26dcb82c3b (patch) | |
tree | d2a5479cf92c5d7d1b5bbbe62c32e2617e36becf | |
parent | 8c059add8b25cbabd499fe9ef6e69da563a3b913 (diff) | |
download | scummvm-rg350-7d0392aa83a44b075cedd8d669a61f26dcb82c3b.tar.gz scummvm-rg350-7d0392aa83a44b075cedd8d669a61f26dcb82c3b.tar.bz2 scummvm-rg350-7d0392aa83a44b075cedd8d669a61f26dcb82c3b.zip |
ACCESS: Move _maxChars to asurface
-rw-r--r-- | engines/access/access.cpp | 4 | ||||
-rw-r--r-- | engines/access/asurface.h | 1 | ||||
-rw-r--r-- | engines/access/bubble_box.cpp | 8 | ||||
-rw-r--r-- | engines/access/bubble_box.h | 1 | ||||
-rw-r--r-- | engines/access/scripts.cpp | 4 |
5 files changed, 8 insertions, 10 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp index 97ffc134be..47d77e777c 100644 --- a/engines/access/access.cpp +++ b/engines/access/access.cpp @@ -273,7 +273,7 @@ void AccessEngine::speakText(Common::Array<Common::String> msgArr) { Common::String line; int width = 0; - bool lastLine = _fonts._font2.getLine(msgArr[curPage], _bubbleBox->_maxChars * 6, line, width); + bool lastLine = _fonts._font2.getLine(msgArr[curPage], _screen->_maxChars * 6, line, width); // Set font colors _fonts._font2._fontColors[0] = 0; _fonts._font2._fontColors[1] = 28; @@ -363,7 +363,7 @@ void AccessEngine::doEstablish(int esatabIndex, int sub) { _fonts._charFor._lo = 29; _fonts._charFor._hi = 32; - _bubbleBox->_maxChars = 37; + _screen->_maxChars = 37; _screen->_printOrg = _screen->_printStart = Common::Point(48, 35); loadEstablish(sub); _et = sub; diff --git a/engines/access/asurface.h b/engines/access/asurface.h index 262d41400a..5d1f6fd307 100644 --- a/engines/access/asurface.h +++ b/engines/access/asurface.h @@ -54,6 +54,7 @@ public: Common::Point _printOrg; Common::Point _printStart; + int _maxChars; static void init(); public: diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp index 56d7157e8d..d3782a3125 100644 --- a/engines/access/bubble_box.cpp +++ b/engines/access/bubble_box.cpp @@ -34,8 +34,6 @@ BubbleBox::BubbleBox(AccessEngine *vm) : Manager(vm) { _fieldE = 0; _fieldF = 0; _field10 = 0; - - _maxChars = 0; } void BubbleBox::load(Common::SeekableReadStream *stream) { @@ -53,7 +51,7 @@ void BubbleBox::clearBubbles() { } void BubbleBox::placeBubble(const Common::String &msg) { - BubbleBox::_maxChars = 27; + _vm->_screen->_maxChars = 27; placeBubble1(msg); } @@ -93,7 +91,7 @@ void BubbleBox::calcBubble(const Common::String &msg) { int width = 0; bool lastLine; do { - lastLine = _vm->_fonts._font2.getLine(s, _maxChars * 6, line, width); + lastLine = _vm->_fonts._font2.getLine(s, _vm->_screen->_maxChars * 6, line, width); _vm->_fonts._printMaxX = MAX(width, _vm->_fonts._printMaxX); _vm->_screen->_printOrg.y += 6; @@ -139,7 +137,7 @@ void BubbleBox::printBubble(const Common::String &msg) { do { // Get next line Font &font2 = _vm->_fonts._font2; - lastLine = font2.getLine(s, _maxChars * 6, line, width); + lastLine = font2.getLine(s, _vm->_screen->_maxChars * 6, line, width); // Set font colors font2._fontColors[0] = 0; diff --git a/engines/access/bubble_box.h b/engines/access/bubble_box.h index 3ddb2f72e3..7b25a58183 100644 --- a/engines/access/bubble_box.h +++ b/engines/access/bubble_box.h @@ -54,7 +54,6 @@ public: int _fieldF; int _field10; - int _maxChars; Common::Array<Common::Rect> _bubbles; public: BubbleBox(AccessEngine *vm); diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index d6f65a69c9..833aff337a 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -503,7 +503,7 @@ void Scripts::cmdCharSpeak() { void Scripts::cmdTexSpeak() { _vm->_screen->_printOrg = _texsOrg; _vm->_screen->_printStart = _texsOrg; - _vm->_bubbleBox->_maxChars = 20; + _vm->_screen->_maxChars = 20; byte v; Common::String tmpStr = ""; @@ -540,8 +540,8 @@ void Scripts::cmdTexChoice() { _vm->_fonts._charSet._hi = 8; _vm->_fonts._charFor._lo = 55; _vm->_fonts._charFor._hi = 255; - _vm->_bubbleBox->_maxChars = 20; + _vm->_screen->_maxChars = 20; _vm->_screen->_printOrg = _texsOrg; _vm->_screen->_printStart = _texsOrg; |