[Scummvm-cvs-logs] scummvm master -> 37ee1f5640ca8523382c5eadac0697fcd0484fed
m-kiewitz
m_kiewitz at users.sourceforge.net
Sat Sep 12 18:55:26 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
37ee1f5640 SHERLOCK: SS: 3DO: draw video frame for videos
Commit: 37ee1f5640ca8523382c5eadac0697fcd0484fed
https://github.com/scummvm/scummvm/commit/37ee1f5640ca8523382c5eadac0697fcd0484fed
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-09-12T18:57:32+02:00
Commit Message:
SHERLOCK: SS: 3DO: draw video frame for videos
Changed paths:
engines/sherlock/scalpel/scalpel.cpp
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index b3531e8..8478327 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -1248,11 +1248,29 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P
Scalpel3DOMovieDecoder *videoDecoder = new Scalpel3DOMovieDecoder();
Graphics::Surface tempSurface;
+ Common::Point framePos(pos.x, pos.y);
+ ImageFile3DO *frameImageFile = nullptr;
+ ImageFrame *frameImage = nullptr;
+ bool frameShown = false;
+
if (!videoDecoder->loadFile(filename)) {
warning("Scalpel3DOMoviePlay: could not open '%s'", filename.c_str());
return false;
}
+ _screen->_backBuffer1.blitFrom(*_screen); // save into backbuffer 1
+
+ if (halfSize) {
+ // only for portrait videos, not for EA intro logo and such
+ if ((framePos.x >= 8) && (framePos.y >= 8)) { // safety check
+ framePos.x -= 8;
+ framePos.y -= 8; // frame is 8 pixels on left + top, and 7 pixels on right + bottom
+ }
+
+ frameImageFile = new ImageFile3DO("vidframe.cel", kImageFile3DOType_Cel);
+ frameImage = &(*frameImageFile)[0];
+ }
+
bool skipVideo = false;
//byte bytesPerPixel = videoDecoder->getPixelFormat().bytesPerPixel;
uint16 width = videoDecoder->getWidth();
@@ -1283,10 +1301,18 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P
// 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;
+ }
}
- g_system->copyRectToScreen(frame->getPixels(), frame->pitch, pos.x, pos.y, frame->w, frame->h);
- g_system->updateScreen();
+ _screen->blitFrom(*frame, pos);
+ _screen->update();
+ //g_system->copyRectToScreen(frame->getPixels(), frame->pitch, pos.x, pos.y, frame->w, frame->h);
+ //g_system->updateScreen();
}
}
@@ -1308,6 +1334,12 @@ bool ScalpelEngine::play3doMovie(const Common::String &filename, const Common::P
videoDecoder->close();
delete videoDecoder;
+ if (halfSize) {
+ delete frameImage;
+ }
+
+ _screen->blitFrom(_screen->_backBuffer1);
+
return !skipVideo;
}
More information about the Scummvm-git-logs
mailing list