From 42e8e1e126ad71fd39e3afdd2031b4f7ac7f9b6a Mon Sep 17 00:00:00 2001 From: Denis Kasak Date: Wed, 22 Jul 2009 05:00:11 +0000 Subject: If a frame has scaled dimensions set to 0, the engine now does no scaling instead of scaling it to nothing. Fixes the disappearing chair bug. svn-id: r42650 --- engines/draci/game.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 561ea78c62..c01e544986 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -388,6 +388,17 @@ int Game::loadAnimation(uint animNum, uint z) { Sprite *sp = new Sprite(spriteFile->_data, spriteFile->_length, x, y, true); + // Some frames set the scaled dimensions to 0 even though other frames + // from the same animations have them set to normal values + // We work around this by assuming it means no scaling is necessary + if (scaledWidth == 0) { + scaledWidth = sp->getWidth(); + } + + if (scaledHeight == 0) { + scaledHeight = sp->getHeight(); + } + sp->setScaled(scaledWidth, scaledHeight); if (mirror) -- cgit v1.2.3