[Scummvm-cvs-logs] scummvm master -> a917e9d6fe96cbf4ffb3521fdedf6f9ad5e6fe30

sev- sev at scummvm.org
Sat Dec 14 14:16:04 CET 2013


This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
2ab8287f20 FULLPIPE: Implement sceneHandler04_kozFly3()
f57ce931fd FULLPIPE: Implement sceneHandler04_kozFly5()
7bc700ed27 FULLPIPE: Implement sceneHandler04_kozFly7()
87f69f078e FULLPIPE: Implement sceneHandler04_kozFly6()
2c5b5cbb92 FULLPIPE: Implement sceneHandler04_sub8()
625ce270da FULLPIPE: Some renames in MctlLadder
a917e9d6fe FULLPIPE: Add basic logic to sceneHandler04_stopSound(). This completes scene04


Commit: 2ab8287f202995fd635f86813163cef12cf1b5f6
    https://github.com/scummvm/scummvm/commit/2ab8287f202995fd635f86813163cef12cf1b5f6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-14T05:15:09-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_kozFly3()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 6e9f117..dcc9974 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -115,6 +115,8 @@ namespace Fullpipe {
 #define MV_BTN_CLICK 599
 #define MV_CLK_GO 589
 #define MV_HND_POINT 602
+#define MV_KZW_STANDUP 563
+#define MV_KZW_TURN 562
 #define MV_MAN_GOD 481
 #define MV_MAN_GOLADDER 451
 #define MV_MAN_GOLADDER2 2844
