aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorDmitry Iskrich2016-05-31 22:41:20 +0300
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commitc42f4060a1a3848a247f354cd8c1229b5f83058b (patch)
treea7d52f010b30b2875fc65d60f4518b241f800d5a /engines
parent2e87ca495459341499a3fdead70b6410b6501a71 (diff)
downloadscummvm-rg350-c42f4060a1a3848a247f354cd8c1229b5f83058b.tar.gz
scummvm-rg350-c42f4060a1a3848a247f354cd8c1229b5f83058b.tar.bz2
scummvm-rg350-c42f4060a1a3848a247f354cd8c1229b5f83058b.zip
DIRECTOR: Fix display sprite bug
Diffstat (limited to 'engines')
-rw-r--r--engines/director/score.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index b42fd2cc5a..c7a84e4f63 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -171,12 +171,12 @@ Common::Rect Score::readRect(Common::SeekableReadStream &stream) {
}
void Score::play() {
- initGraphics(800, 600, true);
- _surface->create(800, 600);
+ initGraphics(_movieRect.width(), _movieRect.height(), true);
+ _surface->create(_movieRect.width(), _movieRect.height());
_currentFrame = 0;
_stopPlay = false;
_nextFrameTime = 0;
- while (!_stopPlay) {
+ while (!_stopPlay && _currentFrame < _frames.size() - 2) {
display();
processEvents();
g_system->updateScreen();
@@ -434,11 +434,10 @@ void Frame::display(Archive &_movie, Graphics::ManagedSurface &surface, Common::
height += y;
y = 0;
}
- Common::Rect drawRect = Common::Rect(x, y, x + width, y + height);
- surface.blitFrom(*img.getSurface());
- g_system->copyRectToScreen(surface.getPixels(), surface.pitch, drawRect.left, drawRect.top, drawRect.height(), drawRect.width());
+ surface.blitFrom(*img.getSurface(), Common::Point(x, y));
}
}
+ g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, surface.getBounds().width(), surface.getBounds().height());
}
Sprite::Sprite() {