[Scummvm-cvs-logs] scummvm master -> 4ed4dfadcaeef4db12be8fc0c3f70d7362a438bf

m-kiewitz m_kiewitz at users.sourceforge.net
Mon Jun 8 21:01:23 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:
4ed4dfadca SHERLOCK: 3DO: play EA intro movie


Commit: 4ed4dfadcaeef4db12be8fc0c3f70d7362a438bf
    https://github.com/scummvm/scummvm/commit/4ed4dfadcaeef4db12be8fc0c3f70d7362a438bf
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-06-08T21:01:07+02:00

Commit Message:
SHERLOCK: 3DO: play EA intro movie

Changed paths:
    engines/sherlock/debugger.cpp
    engines/sherlock/scalpel/3do/movie_decoder.cpp
    engines/sherlock/scalpel/3do/movie_decoder.h
    engines/sherlock/scalpel/scalpel.cpp



diff --git a/engines/sherlock/debugger.cpp b/engines/sherlock/debugger.cpp
index 7a727e8..8b7bdaa 100644
--- a/engines/sherlock/debugger.cpp
+++ b/engines/sherlock/debugger.cpp
@@ -44,7 +44,7 @@ Debugger::Debugger(SherlockEngine *vm) : GUI::Debugger(), _vm(vm) {
 
 void Debugger::postEnter() {
 	if (!_3doPlayMovieFile.empty()) {
-		Scalpel3DOMoviePlay(_3doPlayMovieFile.c_str());
+		Scalpel3DOMoviePlay(_3doPlayMovieFile.c_str(), Common::Point(0, 0));
 
 		_3doPlayMovieFile.clear();
 	}
diff --git a/engines/sherlock/scalpel/3do/movie_decoder.cpp b/engines/sherlock/scalpel/3do/movie_decoder.cpp
index 9280bba..d1471c5 100644
--- a/engines/sherlock/scalpel/3do/movie_decoder.cpp
+++ b/engines/sherlock/scalpel/3do/movie_decoder.cpp
@@ -464,16 +464,12 @@ Audio::AudioStream *Scalpel3DOMovieDecoder::StreamAudioTrack::getAudioStream() c
 // Test-code
 
 // Code for showing a movie. Only meant for testing/debug purposes
-void Scalpel3DOMoviePlay(const char *filename) {
-	// HACK
-	initGraphics(320, 240, false, NULL);
-
+bool Scalpel3DOMoviePlay(const char *filename, Common::Point pos) {
 	Scalpel3DOMovieDecoder *videoDecoder = new Scalpel3DOMovieDecoder();
 
 	if (!videoDecoder->loadFile(filename)) {
-		// HACK
-		initGraphics(320, 200, false);
-		return;
+		warning("Scalpel3DOMoviePlay: could not open '%s'", filename);
+		return false;
 	}
 
 	bool skipVideo = false;
@@ -489,13 +485,7 @@ void Scalpel3DOMoviePlay(const char *filename) {
 			const Graphics::Surface *frame = videoDecoder->decodeNextFrame();
 
 			if (frame) {
-				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, 0, 0, width, height);
-
-				if (videoDecoder->hasDirtyPalette()) {
-					const byte *palette = videoDecoder->getPalette();
-					g_system->getPaletteManager()->setPalette(palette, 0, 255);
-				}
-
+				g_system->copyRectToScreen(frame->getPixels(), frame->pitch, pos.x, pos.y, width, height);
 				g_system->updateScreen();
 			}
 		}
@@ -508,9 +498,7 @@ void Scalpel3DOMoviePlay(const char *filename) {
 
 		g_system->delayMillis(10);
 	}
-
-	// HACK: switch back to 8bpp
-	initGraphics(320, 200, false);
+	return !skipVideo;
 }
 
 
diff --git a/engines/sherlock/scalpel/3do/movie_decoder.h b/engines/sherlock/scalpel/3do/movie_decoder.h
index 52d30cd..9f1670f 100644
--- a/engines/sherlock/scalpel/3do/movie_decoder.h
+++ b/engines/sherlock/scalpel/3do/movie_decoder.h
@@ -23,6 +23,7 @@
 #ifndef SHERLOCK_SCALPEL_3DO_MOVIE_DECODER_H
 #define SHERLOCK_SCALPEL_3DO_MOVIE_DECODER_H
 
+#include "common/rect.h"
 #include "video/video_decoder.h"
 #include "audio/decoders/3do.h"
 
@@ -119,7 +120,7 @@ private:
 };
 
 // Testing
-extern void Scalpel3DOMoviePlay(const char *filename);
+extern bool Scalpel3DOMoviePlay(const char *filename, Common::Point pos);
 
 } // End of namespace Sherlock
 
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index 9ace683..024ad51 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -29,6 +29,8 @@
 #include "sherlock/sherlock.h"
 #include "sherlock/music.h"
 #include "sherlock/animation.h"
+// for 3DO
+#include "sherlock/scalpel/3do/movie_decoder.h"
 
 namespace Sherlock {
 
@@ -238,11 +240,9 @@ void ScalpelEngine::showOpening() {
 		return;
 
 	if (getPlatform() == Common::kPlatform3DO) {
-		// 3DO opening seems to be similar
-		// TODO
-		// 3DO animations are in directory Prologue/
-		// .3DX seem to be just like .VDX except that all INT16LE are INT16BE
-		// .3DA however seems to be completely different
+		// 3DO intro
+		Scalpel3DOMoviePlay("EAlogo.stream", Common::Point(20, 0));
+		_screen->clear();
 		if (!showCityCutscene3DO())
 			return;
 		if (!showAlleyCutscene3DO())






More information about the Scummvm-git-logs mailing list