diff options
-rw-r--r-- | engines/gob/coktelvideo.cpp | 5 | ||||
-rw-r--r-- | engines/gob/videoplayer.cpp | 3 |
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) |