[Scummvm-cvs-logs] scummvm master -> 8b278d1cdd8f83483afef38b2115f5a25e37c603
sev-
sev at scummvm.org
Sun Dec 15 14:00:22 CET 2013
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7cb658f152 FULLPIPE: Implement MctlLadder::method34()
5751f4c110 FULLPIPE: Implement MGM::getPoint()
29a8bb5dbc FULLPIPE: Implement sceneHandler05_makeManFlight()
8b278d1cdd FULLPIPE: Implement sceneHandler05_makeWackoFeedback()
Commit: 7cb658f15245140cdefe42727540ec03251b3d29
https://github.com/scummvm/scummvm/commit/7cb658f15245140cdefe42727540ec03251b3d29
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-15T04:59:31-08:00
Commit Message:
FULLPIPE: Implement MctlLadder::method34()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 0aa6a4a..693efcb 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -303,7 +303,15 @@ void MctlLadder::freeItems() {
}
MessageQueue *MctlLadder::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
- warning("STUB: MctlLadder::method34()");
+ MessageQueue *mq = doWalkTo(subj, xpos, ypos, fuzzyMatch, staticsId);
+
+ if (mq) {
+ if (mq->chain(subj))
+ return mq;
+
+ } else {
+ delete mq;
+ }
return 0;
}
Commit: 5751f4c1103305465dc3ffaf38a1094724a23be7
https://github.com/scummvm/scummvm/commit/5751f4c1103305465dc3ffaf38a1094724a23be7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-15T04:59:31-08:00
Commit Message:
FULLPIPE: Implement MGM::getPoint()
Changed paths:
engines/fullpipe/motion.cpp
engines/fullpipe/motion.h
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 693efcb..16ac82b 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1576,12 +1576,66 @@ void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
}
}
-Common::Point *MGM::getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2) {
- warning("STUB: MGM::getPoint()");
+Common::Point *MGM::getPoint(Common::Point *point, int objectId, int staticsId1, int staticsId2) {
+ int idx = getItemIndexById(objectId);
+
+ if (idx == -1) {
+ point->x = -1;
+ point->y = -1;
+ } else {
+ int st1idx = getStaticsIndexById(idx, staticsId1);
+ int st2idx = getStaticsIndexById(idx, staticsId2);
+
+ if (st1idx == st2idx) {
+ point->x = 0;
+ point->y = 0;
+ } else {
+ int subidx = st1idx + st2idx * _items[idx]->statics.size();
+
+ if (!_items[idx]->subItems[subidx]->movement) {
+ clearMovements2(idx);
+ recalcOffsets(idx, st1idx, st2idx, false, true);
+
+ if (!_items[idx]->subItems[subidx]->movement) {
+ clearMovements2(idx);
+ recalcOffsets(idx, st1idx, st2idx, true, false);
+ }
+ }
+
+ MGMSubItem *sub = _items[idx]->subItems[subidx];
+
+ if (sub->movement) {
+ point->x = sub->x;
+ point->y = sub->y;
+ } else {
+ point->x = 0;
+ point->y = 0;
+ }
+ }
+ }
return point;
}
+int MGM::getStaticsIndexById(int idx, int16 id) {
+ for (uint i = 0; i < _items[idx]->statics.size(); i++) {
+ if (_items[idx]->statics[i]->_staticsId == id)
+ return i;
+ }
+
+ return 0;
+}
+
+void MGM::clearMovements2(int idx) {
+ _items[idx]->movements2.clear();
+}
+
+int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
+ warning("STUB: MGM::recalcOffsets()");
+
+ return 0;
+}
+
MovGraphLink::MovGraphLink() {
_distance = 0;
_angle = 0;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index c54ba71..e5b5928 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -113,7 +113,7 @@ public:
};
struct MGMSubItem {
- int movement;
+ Movement *movement;
int staticsIndex;
int field_8;
int field_C;
@@ -162,6 +162,9 @@ public:
MessageQueue *genMovement(MGMInfo *mgminfo);
void updateAnimStatics(StaticANIObject *ani, int staticsId);
Common::Point *getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2);
+ int getStaticsIndexById(int idx, int16 id);
+ void clearMovements2(int idx);
+ int recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop);
};
struct MctlLadderMovementVars {
Commit: 29a8bb5dbcd1754c3821ed81856249ec9fff2082
https://github.com/scummvm/scummvm/commit/29a8bb5dbcd1754c3821ed81856249ec9fff2082
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-15T04:59:31-08:00
Commit Message:
FULLPIPE: Implement sceneHandler05_makeManFlight()
Changed paths:
engines/fullpipe/constants.h
engines/fullpipe/scenes/scene05.cpp
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index db9b6f6..d6a63da 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -234,6 +234,8 @@ namespace Fullpipe {
#define QU_SC4_GOCLOCK 595
#define QU_SC4_MANFROMBOTTLE 2851
#define QU_SC4_MANTOBOTTLE 2850
+#define QU_SC5_MANBUMP 1167
+#define QU_SC5_MANFLY 1168
#define SC_1 301
#define SC_10 653
#define SC_11 654
@@ -294,6 +296,7 @@ namespace Fullpipe {
#define SND_CMN_070 5199
#define SND_INTR_019 5220
#define ST_BLK_CLOSED 912
+#define ST_BLK_OPEN 913
#define ST_CLK_CLOSED 590
#define ST_DYAS_LIES 318
#define ST_EGTR_MID1 2863
diff --git a/engines/fullpipe/scenes/scene05.cpp b/engines/fullpipe/scenes/scene05.cpp
index 5900e73..0e77311 100644
--- a/engines/fullpipe/scenes/scene05.cpp
+++ b/engines/fullpipe/scenes/scene05.cpp
@@ -72,7 +72,18 @@ void scene05_initScene(Scene *sc) {
}
void sceneHandler05_makeManFlight() {
- warning("STUB: sceneHandler05_makeManFlight()");
+ int qid;
+
+ if (!g_vars->scene05_bigHatch->_statics || g_vars->scene05_bigHatch->_statics->_staticsId != ST_BLK_OPEN)
+ qid = QU_SC5_MANBUMP;
+ else
+ qid = QU_SC5_MANFLY;
+
+ MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(qid), 0, 0);
+
+ mq->setFlags(mq->getFlags() | 1);
+
+ mq->chain(0);
}
void sceneHandler05_makeOtmFeedback() {
Commit: 8b278d1cdd8f83483afef38b2115f5a25e37c603
https://github.com/scummvm/scummvm/commit/8b278d1cdd8f83483afef38b2115f5a25e37c603
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-15T04:59:31-08:00
Commit Message:
FULLPIPE: Implement sceneHandler05_makeWackoFeedback()
Changed paths:
engines/fullpipe/constants.h
engines/fullpipe/scenes/scene05.cpp
diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index d6a63da..d2e295f 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -154,6 +154,10 @@ namespace Fullpipe {
#define MV_MAN_TURN_SUD 1089
#define MV_MANHDL_HANDLEDOWN 630
#define MV_MANHDL_HANDLEUP 631
+#define MV_OTM_BOXHANDLEDOWN 626
+#define MV_OTM_BOXHANDLEUP 627
+#define MV_OTM_HANDLEDOWN 620
+#define MV_OTM_HANDLEUP 621
#define MV_PNK_WEIGHTLEFT 541
#define MV_PNK_WEIGHTRIGHT 502
#define MV_SC4_COIN_default 1029
diff --git a/engines/fullpipe/scenes/scene05.cpp b/engines/fullpipe/scenes/scene05.cpp
index 0e77311..4b61f5b 100644
--- a/engines/fullpipe/scenes/scene05.cpp
+++ b/engines/fullpipe/scenes/scene05.cpp
@@ -86,8 +86,39 @@ void sceneHandler05_makeManFlight() {
mq->chain(0);
}
-void sceneHandler05_makeOtmFeedback() {
- warning("STUB: sceneHandler05_makeOtmFeedback()");
+void sceneHandler05_makeWackoFeedback() {
+ int staticsId1;
+ int staticsId2;
+
+ if (g_fullpipe->getObjectState(sO_WeirdWacko) == g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_InGlasses)) {
+ staticsId1 = ST_OTM_GLS_LEFT;
+ staticsId2 = (g_vars->scene05_handle->_statics->_staticsId == ST_HDL_DOWN) ? MV_OTM_HANDLEUP : MV_OTM_HANDLEDOWN;
+ } else if (g_fullpipe->getObjectState(sO_WeirdWacko) != g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_WithDrawer)) {
+ return;
+ } else {
+ staticsId1 = ST_OTM_BOX_LEFT;
+ staticsId2 = (g_vars->scene05_handle->_statics->_staticsId == ST_HDL_DOWN) ? MV_OTM_BOXHANDLEUP : MV_OTM_BOXHANDLEDOWN;
+ }
+
+ if (g_vars->scene05_wacko->_movement)
+ g_vars->scene05_wacko->changeStatics2(g_vars->scene05_wacko->_movement->_staticsObj2->_staticsId);
+
+ if (staticsId1 == g_vars->scene05_wacko->_statics->_staticsId) {
+ g_vars->scene05_wacko->startAnim(staticsId2, 0, -1);
+ } else {
+ MessageQueue *mq = g_vars->scene05_wacko->changeStatics1(staticsId1);
+
+ if (mq) {
+ mq->setFlags(mq->getFlags() | 1);
+
+ ExCommand *ex = new ExCommand(0, 17, MSG_SC5_MAKEOTMFEEDBACK, 0, 0, 0, 1, 0, 0, 0);
+
+ ex->_excFlags |= 2;
+
+ mq->addExCommandToEnd(ex);
+ mq->_isFinished = 0;
+ }
+ }
}
void sceneHandler05_showHandle() {
@@ -131,7 +162,7 @@ int sceneHandler05(ExCommand *ex) {
case MSG_SC5_MAKEOTMFEEDBACK:
if (!g_fullpipe->_aniMan->_movement || (g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
&& g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
- sceneHandler05_makeOtmFeedback();
+ sceneHandler05_makeWackoFeedback();
g_vars->scene05_var01 = 0;
}
break;
@@ -176,7 +207,7 @@ int sceneHandler05(ExCommand *ex) {
if (!g_fullpipe->_aniMan->_movement || (g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
&& g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
if (g_vars->scene05_var02 % 2)
- sceneHandler05_makeOtmFeedback();
+ sceneHandler05_makeWackoFeedback();
g_vars->scene05_var01 = 0;
More information about the Scummvm-git-logs
mailing list