AGS: Clear dest rect before calling transBlit in play_video

When playing a stretched video, clear the destination rect to avoid the
frames being drawn on top of each other.
Fixes intro video in Pleurghburg Dark Ages
This commit is contained in:
Walter Agazzi 2023-10-30 19:56:39 +01:00
parent 3cc56da41c
commit fa71aeadf8

View File

@ -98,9 +98,10 @@ static bool play_video(Video::VideoDecoder *decoder, const char *name, int flags
stretchVideo = false;
if (stretchVideo) {
scr.fillRect(Common::Rect(dstRect.Left, dstRect.Top, dstRect.Right + 1, dstRect.Bottom + 1), 0);
scr.transBlitFrom(*frame, Common::Rect(0, 0, frame->w, frame->h),
Common::Rect(dstRect.Left, dstRect.Top, dstRect.Right + 1, dstRect.Bottom + 1),
decoder->getPalette());
Common::Rect(dstRect.Left, dstRect.Top, dstRect.Right + 1, dstRect.Bottom + 1),
decoder->getPalette());
} else {
scr.blitFrom(*frame, Common::Point(dstRect.Left, dstRect.Top), decoder->getPalette());
}