Evaluating kFeaturesPalette flag for VMDs. Now you can actually see something in Urban Runner (though it's far from pretty)

svn-id: r35249
This commit is contained in:
Sven Hesse 2008-12-05 18:47:50 +00:00
parent bfd32c9516
commit bc5f25b5a0
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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)