aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/scalpel/3do
diff options
context:
space:
mode:
authorMartin Kiewitz2015-06-04 17:54:13 +0200
committerMartin Kiewitz2015-06-04 17:54:13 +0200
commit37cc8df5a593ed6d76a5fa5f1221fc9a1b5df81e (patch)
treefa73e4213e7caabec094655faf1c1a3d4af5c9e7 /engines/sherlock/scalpel/3do
parent7de11f136277862a6e6b45f0c744f49c986733d8 (diff)
downloadscummvm-rg350-37cc8df5a593ed6d76a5fa5f1221fc9a1b5df81e.tar.gz
scummvm-rg350-37cc8df5a593ed6d76a5fa5f1221fc9a1b5df81e.tar.bz2
scummvm-rg350-37cc8df5a593ed6d76a5fa5f1221fc9a1b5df81e.zip
SHERLOCK: 3DO movie player improvements
- allow DACQ and JOIN chunks (skip them) - improve unknown chunk tag error messages
Diffstat (limited to 'engines/sherlock/scalpel/3do')
-rw-r--r--engines/sherlock/scalpel/3do/movie_decoder.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/sherlock/scalpel/3do/movie_decoder.cpp b/engines/sherlock/scalpel/3do/movie_decoder.cpp
index 6e663f75cb..bd3d483e2f 100644
--- a/engines/sherlock/scalpel/3do/movie_decoder.cpp
+++ b/engines/sherlock/scalpel/3do/movie_decoder.cpp
@@ -73,7 +73,7 @@ bool Scalpel3DOMovieDecoder::loadStream(Common::SeekableReadStream *stream) {
// Look for packets that we care about
static const int maxPacketCheckCount = 20;
for (int i = 0; i < maxPacketCheckCount; i++) {
- uint32 tag = _stream->readUint32BE();
+ uint32 chunkTag = _stream->readUint32BE();
uint32 chunkSize = _stream->readUint32BE() - 8;
// Bail out if done
@@ -82,7 +82,7 @@ bool Scalpel3DOMovieDecoder::loadStream(Common::SeekableReadStream *stream) {
uint32 dataStartOffset = _stream->pos();
- switch (tag) {
+ switch (chunkTag) {
case MKTAG('F','I','L','M'): {
// See if this is a FILM header
_stream->skip(4); // time stamp (based on 240 per second)
@@ -163,8 +163,10 @@ bool Scalpel3DOMovieDecoder::loadStream(Common::SeekableReadStream *stream) {
}
case MKTAG('C','T','R','L'):
- case MKTAG('F','I','L','L'):
- // Ignore but also accept CTRL + FILL packets
+ case MKTAG('F','I','L','L'): // filler chunk, fills to certain boundary
+ case MKTAG('D','A','C','Q'):
+ case MKTAG('J','O','I','N'): // add cel data (not used in sherlock)
+ // Ignore these chunks
break;
case MKTAG('S','H','D','R'):
@@ -172,7 +174,7 @@ bool Scalpel3DOMovieDecoder::loadStream(Common::SeekableReadStream *stream) {
break;
default:
- warning("Unknown header inside Sherlock 3DO movie");
+ warning("Unknown chunk-tag '%s' inside Sherlock 3DO movie", tag2str(chunkTag));
close();
return false;
}
@@ -337,8 +339,10 @@ void Scalpel3DOMovieDecoder::readNextPacket() {
break;
case MKTAG('C','T','R','L'):
- case MKTAG('F','I','L','L'):
- // Ignore but also accept CTRL + FILL packets
+ case MKTAG('F','I','L','L'): // filler chunk, fills to certain boundary
+ case MKTAG('D','A','C','Q'):
+ case MKTAG('J','O','I','N'): // add cel data (not used in sherlock)
+ // Ignore these chunks
break;
case MKTAG('S','H','D','R'):
@@ -346,7 +350,7 @@ void Scalpel3DOMovieDecoder::readNextPacket() {
break;
default:
- error("Unknown header inside Sherlock 3DO movie");
+ error("Unknown chunk-tag '%s' inside Sherlock 3DO movie", tag2str(chunkTag));
}
// Always seek to end of chunk
@@ -452,7 +456,7 @@ Audio::AudioStream *Scalpel3DOMovieDecoder::StreamAudioTrack::getAudioStream() c
// Code for showing a movie. Only meant for testing/debug purposes
void Scalpel3DOMoviePlay(const char *filename) {
// HACK
- initGraphics(320, 200, false, NULL);
+ initGraphics(320, 240, false, NULL);
Scalpel3DOMovieDecoder *videoDecoder = new Scalpel3DOMovieDecoder();