diff options
author | Strangerke | 2014-12-18 07:23:18 +0100 |
---|---|---|
committer | Strangerke | 2014-12-18 07:23:18 +0100 |
commit | 3fca9d42f3ff6d19eba40d09754cc794f8e17585 (patch) | |
tree | 00f68c019030c0d98e67cf26ed529512b24ca7ef /engines/access/bubble_box.cpp | |
parent | 7895c5408c37c54dcb5c30ddf7ae09f91052d768 (diff) | |
download | scummvm-rg350-3fca9d42f3ff6d19eba40d09754cc794f8e17585.tar.gz scummvm-rg350-3fca9d42f3ff6d19eba40d09754cc794f8e17585.tar.bz2 scummvm-rg350-3fca9d42f3ff6d19eba40d09754cc794f8e17585.zip |
ACCESS: Use Common::String to display bubble box text
Diffstat (limited to 'engines/access/bubble_box.cpp')
-rw-r--r-- | engines/access/bubble_box.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp index 572567c3a3..e37a8142e8 100644 --- a/engines/access/bubble_box.cpp +++ b/engines/access/bubble_box.cpp @@ -29,7 +29,7 @@ namespace Access { BubbleBox::BubbleBox(AccessEngine *vm) : Manager(vm) { _type = TYPE_2; _bounds = Common::Rect(64, 32, 64 + 130, 32 + 122); - _bubblePtr = nullptr; + _bubbleDisplStr = ""; _fieldD = 0; _fieldE = 0; _fieldF = 0; @@ -43,7 +43,7 @@ void BubbleBox::load(Common::SeekableReadStream *stream) { while ((v = stream->readByte()) != 0) _bubbleTitle += (char)v; - _bubblePtr = _bubbleTitle.c_str(); + _bubbleDisplStr = _bubbleTitle; } void BubbleBox::clearBubbles() { @@ -90,7 +90,7 @@ void BubbleBox::calcBubble(const Common::String &msg) { if (_type == TYPE_4) { _vm->_fonts._printMaxX = 110; } else { - _vm->_fonts._printMaxX = _vm->_fonts._font2.stringWidth(_bubblePtr); + _vm->_fonts._printMaxX = _vm->_fonts._font2.stringWidth(_bubbleDisplStr); } // Start of with a rect with the given starting x and y @@ -257,13 +257,13 @@ void BubbleBox::doBox(int item, int box) { } // Handle drawing title - int titleWidth = _vm->_fonts._font2.stringWidth(_bubblePtr); + int titleWidth = _vm->_fonts._font2.stringWidth(_bubbleDisplStr); Font &font2 = _vm->_fonts._font2; font2._fontColors[0] = 0; font2._fontColors[1] = 3; font2._fontColors[2] = 2; font2._fontColors[3] = 1; - font2.drawString(_vm->_screen, _bubblePtr, Common::Point( + font2.drawString(_vm->_screen, _bubbleDisplStr, Common::Point( _bounds.left + (_bounds.width() / 2) - (titleWidth / 2), _bounds.top + 1)); // Restore positional state |