From ec08328f0c08cddb312e640de25dcc3532615837 Mon Sep 17 00:00:00 2001 From: Sylvain Dupont Date: Thu, 28 Oct 2010 21:39:46 +0000 Subject: 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 --- engines/toon/anim.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/toon/anim.cpp') 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; -- cgit v1.2.3