aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/scripting
diff options
context:
space:
mode:
authorFilippos Karapetis2014-12-12 22:53:52 +0200
committerFilippos Karapetis2014-12-12 22:53:52 +0200
commitfd6731c9b6f3977b2d03d1e6db2522e0769d8f33 (patch)
tree548547e6080bdb69b566ab7da77b457df2d8bd76 /engines/zvision/scripting
parent2644d084480d537388cc7f585338ff2bf0490b38 (diff)
downloadscummvm-rg350-fd6731c9b6f3977b2d03d1e6db2522e0769d8f33.tar.gz
scummvm-rg350-fd6731c9b6f3977b2d03d1e6db2522e0769d8f33.tar.bz2
scummvm-rg350-fd6731c9b6f3977b2d03d1e6db2522e0769d8f33.zip
ZVISION: Only scale down animations to fit their frame, not up
This fixes the animations in two locations in Zork: Nemesis (the armor visor in location cz1e, and the planet in location aa10).
Diffstat (limited to 'engines/zvision/scripting')
-rw-r--r--engines/zvision/scripting/sidefx/animation_node.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/zvision/scripting/sidefx/animation_node.cpp b/engines/zvision/scripting/sidefx/animation_node.cpp
index 549aacba7f..74e4cadbe9 100644
--- a/engines/zvision/scripting/sidefx/animation_node.cpp
+++ b/engines/zvision/scripting/sidefx/animation_node.cpp
@@ -117,7 +117,11 @@ bool AnimationNode::process(uint32 deltaTimeInMillis) {
dsth = nod->pos.height();
}
- if (frame->w != dstw || frame->h != dsth) {
+ // We only scale down the animation to fit its frame, not up, otherwise we
+ // end up with distorted animations - e.g. the armor visor in location cz1e
+ // in Nemesis (one of the armors inside Irondune), or the planet in location
+ // aa10 in Nemesis (Juperon, outside the asylum).
+ if (frame->w > dstw || frame->h > dsth) {
if (nod->_scaled)
if (nod->_scaled->w != dstw || nod->_scaled->h != dsth) {
delete nod->_scaled;