aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2008-12-05 18:47:50 +0000
committerSven Hesse2008-12-05 18:47:50 +0000
commitbc5f25b5a0035668521f8d04728658b1ab2106c0 (patch)
tree3b9c1194defee5b02c2154046aa11b7a97f80e01
parentbfd32c9516a0d62085b04f789b72a8e616051a99 (diff)
downloadscummvm-rg350-bc5f25b5a0035668521f8d04728658b1ab2106c0.tar.gz
scummvm-rg350-bc5f25b5a0035668521f8d04728658b1ab2106c0.tar.bz2
scummvm-rg350-bc5f25b5a0035668521f8d04728658b1ab2106c0.zip
Evaluating kFeaturesPalette flag for VMDs. Now you can actually see something in Urban Runner (though it's far from pretty)
svn-id: r35249
-rw-r--r--engines/gob/coktelvideo.cpp5
-rw-r--r--engines/gob/videoplayer.cpp3
2 files changed, 8 insertions, 0 deletions
diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp
index be274ef6d3..48dc7f1adc 100644
--- a/engines/gob/coktelvideo.cpp
+++ b/engines/gob/coktelvideo.cpp
@@ -66,6 +66,8 @@ bool Imd::load(Common::SeekableReadStream &stream) {
// IMDs always have video
_features |= kFeaturesVideo;
+ // IMDs always have palettes
+ _features |= kFeaturesPalette;
// Palette
_stream->read((byte *) _palette, 768);
@@ -880,6 +882,9 @@ bool Vmd::load(Common::SeekableReadStream &stream) {
uint16 handle = _stream->readUint16LE();
_version = _stream->readUint16LE();
+ if (!(_version & 2))
+ _features |= kFeaturesPalette;
+
// 0x4 (4)
// Version checking
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 4c821d1fd5..50b8a64bfd 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -633,6 +633,9 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey,
}
void VideoPlayer::copyPalette(CoktelVideo &video, int16 palStart, int16 palEnd) {
+ if (!(video.getFeatures() & CoktelVideo::kFeaturesPalette))
+ return;
+
if (palStart < 0)
palStart = 0;
if (palEnd < 0)