diff options
author | Denis Kasak | 2009-07-22 05:00:11 +0000 |
---|---|---|
committer | Denis Kasak | 2009-07-22 05:00:11 +0000 |
commit | 42e8e1e126ad71fd39e3afdd2031b4f7ac7f9b6a (patch) | |
tree | 94923aeaf22c459954a335590d21a1a992c3961e | |
parent | 9b32771017de2db833c787c338b01cdcf76d27a9 (diff) | |
download | scummvm-rg350-42e8e1e126ad71fd39e3afdd2031b4f7ac7f9b6a.tar.gz scummvm-rg350-42e8e1e126ad71fd39e3afdd2031b4f7ac7f9b6a.tar.bz2 scummvm-rg350-42e8e1e126ad71fd39e3afdd2031b4f7ac7f9b6a.zip |
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
-rw-r--r-- | engines/draci/game.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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) |