From 06ca31d6426c9fc605f1a25c4dd17e9ec1394e2a Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Mon, 18 Jul 2011 21:10:00 +0200 Subject: COMPOSER: Only allow invalid-sized sprites if RLE. --- engines/composer/composer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/composer/composer.cpp') 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; -- cgit v1.2.3