[Scummvm-cvs-logs] scummvm master -> 20f14713dab4452420a19e63ec0648d834001dcf
sev-
sev at scummvm.org
Sat Apr 26 11:04:39 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:
20f14713da FULLPIPE: Implement MGM::refreshOffsets()
Commit: 20f14713dab4452420a19e63ec0648d834001dcf
https://github.com/scummvm/scummvm/commit/20f14713dab4452420a19e63ec0648d834001dcf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-26T12:03:58+03:00
Commit Message:
FULLPIPE: Implement MGM::refreshOffsets()
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 397af29..d2eaf06 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -2359,6 +2359,26 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
return -1;
}
+int MGM::refreshOffsets(int objectId, int idx1, int idx2) {
+ int idx = getItemIndexById(objectId);
+
+ if (idx != -1) {
+ int from = getStaticsIndexById(idx, idx1);
+ int to = getStaticsIndexById(idx, idx2);
+
+ MGMSubItem *sub = _items[idx]->subItems[from + to * _items[idx]->statics.size()];
+
+ if (sub->movement) {
+ idx = sub->field_8;
+ } else {
+ clearMovements2(idx);
+ idx = recalcOffsets(idx, from, to, 0, 1);
+ }
+ }
+
+ return idx;
+}
+
Common::Point *MGM::calcLength(Common::Point *pRes, Movement *mov, int x, int y, int *mult, int *len, int flag) {
Common::Point point;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 6d6335b..4d92fd7 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -180,6 +180,7 @@ public:
ExCommand2 *buildExCommand2(Movement *mov, int objId, int x1, int y1, Common::Point *x2, Common::Point *y2, int len);
MessageQueue *genMQ(StaticANIObject *ani, int staticsIndex, int staticsId, int *resStatId, Common::Point **pointArr);
int countPhases(int idx, int subIdx, int subOffset, int flag);
+ int refreshOffsets(int objectId, int idx1, int idx2);
};
struct MctlLadderMovementVars {
More information about the Scummvm-git-logs
mailing list