[Scummvm-cvs-logs] scummvm master -> 7c017cfdb924ade0faa8b01faf9580a7c444d4df
sev-
sev at scummvm.org
Sat Jun 7 09:13:50 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:
7c017cfdb9 FULLPIPE: Implement MovGraph2::getItemSubIndexByMGM()
Commit: 7c017cfdb924ade0faa8b01faf9580a7c444d4df
https://github.com/scummvm/scummvm/commit/7c017cfdb924ade0faa8b01faf9580a7c444d4df
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-06-07T10:13:13+03:00
Commit Message:
FULLPIPE: Implement MovGraph2::getItemSubIndexByMGM()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index adfc2f7..8506926 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -816,6 +816,7 @@ void MovGraph::freeItems() {
_items.clear();
}
+
Common::Array<MovItem *> *MovGraph::method28(StaticANIObject *ani, int x, int y, int flag1, int *rescount) {
*rescount = 0;
@@ -1629,8 +1630,22 @@ int MovGraph2::getItemSubIndexByMovementId(int idx, int movId) {
return -1;
}
-int MovGraph2::getItemSubIndexByMGM(int idx, StaticANIObject *ani) {
- warning("STUB: MovGraph2::getItemSubIndexByMGM()");
+int MovGraph2::getItemSubIndexByMGM(int index, StaticANIObject *ani) {
+ if (findNode(ani->_ox, ani->_oy, 0) || findLink1(ani->_ox, ani->_oy, -1, 0) || findLink2(ani->_ox, ani->_oy)) {
+ int minidx = -1;
+ int min = 0;
+
+ for (int i = 0; i < 4; i++) {
+ int tmp = _mgm.refreshOffsets(ani->_id, ani->_statics->_staticsId, _items2[index]->_subItems[i]._staticsId1);
+
+ if (tmp >= 0 && (minidx == -1 || tmp < min)) {
+ minidx = i;
+ min = tmp;
+ }
+ }
+
+ return minidx;
+ }
return -1;
}
More information about the Scummvm-git-logs
mailing list