aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-11 23:03:51 +0200
committerEugene Sandulenko2013-12-11 23:17:45 +0200
commite867326b9b32ca5c64eeb950cd9d4706b8493d34 (patch)
treebf0dda7cb6f46e5b14d9e1678007350876163b76 /engines/fullpipe
parent8caec7691cf625baba382e425fdcf1bee9e7d17c (diff)
downloadscummvm-rg350-e867326b9b32ca5c64eeb950cd9d4706b8493d34.tar.gz
scummvm-rg350-e867326b9b32ca5c64eeb950cd9d4706b8493d34.tar.bz2
scummvm-rg350-e867326b9b32ca5c64eeb950cd9d4706b8493d34.zip
FULLPIPE: Implement MGM::updateAnimStatics()
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/motion.cpp28
-rw-r--r--engines/fullpipe/motion.h1
2 files changed, 28 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index e7cd7ef81d..753106fb57 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1520,7 +1520,33 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
}
void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
- warning("STUB: MGM::updateAnimStatics()");
+ if (getItemIndexById(ani->_id) == -1)
+ return;
+
+ if (ani->_movement) {
+ ani->queueMessageQueue(0);
+ ani->_movement->gotoLastFrame();
+ ani->_statics = ani->_movement->_staticsObj2;
+ ani->_movement = 0;
+
+ ani->setOXY(ani->_movement->_ox, ani->_movement->_oy);
+ }
+
+ if (ani->_statics) {
+ Common::Point point;
+
+ getPoint(&point, ani->_id, ani->_statics->_staticsId, staticsId);
+
+ ani->setOXY(ani->_ox + point.x, ani->_oy + point.y);
+
+ ani->_statics = ani->getStaticsById(staticsId);
+ }
+}
+
+Common::Point *MGM::getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2) {
+ warning("STUB: MGM::getPoint()");
+
+ return point;
}
MovGraphLink::MovGraphLink() {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 9e8414845f..b49fea55bc 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -160,6 +160,7 @@ public:
MessageQueue *genMovement(MGMInfo *mgminfo);
void updateAnimStatics(StaticANIObject *ani, int staticsId);
+ Common::Point *getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2);
};
struct MctlLadderMovementVars {