aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel
diff options
context:
space:
mode:
authorMartin Kiewitz2015-06-08 21:01:07 +0200
committerMartin Kiewitz2015-06-08 21:01:07 +0200
commit4ed4dfadcaeef4db12be8fc0c3f70d7362a438bf (patch)
tree5e7b355b98885ace26e3c6467abda9d1902f6069 /engines/sherlock/scalpel
parent6260c33666a09db8ca4bb72419dc0560d584745f (diff)
downloadscummvm-rg350-4ed4dfadcaeef4db12be8fc0c3f70d7362a438bf.tar.gz
scummvm-rg350-4ed4dfadcaeef4db12be8fc0c3f70d7362a438bf.tar.bz2
scummvm-rg350-4ed4dfadcaeef4db12be8fc0c3f70d7362a438bf.zip
SHERLOCK: 3DO: play EA intro movie
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r--engines/sherlock/scalpel/3do/movie_decoder.cpp22
-rw-r--r--engines/sherlock/scalpel/3do/movie_decoder.h3
-rw-r--r--engines/sherlock/scalpel/scalpel.cpp10
3 files changed, 12 insertions, 23 deletions
diff --git a/engines/sherlock/scalpel/3do/movie_decoder.cpp b/engines/sherlock/scalpel/3do/movie_decoder.cpp
index 9280bbab13..d1471c59dd 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 52d30cd9e2..9f1670fc6c 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 9ace683fbe..024ad51ebf 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())