diff options
author | Sylvain Dupont | 2010-10-28 21:39:46 +0000 |
---|---|---|
committer | Sylvain Dupont | 2010-10-28 21:39:46 +0000 |
commit | ec08328f0c08cddb312e640de25dcc3532615837 (patch) | |
tree | ff2cee870c646dfd4278b87a8c8afdfa737e919c /engines | |
parent | b3e42b94c916b3c0bb51bc78cb34cd25fbcbd65c (diff) | |
download | scummvm-rg350-ec08328f0c08cddb312e640de25dcc3532615837.tar.gz scummvm-rg350-ec08328f0c08cddb312e640de25dcc3532615837.tar.bz2 scummvm-rg350-ec08328f0c08cddb312e640de25dcc3532615837.zip |
TOON: Fixed some animation glitches for small sprites
Fixed problems when the uncompressed is smaller than compressed size
Bug fix sent by Thomas
It also fixes Bug fix #3086004 : "TOON: Lights above WACME doors incorrect"
svn-id: r53908
Diffstat (limited to 'engines')
-rw-r--r-- | engines/toon/anim.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp index c5769f5081..53980e3dc1 100644 --- a/engines/toon/anim.cpp +++ b/engines/toon/anim.cpp @@ -95,7 +95,11 @@ bool Animation::loadAnimation(Common::String file) { } else { _frames[e]._ref = -1; _frames[e]._data = new uint8[decompressedSize]; - decompressLZSS(imageData, _frames[e]._data, decompressedSize); + if (compressedSize < decompressedSize) { + decompressLZSS(imageData, _frames[e]._data, decompressedSize); + } else { + memcpy(_frames[e]._data, imageData, compressedSize); + } } data += headerSize + compressedSize; |