[Scummvm-cvs-logs] scummvm master -> 85ebe4c8e0ceab6bf3177add007ae1278586df3c

m-kiewitz m_kiewitz at users.sourceforge.net
Tue Nov 24 15:57:50 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
85ebe4c8e0 ACCESS: movie player: 6-bit palette to 8-bit


Commit: 85ebe4c8e0ceab6bf3177add007ae1278586df3c
    https://github.com/scummvm/scummvm/commit/85ebe4c8e0ceab6bf3177add007ae1278586df3c
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-11-24T15:58:19+01:00

Commit Message:
ACCESS: movie player: 6-bit palette to 8-bit

adjust palette accordingly

Changed paths:
    engines/access/video/movie_decoder.cpp



diff --git a/engines/access/video/movie_decoder.cpp b/engines/access/video/movie_decoder.cpp
index 78b7a33..c67dac6 100644
--- a/engines/access/video/movie_decoder.cpp
+++ b/engines/access/video/movie_decoder.cpp
@@ -619,10 +619,11 @@ bool AccessVIDMovieDecoder::StreamVideoTrack::skipOverPalette(Common::SeekableRe
 void AccessVIDMovieDecoder::StreamVideoTrack::decodePalette(Common::SeekableReadStream *stream) {
 	assert(stream);
 
+	// VID files use a 6-bit palette and not a 8-bit one, we change it to 8-bit
 	for (uint16 curColor = 0; curColor < 256; curColor++) {
-		_palette[curColor * 3] = stream->readByte();
-		_palette[curColor * 3 + 1] = stream->readByte();
-		_palette[curColor * 3 + 2] = stream->readByte();
+		_palette[curColor * 3] = stream->readByte() << 2;
+		_palette[curColor * 3 + 1] = stream->readByte() << 2;
+		_palette[curColor * 3 + 2] = stream->readByte() << 2;
 	}
 
 	_dirtyPalette = true;






More information about the Scummvm-git-logs mailing list