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
This commit is contained in:
Torbjörn Andersson 2004-02-14 10:37:21 +00:00
parent 5ee96b4625
commit 7d9105b7ba
2 changed files with 17 additions and 0 deletions

View File

@ -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();

View File

@ -120,6 +120,7 @@ public:
#ifndef BACKEND_8BIT
void drawTextObject(SpriteInfo *s, uint8 *src);
void clearDisplay();
void updateDisplay(void);
#endif