DIRECTOR: introduce updateWidget to fix updateStage.

This commit is contained in:
ysj1173886760 2021-08-20 20:53:44 +08:00
parent 4bec36f93f
commit d69144fa18
3 changed files with 13 additions and 0 deletions

View File

@ -2291,6 +2291,7 @@ void LB::b_updateStage(int nargs) {
Score *score = movie->getScore();
score->updateWidget();
if (movie->_videoPlayback)
score->renderVideo();

View File

@ -630,6 +630,17 @@ void Score::renderVideo() {
}
}
void Score::updateWidget() {
for (uint16 i = 0; i < _channels.size(); i++) {
Channel *channel = _channels[i];
CastMember *cast = channel->_sprite->_cast;
if (cast && cast->_type != kCastDigitalVideo && cast->isModified()) {
channel->replaceWidget();
_window->addDirtyRect(channel->getBbox());
}
}
}
void Score::screenShot() {
Graphics::Surface rawSurface = _window->getSurface()->rawSurface();
const Graphics::PixelFormat requiredFormat_4byte(4, 8, 8, 8, 8, 0, 8, 16, 24);

View File

@ -114,6 +114,7 @@ public:
void renderSprites(uint16 frameId, RenderMode mode = kRenderModeNormal);
void renderCursor(Common::Point pos, bool forceUpdate = false);
void renderVideo();
void updateWidget();
void playSoundChannel(uint16 frameId);