diff options
author | Paul Gilbert | 2015-09-13 17:08:12 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-09-13 17:08:12 -0400 |
commit | 492166debe75bc392753561a4f995bbd72ca8b39 (patch) | |
tree | 474e8dc8c4e2902187d20a8b645203c77ba15feb /engines | |
parent | fcbf84455ea3ced2335fbcb4b6b44f99d4232f28 (diff) | |
download | scummvm-rg350-492166debe75bc392753561a4f995bbd72ca8b39.tar.gz scummvm-rg350-492166debe75bc392753561a4f995bbd72ca8b39.tar.bz2 scummvm-rg350-492166debe75bc392753561a4f995bbd72ca8b39.zip |
SHERLOCK: 3DO: Show portrait videos at full size when in hi-res mode
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/scalpel/scalpel.cpp | 34 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel.h | 2 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_screen.cpp | 8 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_screen.h | 4 |
4 files changed, 24 insertions, 24 deletions
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp index ebf4cdea2a..affd0e956f 100644 --- a/engines/sherlock/scalpel/scalpel.cpp +++ b/engines/sherlock/scalpel/scalpel.cpp @@ -1263,7 +1263,7 @@ void ScalpelEngine::showScummVMRestoreDialog() { delete dialog; } -bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::Point &pos, bool halfSize) { +bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::Point &pos, bool isPortrait) { Scalpel3DOScreen &screen = *(Scalpel3DOScreen *)_screen; Scalpel3DOMovieDecoder *videoDecoder = new Scalpel3DOMovieDecoder(); Graphics::Surface tempSurface; @@ -1278,7 +1278,8 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P return false; } - if (halfSize) { + bool halfSize = isPortrait && !_isScreenDoubled; + if (isPortrait) { // only for portrait videos, not for EA intro logo and such if ((framePos.x >= 8) && (framePos.y >= 8)) { // safety check framePos.x -= 8; @@ -1362,31 +1363,24 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P downscaleTargetPtr++; } } -#if 0 - // Reduce the movie frame to half-size on a temp surface - for (int yp = 0; yp < height / 2; ++yp) { - const uint16 *srcP = (const uint16 *)frame->getBasePtr(0, yp * 2); - uint16 *destP = (uint16 *)tempSurface.getBasePtr(0, yp); - - for (int xp = 0; xp < width / 2; ++xp, ++destP, srcP += 2) - *destP = *srcP; - } -#endif // Point the drawing frame to the temporary surface frame = &tempSurface; + } - if (!frameShown) { - // Draw the frame (not the frame of the video, but a frame around the video) itself - _screen->transBlitFrom(frameImage->_frame, framePos); - frameShown = true; - } + if (isPortrait && !frameShown) { + // Draw the frame (not the frame of the video, but a frame around the video) itself + _screen->transBlitFrom(frameImage->_frame, framePos); + frameShown = true; + } + + if (isPortrait && !halfSize) { + screen.rawBlitFrom(*frame, Common::Point(pos.x * 2, pos.y * 2)); + } else { + _screen->blitFrom(*frame, pos); } - _screen->blitFrom(*frame, pos); _screen->update(); - //g_system->copyRectToScreen(frame->getPixels(), frame->pitch, pos.x, pos.y, frame->w, frame->h); - //g_system->updateScreen(); } } diff --git a/engines/sherlock/scalpel/scalpel.h b/engines/sherlock/scalpel/scalpel.h index 02397304e0..af4d72a7d7 100644 --- a/engines/sherlock/scalpel/scalpel.h +++ b/engines/sherlock/scalpel/scalpel.h @@ -150,7 +150,7 @@ public: /** * Play back a 3do movie */ - bool play3doMovie(const Common::String &filename, const Common::Point &pos, bool halfSize = false); + bool play3doMovie(const Common::String &filename, const Common::Point &pos, bool isPortrait = false); }; } // End of namespace Scalpel diff --git a/engines/sherlock/scalpel/scalpel_screen.cpp b/engines/sherlock/scalpel/scalpel_screen.cpp index a06314f57f..71bcca5dc5 100644 --- a/engines/sherlock/scalpel/scalpel_screen.cpp +++ b/engines/sherlock/scalpel/scalpel_screen.cpp @@ -329,6 +329,14 @@ uint16 Scalpel3DOScreen::h() const { return _vm->_isScreenDoubled ? _surface.h / 2 : _surface.h; } +void Scalpel3DOScreen::rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt) { + Common::Rect srcRect(0, 0, src.w, src.h); + Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h); + + addDirtyRect(destRect); + _surface.copyRectToSurface(src, destRect.left, destRect.top, srcRect); +} + } // End of namespace Scalpel } // End of namespace Sherlock diff --git a/engines/sherlock/scalpel/scalpel_screen.h b/engines/sherlock/scalpel/scalpel_screen.h index 15db24bbd2..d6018a44a0 100644 --- a/engines/sherlock/scalpel/scalpel_screen.h +++ b/engines/sherlock/scalpel/scalpel_screen.h @@ -79,9 +79,7 @@ public: /** * Draws a sub-section of a surface at a given position within this surface */ - void rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt, const Common::Rect &srcBounds) { - ScalpelScreen::blitFrom(src, pt, srcBounds); - } + void rawBlitFrom(const Graphics::Surface &src, const Common::Point &pt); /** * Fade backbuffer 1 into screen (3DO RGB!) |