[Scummvm-cvs-logs] scummvm master -> 9ef68900e24ea75e3965795deeb234d4aad6cffc
dreammaster
dreammaster at scummvm.org
Sat Sep 6 16:45:19 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9ef68900e2 MADS: Fix text not properly being erased when showing quotes
Commit: 9ef68900e24ea75e3965795deeb234d4aad6cffc
https://github.com/scummvm/scummvm/commit/9ef68900e24ea75e3965795deeb234d4aad6cffc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-09-06T10:44:04-04:00
Commit Message:
MADS: Fix text not properly being erased when showing quotes
Changed paths:
engines/mads/nebular/menu_nebular.cpp
engines/mads/nebular/menu_nebular.h
diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp
index d7d98a5..a217ba6 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 ede4a23..a22cb42 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;
};
/**
More information about the Scummvm-git-logs
mailing list