aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-02-14 10:37:21 +0000
committerTorbjörn Andersson2004-02-14 10:37:21 +0000
commit7d9105b7ba6d5eb37149b07659ff596c715b612a (patch)
treec197815f190681fa16db8909a94ac3030eddedd1 /sword2
parent5ee96b4625a2bfa64ba2b06dc37527bf3238d851 (diff)
downloadscummvm-rg350-7d9105b7ba6d5eb37149b07659ff596c715b612a.tar.gz
scummvm-rg350-7d9105b7ba6d5eb37149b07659ff596c715b612a.tar.bz2
scummvm-rg350-7d9105b7ba6d5eb37149b07659ff596c715b612a.zip
Paint the overlay black at the end of the movie. Not all movies fade out on
their own, and sometimes the cutscene player will have to wait for the lead out to finish before returning to the game. (This will probably be true even after we fix the timing of the lead-outs.) svn-id: r12871
Diffstat (limited to 'sword2')
-rw-r--r--sword2/driver/animation.cpp16
-rw-r--r--sword2/driver/animation.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/sword2/driver/animation.cpp b/sword2/driver/animation.cpp
index d0840c691e..c20fb8498d 100644
--- a/sword2/driver/animation.cpp
+++ b/sword2/driver/animation.cpp
@@ -317,6 +317,13 @@ void AnimationState::drawTextObject(SpriteInfo *s, uint8 *src) {
}
}
+void AnimationState::clearDisplay(void) {
+ NewGuiColor black = _vm->_system->RGBToColor(0, 0, 0);
+
+ for (int i = 0; i < 640 * 480; i++)
+ overlay[i] = black;
+}
+
void AnimationState::updateDisplay(void) {
_vm->_system->copy_rect_overlay(overlay, 640, 0, 0, 640, 480);
}
@@ -518,6 +525,15 @@ int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], uint8 *mu
if (text)
closeTextObject(text[textCounter]);
+#ifndef BACKEND_8BIT
+ // Most movies fade to black on their own, but not all of them. Since
+ // we may be hanging around in the cutscene player for a while longer,
+ // waiting for the lead-out sound to finish, paint the overlay black.
+
+ anim->clearDisplay();
+ anim->updateDisplay();
+#endif
+
_vm->_graphics->clearScene();
_vm->_graphics->setNeedFullRedraw();
diff --git a/sword2/driver/animation.h b/sword2/driver/animation.h
index b1e17a104a..f87e074c7e 100644
--- a/sword2/driver/animation.h
+++ b/sword2/driver/animation.h
@@ -120,6 +120,7 @@ public:
#ifndef BACKEND_8BIT
void drawTextObject(SpriteInfo *s, uint8 *src);
+ void clearDisplay();
void updateDisplay(void);
#endif