Skip to content

Commit

Permalink
PEGASUS: Fix drawing movies to positions other than the origin
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Sep 22, 2011
1 parent 5b23d33 commit ea7ec27
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions engines/pegasus/movie.cpp
Expand Up @@ -96,10 +96,19 @@ void Movie::redrawMovieWorld() {
}

void Movie::draw(const Common::Rect &r) {
if (_transparent)
copyToCurrentPortTransparent(r);
else
copyToCurrentPort(r);
Common::Rect surfaceBounds;
getSurfaceBounds(surfaceBounds);
Common::Rect r1 = r;

Common::Rect bounds;
getBounds(bounds);
surfaceBounds.moveTo(bounds.left, bounds.top);
r1 = r1.findIntersectingRect(surfaceBounds);
getSurfaceBounds(surfaceBounds);

Common::Rect r2 = r1;
r2.translate(surfaceBounds.left - bounds.left, surfaceBounds.top - bounds.top);
drawImage(r2, r1);
}

void Movie::setVolume(uint16 volume) {
Expand Down

0 comments on commit ea7ec27

Please sign in to comment.