diff options
author | peres | 2013-10-26 23:20:22 +0900 |
---|---|---|
committer | peres | 2013-10-26 23:26:22 +0900 |
commit | 070558c4c46d6be8898d77d9b2167d44a33f5a0f (patch) | |
tree | 3fa2be362277f4eb965cfdaba88167186300301c /graphics/decoders/iff.cpp | |
parent | 69be9adf52b643188c2a2e37aa7e4d79ecf2eae1 (diff) | |
download | scummvm-rg350-070558c4c46d6be8898d77d9b2167d44a33f5a0f.tar.gz scummvm-rg350-070558c4c46d6be8898d77d9b2167d44a33f5a0f.tar.bz2 scummvm-rg350-070558c4c46d6be8898d77d9b2167d44a33f5a0f.zip |
GRAPHICS: do not reset the extra parameters of IFFDecoder on destroy().
The two properties that control pixel packing and the size of the
surface need to be preserved for loadStream() to work correctly.
They are now under complete responsibility of the client.
Diffstat (limited to 'graphics/decoders/iff.cpp')
-rw-r--r-- | graphics/decoders/iff.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/graphics/decoders/iff.cpp b/graphics/decoders/iff.cpp index 7b37969fc1..fe27258d28 100644 --- a/graphics/decoders/iff.cpp +++ b/graphics/decoders/iff.cpp @@ -30,6 +30,10 @@ namespace Graphics { IFFDecoder::IFFDecoder() { _surface = 0; _palette = 0; + + // these 2 properties are not reset by destroy(), so the default is set here. + _numRelevantPlanes = 8; + _pixelPacking = false; destroy(); } @@ -54,8 +58,6 @@ void IFFDecoder::destroy() { _paletteRanges.clear(); _type = TYPE_UNKNOWN; _paletteColorCount = 0; - _numRelevantPlanes = 8; - _pixelPacking = false; } bool IFFDecoder::loadStream(Common::SeekableReadStream &stream) { |