aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/debugger.cpp2
-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
4 files changed, 13 insertions, 24 deletions
diff --git a/engines/sherlock/debugger.cpp b/engines/sherlock/debugger.cpp
index 7a727e8224..8b7bdaaa53 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 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())