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.
This commit is contained in:
peres 2013-10-26 22:24:16 +09:00
parent 47953d1327
commit 92c1ff31d6

View File

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