DIRECTOR: Proper implementation of 'directToStage'

This commit is contained in:
Eugene Sandulenko 2020-08-23 20:31:48 +02:00
parent 806c946fd6
commit e8d9dfe62b
2 changed files with 32 additions and 32 deletions

View File

@ -487,20 +487,11 @@ void Score::renderSprites(uint16 frameId, RenderMode mode) {
_movie->_videoPlayback = false;
for (int pass = 0; pass < 2; pass++) {
for (uint16 i = 0; i < _channels.size(); i++) {
Channel *channel = _channels[i];
Sprite *currentSprite = channel->_sprite;
Sprite *nextSprite = _frames[frameId]->_sprites[i];
if (channel->isActiveVideo() && channel->isVideoDirectToStage()) {
if (pass == 0)
continue;
} else {
if (pass == 1)
continue;
}
// widget content has changed and needs a redraw.
// this doesn't include changes in dimension or position!
bool widgetRedrawn = channel->updateWidget();
@ -522,7 +513,6 @@ void Score::renderSprites(uint16 frameId, RenderMode mode) {
channel->setClean(nextSprite, i, true);
}
}
}
}
void Score::renderCursor(Common::Point pos) {

View File

@ -119,11 +119,21 @@ bool Window::render(bool forceRedraw, Graphics::ManagedSurface *blitTo) {
blitTo->fillRect(r, _stageColor);
_dirtyChannels = _currentMovie->getScore()->getSpriteIntersections(r);
for (int pass = 0; pass < 2; pass++) {
for (Common::List<Channel *>::iterator j = _dirtyChannels.begin(); j != _dirtyChannels.end(); j++) {
if ((*j)->isActiveVideo() && (*j)->isVideoDirectToStage()) {
if (pass == 0)
continue;
} else {
if (pass == 1)
continue;
}
if ((*j)->_visible)
inkBlitFrom(*j, r, blitTo);
}
}
}
_dirtyRects.clear();
_contentIsDirty = true;