[Scummvm-cvs-logs] scummvm master -> aeee6e624125af2569bf68cbe541b7bfce38291e

sev- sev at scummvm.org
Sat Sep 28 16:32:09 CEST 2013


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:
aeee6e6241 FULLPIPE: Implement Movement::calcSomeXY()


Commit: aeee6e624125af2569bf68cbe541b7bfce38291e
    https://github.com/scummvm/scummvm/commit/aeee6e624125af2569bf68cbe541b7bfce38291e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-09-28T07:31:42-07:00

Commit Message:
FULLPIPE: Implement Movement::calcSomeXY()

Changed paths:
    engines/fullpipe/statics.cpp



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index a780539..0e9daad 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -1246,7 +1246,36 @@ Common::Point *Movement::getCurrDynamicPhaseXY(Common::Point &p) {
 }
 
 Common::Point *Movement::calcSomeXY(Common::Point &p, int idx) {
-	warning("STUB: Movement::calcSomeXY()");
+	int oldox = _ox;
+	int oldoy = _oy;
+	int oldidx = _currDynamicPhaseIndex;
+
+	int x = 0;
+	int y = 0;
+
+	if (!idx) {
+		Common::Point point;
+
+		_staticsObj1->getSomeXY(point);
+		int y1 = _my - point.y;
+		int x1 = _mx - point.x;
+
+		setDynamicPhaseIndex(0);
+
+		x = _currDynamicPhase->_someX + x1;
+		y = _currDynamicPhase->_someY + y1;
+	}
+
+	setOXY(x, y);
+
+	while (_currDynamicPhaseIndex != idx)
+		gotoNextFrame(0, 0);
+
+	p.x = _ox;
+	p.y = _oy;
+
+	setDynamicPhaseIndex(oldidx);
+	setOXY(oldox, oldoy);
 
 	return &p;
 }






More information about the Scummvm-git-logs mailing list