[Scummvm-cvs-logs] scummvm master -> 4d75bebd08c1aeffbb05faa72d628c258d3d2d46

sev- sev at scummvm.org
Wed May 7 21:19:08 CEST 2014


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:
4d75bebd08 FULLPIPE: Implement MovGraph::getBboxes()


Commit: 4d75bebd08c1aeffbb05faa72d628c258d3d2d46
    https://github.com/scummvm/scummvm/commit/4d75bebd08c1aeffbb05faa72d628c258d3d2d46
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-07T22:18:08+03:00

Commit Message:
FULLPIPE: Implement MovGraph::getBboxes()

Changed paths:
    engines/fullpipe/motion.cpp
    engines/fullpipe/motion.h



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 91950ba..cdf9bdb 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -847,6 +847,38 @@ void MovGraph::shuffleTree(MovGraphLink *lnk, MovGraphLink *lnk2, Common::Array<
 	}
 }
 
+Common::Array<Common::Rect *> *MovGraph::getBboxes(MovArr *movarr1, MovArr *movarr2, int *listCount) {
+	Common::Array<MovGraphLink *> tempObList1;
+	Common::Array<MovGraphLink *> tempObList2;
+
+	shuffleTree(movarr1->_link, movarr2->_link, tempObList1, tempObList2);
+
+	*listCount = 0;
+
+	if (!tempObList2.size())
+		return 0;
+
+	*listCount = tempObList2.size();
+
+	Common::Array<Common::Rect *> *res = new Common::Array<Common::Rect *>;
+
+	for (uint i = 0; i < *listCount; i++) {
+		Common::Rect *r = new Common::Rect;
+
+		calcBbox(r, tempObList2[i], movarr1, movarr2);
+
+		delete tempObList2[i];
+	}
+
+	movarr2->_link = movarr1->_link;
+
+	return res;
+}
+
+void MovGraph::calcBbox(Common::Rect *rect, MovGraphLink *grlink, MovArr *movarr1, MovArr *movarr2) {
+	warning("STUB: MovGraph::calcBbox()");
+}
+
 int MovGraph2::getItemIndexByGameObjectId(int objectId) {
 	for (uint i = 0; i < _items2.size(); i++)
 		if (_items2[i]->_objectId == objectId)
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index e00447b..2c46c37 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -364,6 +364,8 @@ public:
 	int getItemIndexByStaticAni(StaticANIObject *ani);
 	Common::Array<MovArr *> *genMovArr(int x, int y, int *arrSize, int flag1, int flag2);
 	void shuffleTree(MovGraphLink *lnk, MovGraphLink *lnk2, Common::Array<MovGraphLink *> &tempObList1, Common::Array<MovGraphLink *> &tempObList2);
+	Common::Array<Common::Rect *> *getBboxes(MovArr *movarr1, MovArr *movarr2, int *listCount);
+	void calcBbox(Common::Rect *rect, MovGraphLink *grlink, MovArr *movarr1, MovArr *movarr2);
 };
 
 class Movement;






More information about the Scummvm-git-logs mailing list