diff options
author | Nicola Mettifogo | 2008-08-16 12:49:27 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2008-08-16 12:49:27 +0000 |
commit | b08a3885a82ee0fc18153f3bc4cb21eb15e78ecd (patch) | |
tree | 23143ff5c89014d999cc535d8be6f3e5a9ec54b1 /engines/parallaction | |
parent | 807bfe50796edd683d0aa026adc2cfbca7c490dd (diff) | |
download | scummvm-rg350-b08a3885a82ee0fc18153f3bc4cb21eb15e78ecd.tar.gz scummvm-rg350-b08a3885a82ee0fc18153f3bc4cb21eb15e78ecd.tar.bz2 scummvm-rg350-b08a3885a82ee0fc18153f3bc4cb21eb15e78ecd.zip |
Multiple balloons (answers) are now positioned correctly in BRA.
svn-id: r33939
Diffstat (limited to 'engines/parallaction')
-rw-r--r-- | engines/parallaction/balloons.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/engines/parallaction/balloons.cpp b/engines/parallaction/balloons.cpp index 9c8f50b583..06fdca8261 100644 --- a/engines/parallaction/balloons.cpp +++ b/engines/parallaction/balloons.cpp @@ -637,11 +637,11 @@ int BalloonManager_br::setDialogueBalloon(char *text, uint16 winding, byte textC if (winding == 0) { src = _rightBalloon; - srcFrame = id; + srcFrame = 0; } else if (winding == 1) { src = _leftBalloon; - srcFrame = 0; + srcFrame = id; } assert(src); @@ -657,16 +657,17 @@ int BalloonManager_br::setDialogueBalloon(char *text, uint16 winding, byte textC balloon->obj->y = balloon->box.top; balloon->obj->transparentKey = BALLOON_TRANSPARENT_COLOR_BR; - if (id > 0) { - balloon->obj->y += _intBalloons[id - 1].obj->y + _intBalloons[id - 1].box.height(); - } - _numBalloons++; return id; } -void BalloonManager_br::setBalloonText(uint id, char *text, byte textColor) { } +void BalloonManager_br::setBalloonText(uint id, char *text, byte textColor) { + Balloon *balloon = getBalloon(id); + + StringWriter_BR sw(_vm->_dialogueFont); + sw.write(text, MAX_BALLOON_WIDTH, textColor, balloon->surface); +} int BalloonManager_br::setLocationBalloon(char *text, bool endGame) { /* @@ -691,11 +692,9 @@ int BalloonManager_br::hitTestDialogueBalloon(int x, int y) { Common::Point p; for (uint i = 0; i < _numBalloons; i++) { - p.x = x - _intBalloons[i].obj->x; - p.y = y - _intBalloons[i].obj->y; - - if (_intBalloons[i].box.contains(p)) + if (_intBalloons[i].box.contains(x, y)) { return i; + } } return -1; |