diff options
author | Dmitry Iskrich | 2016-05-31 22:41:20 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | c42f4060a1a3848a247f354cd8c1229b5f83058b (patch) | |
tree | a7d52f010b30b2875fc65d60f4518b241f800d5a /engines | |
parent | 2e87ca495459341499a3fdead70b6410b6501a71 (diff) | |
download | scummvm-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.cpp | 11 |
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() { |