aboutsummaryrefslogtreecommitdiff
path: root/engines/toon/drew.cpp
diff options
context:
space:
mode:
authorSylvain Dupont2011-01-21 23:24:17 +0000
committerSylvain Dupont2011-01-21 23:24:17 +0000
commitf9422fb7260b8e5f0f45b93f22e0e4504a9e140b (patch)
tree3044f4fd0a9f97c351af9dfc74812f379dcc88a9 /engines/toon/drew.cpp
parent8cacde95e7dabb1694c911a1db087a94569da368 (diff)
downloadscummvm-rg350-f9422fb7260b8e5f0f45b93f22e0e4504a9e140b.tar.gz
scummvm-rg350-f9422fb7260b8e5f0f45b93f22e0e4504a9e140b.tar.bz2
scummvm-rg350-f9422fb7260b8e5f0f45b93f22e0e4504a9e140b.zip
TOON: Bug #3153351 fixed with disappearing Drew
Bug #3153351: "TOON: Drew vanishes when fixing churnatron" Made sure the scale is never zero. svn-id: r55399
Diffstat (limited to 'engines/toon/drew.cpp')
-rw-r--r--engines/toon/drew.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/toon/drew.cpp b/engines/toon/drew.cpp
index 1d4df09027..36ca17dd70 100644
--- a/engines/toon/drew.cpp
+++ b/engines/toon/drew.cpp
@@ -52,7 +52,9 @@ void CharacterDrew::setPosition(int32 x, int32 y) {
debugC(5, kDebugCharacter, "setPosition(%d, %d)", x, y);
_z = _vm->getLayerAtPoint(x, y);
- _scale = _vm->getScaleAtPoint(x, y);
+ int newScale = _vm->getScaleAtPoint(x, y);
+ if (newScale > 0)
+ _scale = newScale;
// work out position and scale of the character sprite
int32 width = _walkAnim->getWidth() * _scale / 1024;