aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parallaction.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-01-06 19:29:41 +0000
committerNicola Mettifogo2008-01-06 19:29:41 +0000
commitdb51514dd389b7177eaa11eb1ce5b40fb36b4b3c (patch)
tree310d049d2d1738e6113fdb650c637d2e818f502d /engines/parallaction/parallaction.cpp
parent84e5398b1cf8b1758f2b4bad916ec279f33161ca (diff)
downloadscummvm-rg350-db51514dd389b7177eaa11eb1ce5b40fb36b4b3c.tar.gz
scummvm-rg350-db51514dd389b7177eaa11eb1ce5b40fb36b4b3c.tar.bz2
scummvm-rg350-db51514dd389b7177eaa11eb1ce5b40fb36b4b3c.zip
Moved balloons management into Gfx, which is now responsible for positioning and drawing. All balloons are now drawn on a different layer than the game graphics, thus simplifying screen management. Dialogue code has undergone a major revision, and the superior implementation of answer selection in the Amiga version is now used in place of the poor PC one. Other bits (where some changes had already been introduced) have been updated, too.
svn-id: r30311
Diffstat (limited to 'engines/parallaction/parallaction.cpp')
-rw-r--r--engines/parallaction/parallaction.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index e4f936cda8..45a1d1631b 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -841,23 +841,7 @@ void Parallaction::setBackground(const char* name, const char* mask, const char*
}
void Parallaction::showLocationComment(const char *text, bool end) {
-
- _gfx->setFont(_dialogueFont);
-
- int16 w, h;
- _gfx->getStringExtent(const_cast<char*>(text), 130, &w, &h);
-
- Common::Rect r(w + (end ? 5 : 10), h + 5);
- r.moveTo(5, 5);
-
- _gfx->floodFill(Gfx::kBitFront, r, 0);
- r.grow(-2);
- _gfx->floodFill(Gfx::kBitFront, r, 1);
- _gfx->displayWrappedString(const_cast<char*>(text), 3, 5, 0, 130);
-
- _gfx->updateScreen();
-
- return;
+ _gfx->setLocationBalloon(const_cast<char*>(text), end);
}
@@ -891,12 +875,10 @@ void Parallaction::doLocationEnterTransition() {
drawAnimations();
_gfx->swapBuffers();
- _gfx->copyScreen(Gfx::kBitFront, Gfx::kBitBack);
showLocationComment(_location._comment, false);
waitUntilLeftClick();
-
- _gfx->copyScreen(Gfx::kBitBack, Gfx::kBitFront );
+ _gfx->freeBalloons();
// fades maximum intensity palette towards approximation of main palette
for (uint16 _si = 0; _si<6; _si++) {