aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2013-08-11 15:06:57 +0200
committeruruk2013-08-11 15:06:57 +0200
commit960c8b26302f4bd09ed5ac632077bfbddaff2a35 (patch)
tree11d9ca07472cab2b9ffa8b19c2a18adaf9625b1d
parent6a187a04ee3d1db26109e4aadae4c7da2d52dc52 (diff)
downloadscummvm-rg350-960c8b26302f4bd09ed5ac632077bfbddaff2a35.tar.gz
scummvm-rg350-960c8b26302f4bd09ed5ac632077bfbddaff2a35.tar.bz2
scummvm-rg350-960c8b26302f4bd09ed5ac632077bfbddaff2a35.zip
AVALANCHE: Improve comments in Scrolls::bubble().
-rw-r--r--engines/avalanche/scrolls2.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 94266f37a6..93d942afdb 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -516,6 +516,7 @@ void Scrolls::bubble(func2 gotoit) {
p[2].x = _vm->_gyro->talkx;
p[2].y = _vm->_gyro->talky;
+ // Backup the screen before drawing the bubble.
_vm->_graphics->_scrolls.copyFrom(_vm->_graphics->_surface);
// The body of the bubble.
@@ -537,7 +538,9 @@ void Scrolls::bubble(func2 gotoit) {
yl -= 3;
- // Draw the text of the bubble.
+ // Draw the text of the bubble. The centering of the text was improved here compared to Pascal's settextjustify().
+ // The font is not the same that outtextxy() uses in Pascal. I don't have that, so I used Gyro::characters instead.
+ // It's almost the same, only notable differences are '?', '!', etc.
for (fv = 0; fv < _vm->_gyro->scrolln; fv++) {
int16 x = _vm->_gyro->talkx - _vm->_gyro->scroll[fv].size() / 2 * 8;
bool offset = _vm->_gyro->scroll[fv].size() % 2;
@@ -555,6 +558,7 @@ void Scrolls::bubble(func2 gotoit) {
_vm->_gyro->on();
_vm->_gyro->dropsok = false;
+ // This does the actual drawing to the screen.
(this->*gotoit)();
_vm->_gyro->off();