From 92c1ff31d6d8d78e58caa4d123ceb0fea43a48ed Mon Sep 17 00:00:00 2001 From: peres Date: Sat, 26 Oct 2013 22:24:16 +0900 Subject: 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. --- graphics/decoders/iff.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'graphics/decoders') diff --git a/graphics/decoders/iff.cpp b/graphics/decoders/iff.cpp index 7b37969fc1..485b2846a8 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(); -- cgit v1.2.3