Skip to content
Permalink
Browse files

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).
  • Loading branch information
bluegr committed Dec 12, 2014
1 parent 2644d08 commit fd6731c9b6f3977b2d03d1e6db2522e0769d8f33
Showing with 5 additions and 1 deletion.
  1. +5 −1 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;

0 comments on commit fd6731c

Please sign in to comment.
You can’t perform that action at this time.