[Scummvm-cvs-logs] scummvm master -> 5a6428aac2996926a2d71beabc1e4368397c5584

sev- sev at scummvm.org
Thu Aug 25 09:10:40 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
5a6428aac2 FULLPIPE: Restore original tangled logic in stopAnim_maybe


Commit: 5a6428aac2996926a2d71beabc1e4368397c5584
    https://github.com/scummvm/scummvm/commit/5a6428aac2996926a2d71beabc1e4368397c5584
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-25T09:10:32+02:00

Commit Message:
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.

Changed paths:
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 22be04b..1ba211c 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;






More information about the Scummvm-git-logs mailing list