diff options
author | Matthew Hoops | 2011-09-21 21:39:07 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-09-21 21:39:07 -0400 |
commit | ea7ec2709469ed5311238542432db73c0ae2b180 (patch) | |
tree | 0bb0539219fdbc4955683bf2a0efda4ccd567fcb /engines/pegasus/movie.cpp | |
parent | 5b23d33a29f501236b164ee7de3013ae41c289a0 (diff) | |
download | scummvm-rg350-ea7ec2709469ed5311238542432db73c0ae2b180.tar.gz scummvm-rg350-ea7ec2709469ed5311238542432db73c0ae2b180.tar.bz2 scummvm-rg350-ea7ec2709469ed5311238542432db73c0ae2b180.zip |
PEGASUS: Fix drawing movies to positions other than the origin
Diffstat (limited to 'engines/pegasus/movie.cpp')
-rwxr-xr-x | engines/pegasus/movie.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/pegasus/movie.cpp b/engines/pegasus/movie.cpp index d37a493bf5..87ff872347 100755 --- a/engines/pegasus/movie.cpp +++ b/engines/pegasus/movie.cpp @@ -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) { |