aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-09-06 10:44:04 -0400
committerPaul Gilbert2014-09-06 10:44:04 -0400
commit9ef68900e24ea75e3965795deeb234d4aad6cffc (patch)
tree2ddeb0ddbec98c1647dd16d9aea0c3e20841da57 /engines
parent556414e53ac6b12e6fbc2d1b3df0a5fca628119d (diff)
downloadscummvm-rg350-9ef68900e24ea75e3965795deeb234d4aad6cffc.tar.gz
scummvm-rg350-9ef68900e24ea75e3965795deeb234d4aad6cffc.tar.bz2
scummvm-rg350-9ef68900e24ea75e3965795deeb234d4aad6cffc.zip
MADS: Fix text not properly being erased when showing quotes
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/nebular/menu_nebular.cpp11
-rw-r--r--engines/mads/nebular/menu_nebular.h1
2 files changed, 9 insertions, 3 deletions
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index d7d98a55cf..a217ba684d 100644
--- a/engines/mads/nebular/menu_nebular.cpp
+++ b/engines/mads/nebular/menu_nebular.cpp
@@ -639,8 +639,9 @@ void TextView::processText() {
// Add the new line to the list of pending lines
TextLine tl;
- tl._pos = Common::Point(xStart, 155);
+ tl._pos = Common::Point(xStart, MADS_SCENE_HEIGHT);
tl._line = _currentLine;
+ tl._textDisplayIndex = -1;
_textLines.push_back(tl);
}
@@ -740,14 +741,18 @@ void TextView::doFrame() {
}
// Scroll all active text lines up
- scene._textDisplay.reset();
for (int i = _textLines.size() - 1; i >= 0; --i) {
TextLine &tl = _textLines[i];
+ if (tl._textDisplayIndex != -1)
+ // Expire the text line that's already on-screen
+ scene._textDisplay.expire(tl._textDisplayIndex);
+
tl._pos.y--;
if (tl._pos.y < 0) {
_textLines.remove_at(i);
} else {
- scene._textDisplay.add(tl._pos.x, tl._pos.y, 0x605, -1, tl._line, _font);
+ tl._textDisplayIndex = scene._textDisplay.add(tl._pos.x, tl._pos.y,
+ 0x605, -1, tl._line, _font);
}
}
diff --git a/engines/mads/nebular/menu_nebular.h b/engines/mads/nebular/menu_nebular.h
index ede4a23970..a22cb422b8 100644
--- a/engines/mads/nebular/menu_nebular.h
+++ b/engines/mads/nebular/menu_nebular.h
@@ -151,6 +151,7 @@ public:
struct TextLine {
Common::Point _pos;
Common::String _line;
+ int _textDisplayIndex;
};
/**