diff options
author | Eugene Sandulenko | 2016-08-25 09:08:53 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-25 09:10:32 +0200 |
commit | 5a6428aac2996926a2d71beabc1e4368397c5584 (patch) | |
tree | 7291338d1cd0f674d0efd558ab9f13f239e35883 | |
parent | 8a3ee2261da22945612f93b5d85bd0c571422085 (diff) | |
download | scummvm-rg350-5a6428aac2996926a2d71beabc1e4368397c5584.tar.gz scummvm-rg350-5a6428aac2996926a2d71beabc1e4368397c5584.tar.bz2 scummvm-rg350-5a6428aac2996926a2d71beabc1e4368397c5584.zip |
FULLPIPE: Restore original tangled logic in stopAnim_maybe
The compiler was super-optimizing there, and my initial untangling
was incorrect. Restoring it with nasty goto's and will fix it later
once we have enough test cases.
-rw-r--r-- | engines/fullpipe/statics.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 22be04b393..1ba211ce54 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -952,7 +952,7 @@ Common::Point *StaticANIObject::calcNextStep(Common::Point *pRes) { } void StaticANIObject::stopAnim_maybe() { - debugC(6, kDebugAnimation, "StaticANIObject::stopAnim_maybe()"); + debugC(2, kDebugAnimation, "StaticANIObject::stopAnim_maybe()"); if (!(_flags & 1)) return; @@ -967,7 +967,10 @@ void StaticANIObject::stopAnim_maybe() { setOXY(_movement->_ox, _movement->_oy); if (_flags & 0x40) { - if (!_movement->_currMovement && !_movement->_currDynamicPhaseIndex) { + if (!_movement->_currMovement) { + if (!_movement->_currDynamicPhaseIndex) + goto L11; +L8: _statics = _movement->_staticsObj1; _movement->getCurrDynamicPhaseXY(point); _ox -= point.x; @@ -985,13 +988,14 @@ void StaticANIObject::stopAnim_maybe() { _ox += point.x; _oy += point.y; } - } else { - _statics = _movement->_staticsObj2; + goto L12; } - } else { - _statics = _movement->_staticsObj2; + if (!_movement->_currDynamicPhaseIndex) + goto L8; } - +L11: + _statics = _movement->_staticsObj2; +L12: _statics->getSomeXY(point); _statics->_x = _ox - point.x; |