mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
DIRECTOR: combine renderVideo and updateWidgets.
This commit is contained in:
parent
d69144fa18
commit
ecce34593e
@ -2291,10 +2291,7 @@ void LB::b_updateStage(int nargs) {
|
||||
|
||||
Score *score = movie->getScore();
|
||||
|
||||
score->updateWidget();
|
||||
if (movie->_videoPlayback)
|
||||
score->renderVideo();
|
||||
|
||||
score->updateWidgets(movie->_videoPlayback);
|
||||
movie->getWindow()->render();
|
||||
|
||||
// play any puppet sounds that have been queued
|
||||
|
@ -335,7 +335,7 @@ void Score::update() {
|
||||
|
||||
if (keepWaiting) {
|
||||
if (_movie->_videoPlayback) {
|
||||
renderVideo();
|
||||
updateWidgets(true);
|
||||
_window->render();
|
||||
}
|
||||
return;
|
||||
@ -619,22 +619,11 @@ void Score::renderCursor(Common::Point pos, bool forceUpdate) {
|
||||
_currentCursor = _defaultCursor.getRef();
|
||||
}
|
||||
|
||||
void Score::renderVideo() {
|
||||
void Score::updateWidgets(bool hasVideoPlayback) {
|
||||
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::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()) {
|
||||
if (cast && (cast->_type != kCastDigitalVideo || hasVideoPlayback) && cast->isModified()) {
|
||||
channel->replaceWidget();
|
||||
_window->addDirtyRect(channel->getBbox());
|
||||
}
|
||||
|
@ -113,8 +113,7 @@ public:
|
||||
void renderFrame(uint16 frameId, RenderMode mode = kRenderModeNormal);
|
||||
void renderSprites(uint16 frameId, RenderMode mode = kRenderModeNormal);
|
||||
void renderCursor(Common::Point pos, bool forceUpdate = false);
|
||||
void renderVideo();
|
||||
void updateWidget();
|
||||
void updateWidgets(bool hasVideoPlayback);
|
||||
|
||||
void playSoundChannel(uint16 frameId);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user