@@ -278,6 +280,7 @@ namespace Fullpipe {
 #define ST_IN1MAN_SLEEP 5112
 #define ST_KZW_EMPTY 498
 #define ST_KZW_RIGHT 559
+#define ST_KZW_SIT 560
 #define ST_LBN_0N 2832
 #define ST_LBN_0P 2833
 #define ST_LBN_1N 2753
@@ -316,6 +319,7 @@ namespace Fullpipe {
 #define TrubaRight 696
 #define TrubaUp 680
 #define rMV_MAN_LOOKUP 4775
+#define rMV_KZW_GOR 566
 
 } // End of namespace Fullpipe
 
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index f5b376e..d3abe32 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -550,9 +550,52 @@ void sceneHandler04_raisePlank() {
 }
 
 MessageQueue *sceneHandler04_kozFly3(StaticANIObject *ani, double phase) {
-	warning("STUB: sceneHandler04_kozFly3()");
+	MGM mgm;
+	MGMInfo mgminfo;
 
-	return 0;
+	mgm.addItem(ANI_KOZAWKA);
+
+	mgminfo.ani = ani;
+	mgminfo.staticsId2 = ST_KZW_SIT;
+	mgminfo.x1 = (int)(723.0 - phase * 185.0);
+	mgminfo.y1 = 486;
+	mgminfo.field_1C = 10;
+	mgminfo.field_10 = 1;
+	mgminfo.flags = 78;
+	mgminfo.movementId = MV_KZW_JUMP;
+
+	MessageQueue *mq = mgm.genMovement(&mgminfo);
+
+	if (mq) {
+		ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_TURN, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		for (int i = 0; i < 5; i++) {
+			ex = new ExCommand(ANI_KOZAWKA, 1, rMV_KZW_GOR, 0, 0, 0, 1, 0, 0, 0);
+			ex->_excFlags |= 2;
+			ex->_keyCode = ani->_okeyCode;
+			mq->addExCommandToEnd(ex);
+		}
+
+		ex = new ExCommand(ANI_KOZAWKA, 6, 0, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 3;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 17, MSG_KOZAWRESTART, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 3;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+	}
+
+	return mq;
 }
 
 MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) {


Commit: f57ce931fd9c0862251ce4e39fe3170446021166
    https://github.com/scummvm/scummvm/commit/f57ce931fd9c0862251ce4e39fe3170446021166
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-14T05:15:09-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_kozFly5()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/motion.h
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index dcc9974..b0b6202 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -115,6 +115,8 @@ namespace Fullpipe {
 #define MV_BTN_CLICK 599
 #define MV_CLK_GO 589
 #define MV_HND_POINT 602
+#define MV_KZW_JUMPHIT 2857
+#define MV_KZW_JUMPOUT 586
 #define MV_KZW_STANDUP 563
 #define MV_KZW_TURN 562
 #define MV_MAN_GOD 481
@@ -279,6 +281,7 @@ namespace Fullpipe {
 #define ST_HND_EMPTY 603
 #define ST_IN1MAN_SLEEP 5112
 #define ST_KZW_EMPTY 498
+#define ST_KZW_JUMPOUT 587
 #define ST_KZW_RIGHT 559
 #define ST_KZW_SIT 560
 #define ST_LBN_0N 2832
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index b49fea5..21841af 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -146,6 +146,8 @@ struct MGMInfo {
 	int x2;
 	int y2;
 	int flags;
+
+	MGMInfo() { memset(this, 0, sizeof(MGMInfo)); }
 };
 
 class MGM : public CObject {
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index d3abe32..a75d98d 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -599,9 +599,70 @@ MessageQueue *sceneHandler04_kozFly3(StaticANIObject *ani, double phase) {
 }
 
 MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) {
-	warning("STUB: sceneHandler04_kozFly5()");
+	MGM mgm;
+	MGMInfo mgminfo;
 
-	return 0;
+	mgm.addItem(ANI_KOZAWKA);
+
+	mgminfo.ani = ani;
+	mgminfo.staticsId2 = ST_KZW_JUMPOUT;
+	mgminfo.x1 = 525;
+	mgminfo.y1 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase);
+	mgminfo.field_1C = 10;
+	mgminfo.field_10 = 1;
+	mgminfo.flags = 78;
+	mgminfo.movementId = MV_KZW_JUMPHIT;
+
+	MessageQueue *mq1 = mgm.genMovement(&mgminfo);
+
+	memset(&mgminfo, 0, sizeof(mgminfo));
+	mgminfo.ani = ani;
+	mgminfo.staticsId1 = ST_KZW_JUMPOUT;
+	mgminfo.staticsId2 = ST_KZW_SIT;
+	mgminfo.x2 = 525;
+	mgminfo.y2 = (int)(344.0 - (double)(320 - g_vars->scene04_bottle->_oy) * phase);
+	mgminfo.y1 = 486;
+	mgminfo.field_1C = 10;
+	mgminfo.field_10 = 1;
+	mgminfo.flags = 117;
+	mgminfo.movementId = MV_KZW_JUMPOUT;
+
+	MessageQueue *mq2 = mgm.genMovement(&mgminfo);
+
+	if (mq1 && mq2) {
+		mq1->addExCommandToEnd(new ExCommand(mq2->getExCommandByIndex(0)));
+
+		delete mq2;
+
+		ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq1->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_TURN, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq1->addExCommandToEnd(ex);
+
+		for (int i = 0; i < 5; i++) {
+			ex = new ExCommand(ANI_KOZAWKA, 1, rMV_KZW_GOR, 0, 0, 0, 1, 0, 0, 0);
+			ex->_excFlags |= 2;
+			ex->_keyCode = ani->_okeyCode;
+			mq1->addExCommandToEnd(ex);
+		}
+
+		ex = new ExCommand(ANI_KOZAWKA, 6, 0, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 3;
+		ex->_keyCode = ani->_okeyCode;
+		mq1->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 17, MSG_KOZAWRESTART, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 3;
+		ex->_keyCode = ani->_okeyCode;
+		mq1->addExCommandToEnd(ex);
+	}
+
+	return mq1;
 }
 
 MessageQueue *sceneHandler04_kozFly6(StaticANIObject *ani) {


Commit: 7bc700ed276430606d39aac0a2c756c0b44788d2
    https://github.com/scummvm/scummvm/commit/7bc700ed276430606d39aac0a2c756c0b44788d2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-14T05:15:09-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_kozFly7()

Changed paths:
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index a75d98d..6bcefa3 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -671,10 +671,74 @@ MessageQueue *sceneHandler04_kozFly6(StaticANIObject *ani) {
 	return 0;
 }
 
+void sceneHandler04_kozMove(Movement *mov, int from, int to, Common::Point *points, double phase) {
+	for (int i = from; i < to; i++) {
+		mov->setDynamicPhaseIndex(i);
+
+		Common::Point *p;
+		if (mov->_framePosOffsets) {
+			p = mov->_framePosOffsets[mov->_currDynamicPhaseIndex];
+		} else {
+			p = &mov->_somePoint;
+			p->x = 0;
+			p->y = 0;
+		}
+
+		p->y = (int)((double)points[i].y * phase);
+	}
+}
+
 MessageQueue *sceneHandler04_kozFly7(StaticANIObject *ani, double phase) {
-	warning("STUB: sceneHandler04_kozFly7()");
+	MGM mgm;
+	MGMInfo mgminfo;
 
-	return 0;
+	mgm.addItem(ANI_KOZAWKA);
+
+	mgminfo.ani = ani;
+	mgminfo.staticsId2 = 560;
+	mgminfo.x1 = (int)(250.0 - phase * 100.0);
+	mgminfo.y1 = 455;
+	mgminfo.field_1C = 10;
+	mgminfo.field_10 = 1;
+	mgminfo.flags = 78;
+	mgminfo.movementId = MV_KZW_JUMPROTATE;
+
+	MessageQueue *mq = mgm.genMovement(&mgminfo);
+
+	if (mq) {
+		sceneHandler04_kozMove(ani->getMovementById(MV_KZW_JUMPROTATE), 1, 9, g_vars->scene04_jumpRotateKozyawki, phase * 0.5 + 1.5);
+
+		ani->_priority = 10;
+
+		ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_TURN, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		for (int i = 0; i < 2; i++) {
+			ex = new ExCommand(ANI_KOZAWKA, 1, rMV_KZW_GOR, 0, 0, 0, 1, 0, 0, 0);
+			ex->_excFlags |= 2;
+			ex->_keyCode = ani->_okeyCode;
+			mq->addExCommandToEnd(ex);
+		}
+
+		ex = new ExCommand(ANI_KOZAWKA, 6, 0, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 3;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 17, MSG_KOZAWRESTART, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 3;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+	}
+
+	return mq;
 }
 
 static const int kozTrajectory3[] = {


Commit: 87f69f078e483958e8263352ad2d8c5478fb3042
    https://github.com/scummvm/scummvm/commit/87f69f078e483958e8263352ad2d8c5478fb3042
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-14T05:15:10-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_kozFly6()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index b0b6202..ee89d4e 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -107,6 +107,7 @@ namespace Fullpipe {
 #define MSG_UPDATEBOTTLE 613
 #define MV_EGTR_FATASK 5332
 #define MV_IN1MAN_SLEEP 5111
+#define MV_KZW_GOR 564
 #define MV_KZW_JUMP 558
 #define MV_KZW_JUMPROTATE 561
 #define MV_KZW_TOHOLERV 537
@@ -117,6 +118,7 @@ namespace Fullpipe {
 #define MV_HND_POINT 602
 #define MV_KZW_JUMPHIT 2857
 #define MV_KZW_JUMPOUT 586
+#define MV_KZW_RAISEHEAD 577
 #define MV_KZW_STANDUP 563
 #define MV_KZW_TURN 562
 #define MV_MAN_GOD 481
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 6bcefa3..78695cc 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -666,9 +666,44 @@ MessageQueue *sceneHandler04_kozFly5(StaticANIObject *ani, double phase) {
 }
 
 MessageQueue *sceneHandler04_kozFly6(StaticANIObject *ani) {
-	warning("STUB: sceneHandler04_kozFly6()");
+	MGM mgm;
+	MGMInfo mgminfo;
 
-	return 0;
+	mgm.addItem(ANI_KOZAWKA);
+
+	mgminfo.ani = ani;
+	mgminfo.staticsId2 = ST_KZW_SIT;
+	mgminfo.x1 = 397 - 4 * g_fullpipe->_rnd->getRandomNumber(1);
+	mgminfo.field_1C = ani->_priority;
+	mgminfo.y1 = g_vars->scene04_bottle->_oy - 4 * g_fullpipe->_rnd->getRandomNumber(1) + 109;
+	mgminfo.field_10 = 1;
+	mgminfo.flags = 78;
+	mgminfo.movementId = MV_KZW_JUMPROTATE;
+
+	MessageQueue *mq = mgm.genMovement(&mgminfo);
+
+	if (mq) {
+		mq->deleteExCommandByIndex(mq->getCount() - 1, 1);
+
+		ExCommand *ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_STANDUP, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_GOR, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		ex = new ExCommand(ANI_KOZAWKA, 1, MV_KZW_RAISEHEAD, 0, 0, 0, 1, 0, 0, 0);
+		ex->_excFlags |= 2;
+		ex->_keyCode = ani->_okeyCode;
+		mq->addExCommandToEnd(ex);
+
+		g_vars->scene04_var11 = 1;
+	}
+
+	return mq;
 }
 
 void sceneHandler04_kozMove(Movement *mov, int from, int to, Common::Point *points, double phase) {


Commit: 2c5b5cbb92455bb37d3061facf5178531c7b9142
    https://github.com/scummvm/scummvm/commit/2c5b5cbb92455bb37d3061facf5178531c7b9142
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-14T05:15:10-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_sub8()

Changed paths:
    engines/fullpipe/constants.h
    engines/fullpipe/motion.cpp
    engines/fullpipe/motion.h
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index ee89d4e..b2ebea6 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -121,16 +121,19 @@ namespace Fullpipe {
 #define MV_KZW_RAISEHEAD 577
 #define MV_KZW_STANDUP 563
 #define MV_KZW_TURN 562
+#define MV_MAN_FROMLADDER 493
 #define MV_MAN_GOD 481
 #define MV_MAN_GOLADDER 451
 #define MV_MAN_GOLADDER2 2844
 #define MV_MAN_GOU 460
 #define MV_MAN_JUMPONPLANK 551
 #define MV_MAN_LOOKLADDER 520
+#define MV_MAN_LOOKLADDERRV 556
 #define MV_MAN_LOOKUP 4773
 #define MV_MAN_PLANKTOLADDER 553
 #define MV_MAN_STARTLADDER 452
 #define MV_MAN_STARTLADDER2 2842
+#define MV_MAN_STARTLADDERD 457
 #define MV_MAN_STOPLADDER 454
 #define MV_MAN_STOPLADDER2 2845
 #define MV_MAN_TOLADDER 448
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index fbe2768..3451259 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -309,6 +309,10 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *subj, int xpos, int ypos, in
 	return 0;
 }
 
+MessageQueue *MctlLadder::controllerWalkTo(StaticANIObject *ani, int off) {
+	return doWalkTo(ani, _objId + off * _ladder_field_18, _ladderY + off * _height, 1, 0);
+}
+
 MctlConnectionPoint *MctlCompound::findClosestConnectionPoint(int ox, int oy, int destIndex, int connectionX, int connectionY, int sourceIndex, int *minDistancePtr) {
 	warning("STUB: MctlCompound::findClosestConnectionPoint()");
 
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 21841af..b1e4b69 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -76,9 +76,7 @@ public:
 };
 
 class MctlCompoundArrayItem : public CObject {
-	friend class MctlCompound;
-
-protected:
+public:
 	MotionController *_motionControllerObj;
 	MovGraphReact *_movGraphReactObj;
 	Common::Array<MctlConnectionPoint *> _connectionPoints;
@@ -96,9 +94,9 @@ class MctlCompoundArray : public Common::Array<MctlCompoundArrayItem *>, public
 };
 
 class MctlCompound : public MotionController {
+public:
 	MctlCompoundArray _motionControllers;
 
- public:
 	MctlCompound() { _objtype = kObjTypeMctlCompound; }
 
 	virtual bool load(MfcArchive &file);
@@ -204,6 +202,8 @@ public:
 	virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
 	virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
 
+	MessageQueue *controllerWalkTo(StaticANIObject *ani, int off);
+
 private:
 	int findObjectPos(StaticANIObject *obj);
 	bool initMovement(StaticANIObject *ani, MctlLadderMovement *movement);
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 78695cc..8c4dba0 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -1033,10 +1033,6 @@ void sceneHandler04_goClock() {
 	g_vars->scene04_var14 = 0;
 }
 
-void sceneHandler04_sub8(ExCommand *ex) {
-	warning("STUB: sceneHandler04_sub8()");
-}
-
 void sceneHandler04_sub12() {
 	StaticANIObject *ball =  g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
 
@@ -1047,6 +1043,82 @@ void sceneHandler04_sub12() {
 	g_vars->scene04_var13 = 0;
 }
 
+void sceneHandler04_sub8(ExCommand *ex) {
+	if (!g_fullpipe->_aniMan->isIdle())
+		return;
+
+	if (!(g_fullpipe->_aniMan->_flags & 0x100)) {
+		if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_objtype == kObjTypeMctlCompound) {
+			MctlCompound *mc = (MctlCompound *)getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId);
+
+			if (mc->_motionControllers[0]->_movGraphReactObj->pointInRegion(g_fullpipe->_sceneRect.left + ex->_x, g_fullpipe->_sceneRect.top + ex->_y)) {
+				if (g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan)) {
+					MessageQueue *mq = g_vars->scene04_ladder->controllerWalkTo(g_fullpipe->_aniMan, 0);
+
+					if (mq) {
+						mq->addExCommandToEnd(new ExCommand(ex));
+
+						if (mq->chain(g_fullpipe->_aniMan) )
+							ex->_messageKind = 0;
+						else
+							delete mq;
+
+						if (g_vars->scene04_var13) {
+							sceneHandler04_sub12();
+							return;
+						}
+					}
+				} else {
+					MessageQueue *mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+					ExCommand *ex1;
+
+					if (g_fullpipe->_aniMan->_statics->_staticsId == ST_MAN_LADDERDOWN) {
+						ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_LOOKLADDERRV, 0, 0, 0, 1, 0, 0, 0);
+						ex1->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+						ex1->_excFlags |= 2;
+						mq->addExCommandToEnd(ex1);
+					}
+
+					ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_STARTLADDERD, 0, 0, 0, 1, 0, 0, 0);
+					ex1->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+					ex1->_excFlags |= 2;
+					mq->addExCommandToEnd(ex1);
+
+					ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_FROMLADDER, 0, 0, 0, 1, 0, 0, 0);
+					ex1->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+					ex1->_excFlags |= 2;
+					mq->addExCommandToEnd(ex1);
+
+					ex1 = new ExCommand(ex);
+					mq->addExCommandToEnd(ex1);
+
+					mq->setFlags(mq->getFlags() | 1);
+
+					if (mq->chain(g_fullpipe->_aniMan)) {
+						if (g_vars->scene04_ladder)
+							delete g_vars->scene04_ladder;
+
+						g_vars->scene04_ladder = 0;
+						g_vars->scene04_dudeOnLadder = 0;
+
+						ex->_messageKind = 0;
+
+						mc->setEnabled();
+						getGameLoaderInteractionController()->enableFlag24();
+					} else if (mq) {
+						delete mq;
+					}
+
+					if (g_vars->scene04_var13) {
+						sceneHandler04_sub12();
+						return;
+					}
+				}
+			}
+		}
+	}
+}
+
 void sceneHandler04_handTake() {
 	g_vars->scene04_clock->changeStatics2(ST_CLK_CLOSED);
 


Commit: 625ce270da5aaaa6f1ff34f2e4b1779c48766117
    https://github.com/scummvm/scummvm/commit/625ce270da5aaaa6f1ff34f2e4b1779c48766117
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-14T05:15:10-08:00

Commit Message:
FULLPIPE: Some renames in MctlLadder

Changed paths:
    engines/fullpipe/motion.cpp
    engines/fullpipe/motion.h
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 3451259..9bacfec 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -186,8 +186,8 @@ MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos,
 }
 
 MctlLadder::MctlLadder() {
-	_ladder_field_18 = 0;
-	_objId = 0;
+	_width = 0;
+	_ladderX = 0;
 	_height = 0;
 	_ladderY = 0;
 	_ladder_field_14 = 0;
@@ -310,7 +310,7 @@ MessageQueue *MctlLadder::doWalkTo(StaticANIObject *subj, int xpos, int ypos, in
 }
 
 MessageQueue *MctlLadder::controllerWalkTo(StaticANIObject *ani, int off) {
-	return doWalkTo(ani, _objId + off * _ladder_field_18, _ladderY + off * _height, 1, 0);
+	return doWalkTo(ani, _ladderX + off * _width, _ladderY + off * _height, 1, 0);
 }
 
 MctlConnectionPoint *MctlCompound::findClosestConnectionPoint(int ox, int oy, int destIndex, int connectionX, int connectionY, int sourceIndex, int *minDistancePtr) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index b1e4b69..7d35c3f 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -181,10 +181,10 @@ struct MctlLadderMovement {
 
 class MctlLadder : public MotionController {
 public:
-	int _objId;
+	int _ladderX;
 	int _ladderY;
 	int _ladder_field_14;
-	int _ladder_field_18;
+	int _width;
 	int _height;
 	int _ladder_field_20;
 	int _ladder_field_24;
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 8c4dba0..cd0b40f 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -313,10 +313,10 @@ void sceneHandler04_walkClimbLadder(ExCommand *ex) {
 	g_vars->scene04_dudeOnLadder = 1;
 
 	g_vars->scene04_ladder = new MctlLadder;
-	g_vars->scene04_ladder->_objId = MV_MAN_TURN_SUD;
+	g_vars->scene04_ladder->_ladderX = 1089;
 	g_vars->scene04_ladder->_ladderY = 406;
 	g_vars->scene04_ladder->_ladder_field_14 = 12;
-	g_vars->scene04_ladder->_ladder_field_18 = 0;
+	g_vars->scene04_ladder->_width = 0;
 	g_vars->scene04_ladder->_height = -40;
 	g_vars->scene04_ladder->_ladder_field_20 = 0;
 	g_vars->scene04_ladder->_ladder_field_24 = -60;


Commit: a917e9d6fe96cbf4ffb3521fdedf6f9ad5e6fe30
    https://github.com/scummvm/scummvm/commit/a917e9d6fe96cbf4ffb3521fdedf6f9ad5e6fe30
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-14T05:15:10-08:00

Commit Message:
FULLPIPE: Add basic logic to sceneHandler04_stopSound(). This completes scene04

Changed paths:
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index cd0b40f..875b38f 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -879,6 +879,8 @@ void sceneHandler04_showCoin() {
 }
 
 void sceneHandler04_stopSound() {
+	g_vars->scene04_soundPlaying = 0;
+
 	warning("STUB: sceneHandler04_stopSound()");
 }
 
@@ -1018,6 +1020,10 @@ void sceneHandler04_liftBottle() {
 
 void sceneHandler04_startSounds(const char *snd1, const char *snd2, const char *snd3) {
 	warning("STUB: sceneHandler04_startSounds()");
+
+	// playFile(snd1);
+	// playFile(snd2);
+	// playFile(snd3);
 }
 
 void sceneHandler04_goClock() {






More information about the Scummvm-git-logs mailing list