[Scummvm-cvs-logs] scummvm master -> 92c1ff31d6d8d78e58caa4d123ceb0fea43a48ed

peres peres at scummvm.org
Sat Oct 26 15:32:42 CEST 2013

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

92c1ff31d6 GRAPHICS: do not clear the internal state of IFFDecoder on loadStream().

Commit: 92c1ff31d6d8d78e58caa4d123ceb0fea43a48ed
Author: peres (peres at scummvm.org)
Date: 2013-10-26T06:24:16-07:00

Commit Message:
GRAPHICS: do not clear the internal state of IFFDecoder on loadStream().

This decoder needs to keep track of client parameters that control
how the pixels are going to be packaged, so the responsibility for
clearing the state has been moved on the client (using the destroy()
method on ImageDecoder).

As no client uses the IFFDecoder for more than one image at a time,
this change does not require updates to the engines. The only effect
is on Parallaction (BRA-Amiga), which can now control the way pixels
are packaged in mask and path bitmaps.

Changed paths:

diff --git a/graphics/decoders/iff.cpp b/graphics/decoders/iff.cpp
index 7b37969..485b284 100644
--- a/graphics/decoders/iff.cpp
+++ b/graphics/decoders/iff.cpp
@@ -59,7 +59,8 @@ void IFFDecoder::destroy() {
 bool IFFDecoder::loadStream(Common::SeekableReadStream &stream) {
-	destroy();
+	// NOTE: we cannot call destroy() here, like most other decoders do, otherwise the 
+	// settings (stored in _numRelevantPlanes and _pixelPacking) will be cleared.
 	const uint32 form = stream.readUint32BE();

More information about the Scummvm-git-logs mailing list