[Scummvm-cvs-logs] scummvm master -> 347c03d8b7c8768dc58f5f42ff013c426f7acebb
sev-
sev at scummvm.org
Wed May 21 07:25:55 CEST 2014
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
29eda4c02e FULLPIPE: Implement MovGraph::method3C()
347c03d8b7 FULLPIPE: Fix method return types
Commit: 29eda4c02e52279c9be4edf5764a41c8d2a9e88a
https://github.com/scummvm/scummvm/commit/29eda4c02e52279c9be4edf5764a41c8d2a9e88a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-21T08:05:05+03:00
Commit Message:
FULLPIPE: Implement MovGraph::method3C()
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 0b1c159..0e60847 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -690,10 +690,39 @@ int MovGraph::changeCallback() {
return 0;
}
-int MovGraph::method3C(StaticANIObject *ani, int flag) {
- warning("STUB: MovGraph::method3C()");
+bool MovGraph::method3C(StaticANIObject *ani, int flag) {
+ int idx = getItemIndexByStaticAni(ani);
- return 0;
+ if (idx == -1)
+ return false;
+
+ Common::Point point;
+ MovArr movarr;
+
+ point.x = ani->_ox;
+ point.y = ani->_oy;
+
+ findClosestLink(idx, &point, &movarr);
+ ani->setOXY(point.x, point.y);
+
+ if (flag) {
+ Statics *st;
+
+ if (ani->_statics) {
+ int t = _mgm.refreshOffsets(ani->_id, ani->_statics->_staticsId, movarr._link->_dwordArray2[_field_44]);
+ if (t > _mgm.refreshOffsets(ani->_id, ani->_statics->_staticsId, movarr._link->_dwordArray2[_field_44 + 1]))
+ st = ani->getStaticsById(movarr._link->_dwordArray2[_field_44 + 1]);
+ else
+ st = ani->getStaticsById(movarr._link->_dwordArray2[_field_44]);
+ } else {
+ ani->stopAnim_maybe();
+ st = ani->getStaticsById(movarr._link->_dwordArray2[_field_44]);
+ }
+
+ ani->_statics = st;
+ }
+
+ return true;
}
bool MovGraph::method44(StaticANIObject *ani, int x, int y) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index fc199e3..aa40379 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -58,7 +58,7 @@ public:
virtual int method30() { return 0; }
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { return 0; }
virtual int changeCallback() { return 0; }
- virtual int method3C(StaticANIObject *ani, int flag) { return 0; }
+ virtual bool method3C(StaticANIObject *ani, int flag) { return 0; }
virtual int method40() { return 0; }
virtual bool method44(StaticANIObject *ani, int x, int y) { return false; }
virtual int method48() { return -1; }
@@ -365,7 +365,7 @@ public:
virtual int method2C(StaticANIObject *obj, int x, int y);
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
virtual int changeCallback();
- virtual int method3C(StaticANIObject *ani, int flag);
+ virtual bool method3C(StaticANIObject *ani, int flag);
virtual bool method44(StaticANIObject *ani, int x, int y);
virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
virtual MessageQueue *method50(StaticANIObject *ani, Common::Array<MovArr *> *movarr, int staticsId);
Commit: 347c03d8b7c8768dc58f5f42ff013c426f7acebb
https://github.com/scummvm/scummvm/commit/347c03d8b7c8768dc58f5f42ff013c426f7acebb
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-05-21T08:08:22+03:00
Commit Message:
FULLPIPE: Fix method return types
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 0e60847..6162537 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -606,7 +606,7 @@ Common::Array<MovItem *> *MovGraph::method28(StaticANIObject *ani, int x, int y,
return 0;
}
-int MovGraph::method2C(StaticANIObject *obj, int x, int y) {
+bool MovGraph::method2C(StaticANIObject *obj, int x, int y) {
obj->setOXY(x, y);
return method3C(obj, 1);
}
@@ -3258,17 +3258,17 @@ int startWalkTo(int objId, int objKey, int x, int y, int fuzzyMatch) {
return 0;
}
-int doSomeAnimation(int objId, int objKey, int a3) {
+bool doSomeAnimation(int objId, int objKey, int a3) {
StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(objId, objKey);
MctlCompound *cmp = getCurrSceneSc2MotionController();
if (ani && cmp)
return cmp->method3C(ani, a3);
- return 0;
+ return false;
}
-int doSomeAnimation2(int objId, int objKey) {
+bool doSomeAnimation2(int objId, int objKey) {
return doSomeAnimation(objId, objKey, 0);
}
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index aa40379..76eb567 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -34,8 +34,8 @@ class ExCommand2;
struct MovItem;
int startWalkTo(int objId, int objKey, int x, int y, int a5);
-int doSomeAnimation(int objId, int objKey, int a3);
-int doSomeAnimation2(int objId, int objKey);
+bool doSomeAnimation(int objId, int objKey, int a3);
+bool doSomeAnimation2(int objId, int objKey);
class MotionController : public CObject {
public:
@@ -54,7 +54,7 @@ public:
virtual int removeObject(StaticANIObject *obj) { return 0; }
virtual void freeItems() {}
virtual Common::Array<MovItem *> *method28(StaticANIObject *ani, int x, int y, int flag1, int *rescount) { return 0; }
- virtual int method2C(StaticANIObject *obj, int x, int y) { return 0; }
+ virtual bool method2C(StaticANIObject *obj, int x, int y) { return false; }
virtual int method30() { return 0; }
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { return 0; }
virtual int changeCallback() { return 0; }
@@ -362,7 +362,7 @@ public:
virtual int removeObject(StaticANIObject *obj);
virtual void freeItems();
virtual Common::Array<MovItem *> *method28(StaticANIObject *ani, int x, int y, int flag1, int *rescount);
- virtual int method2C(StaticANIObject *obj, int x, int y);
+ virtual bool method2C(StaticANIObject *obj, int x, int y);
virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
virtual int changeCallback();
virtual bool method3C(StaticANIObject *ani, int flag);
More information about the Scummvm-git-logs
mailing list