diff options
author | Alyssa Milburn | 2011-07-18 21:10:00 +0200 |
---|---|---|
committer | Alyssa Milburn | 2011-07-18 21:10:00 +0200 |
commit | 06ca31d6426c9fc605f1a25c4dd17e9ec1394e2a (patch) | |
tree | 9472e45e523a1445c47fc53a936d371eff9177ae | |
parent | 9cb4bd2a3851daf2dc145a30e41e6b2fa99427c1 (diff) | |
download | scummvm-rg350-06ca31d6426c9fc605f1a25c4dd17e9ec1394e2a.tar.gz scummvm-rg350-06ca31d6426c9fc605f1a25c4dd17e9ec1394e2a.tar.bz2 scummvm-rg350-06ca31d6426c9fc605f1a25c4dd17e9ec1394e2a.zip |
COMPOSER: Only allow invalid-sized sprites if RLE.
-rw-r--r-- | engines/composer/composer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp index a9232c7c35..34608be417 100644 --- a/engines/composer/composer.cpp +++ b/engines/composer/composer.cpp @@ -1902,7 +1902,11 @@ bool ComposerEngine::initSprite(Sprite &sprite) { sprite._surface.create(width, height, Graphics::PixelFormat::createFormatCLUT8()); decompressBitmap(type, stream, (byte *)sprite._surface.pixels, size, width, height); } else { - warning("ignoring sprite with size %dx%d", width, height); + // there are some sprites (e.g. a -998x-998 one in Gregory's title screen) + // which have an invalid size, but the original engine doesn't notice for + // RLE sprites since the width/height is ignored until the actual draw + if (type != kBitmapRLESLWM) + error("sprite (type %d) had invalid size %dx%d", type, width, height); } delete stream; |