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

sev- sev at scummvm.org
Sun Dec 29 22:52:45 CET 2013


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

Summary:
ddb4e0af76 FULLPIPE: Implement sceneHandler13()
b10bc540a3 FULLPIPE: Enable scene13
ec6da5a450 FULLPIPE: Implement MotionController::getLinkByName()


Commit: ddb4e0af76faa22e98b2b5f6e9fa643abfb13361
    https://github.com/scummvm/scummvm/commit/ddb4e0af76faa22e98b2b5f6e9fa643abfb13361
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-29T13:12:26-08:00

Commit Message:
FULLPIPE: Implement sceneHandler13()

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index dcd2ad0..c51db8a 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -536,6 +536,19 @@ namespace Fullpipe {
 #define ANI_HANDLE_R 1196
 #define ANI_STOROZH 1172
 #define ANI_WHIRLGIG_13 1383
+#define MSG_SC13_CHEW 1220
+#define MSG_SC13_CLOSEBRIDGE 3046
+#define MSG_SC13_CLOSEFAST 1267
+#define MSG_SC13_EATGUM 1219
+#define MSG_SC13_OPENBRIDGE 3064
+#define MSG_SC13_OPENFAST 1266
+#define MSG_SC13_SHOWGUM 1215
+#define MSG_SC13_STARTWHIRLGIG 1388
+#define MSG_SC13_STOPWHIRLGIG 1387
+#define MSG_SC13_TESTCLOSE 3065
+#define MSG_SC13_TESTOPEN 3048
+#define MSG_SC13_UNEATGUM 1218
+#define MSG_SC13_UPDATEBRIDGE 1217
 #define MV_WHR13_SPIN 1384
 #define SND_13_018 3763
 #define SND_13_037 5335
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 8c15bd3..5c2f817 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -197,6 +197,7 @@ Vars::Vars() {
 	scene13_bridge = 0;
 	scene13_var01 = 0;
 	scene13_var02 = 0;
+	scene13_var03 = 0;
 
 	scene15_chantingCountdown = 0;
 	scene15_plusminus = 0;
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 70d55dd..a46ea5c 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -265,6 +265,7 @@ public:
 	StaticANIObject *scene13_bridge;
 	int scene13_var01;
 	int scene13_var02;
+	int scene13_var03;
 
 	int scene15_chantingCountdown;
 	StaticANIObject *scene15_plusminus;
diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp
index cb36d38..29e635a 100644
--- a/engines/fullpipe/scenes/scene13.cpp
+++ b/engines/fullpipe/scenes/scene13.cpp
@@ -80,4 +80,189 @@ void scene13_initScene(Scene *sc) {
 	g_fp->initArcadeKeys("SC_13");
 }
 
+void sceneHandler13_openBridge() {
+	warning("STUB: sceneHandler13_openBridge()");
+}
+
+void sceneHandler13_testClose() {
+	warning("STUB: sceneHandler13_testClose()");
+}
+
+void sceneHandler13_testOpen() {
+	warning("STUB: sceneHandler13_testOpen()");
+}
+
+void sceneHandler13_closeBridge() {
+	warning("STUB: sceneHandler13_closeBridge()");
+}
+
+void sceneHandler13_closeFast() {
+	warning("STUB: sceneHandler13_closeFast()");
+}
+
+void sceneHandler13_stopWhirlgig() {
+	warning("STUB: sceneHandler13_stopWhirlgig()");
+}
+
+void sceneHandler13_startWhirlgig() {
+	warning("STUB: sceneHandler13_startWhirlgig()");
+}
+
+void sceneHandler13_openFast() {
+	warning("STUB: sceneHandler13_openFast()");
+}
+
+void sceneHandler13_uneatGum() {
+	warning("STUB: sceneHandler13_uneatGum()");
+}
+
+void sceneHandler13_eatGum() {
+	warning("STUB: sceneHandler13_eatGum()");
+}
+
+void sceneHandler13_updateBridge() {
+	warning("STUB: sceneHandler13_updateBridge()");
+}
+
+void sceneHandler13_showGum() {
+	warning("STUB: sceneHandler13_showGum()");
+}
+
+void sceneHandler13_sub01(bool flag) {
+	warning("STUB: sceneHandler13_sub01()");
+}
+
+void sceneHandler13_sub02(bool flag) {
+	warning("STUB: sceneHandler13_sub02()");
+}
+
+void sceneHandler13_sub03(bool flag) {
+	warning("STUB: sceneHandler13_sub03()");
+}
+
+int sceneHandler13(ExCommand *cmd) {
+	if (cmd->_messageKind != 17)
+		return 0;
+
+	switch(cmd->_messageNum) {
+	case MSG_SC13_OPENBRIDGE:
+		sceneHandler13_openBridge();
+        break;
+
+	case MSG_SC13_TESTCLOSE:
+		sceneHandler13_testClose();
+		break;
+
+	case MSG_SC13_TESTOPEN:
+        sceneHandler13_testOpen();
+		break;
+
+	case MSG_SC13_CLOSEBRIDGE:
+		sceneHandler13_closeBridge();
+		break;
+
+	case MSG_SC13_CLOSEFAST:
+		sceneHandler13_closeFast();
+		break;
+
+	case MSG_SC13_STOPWHIRLGIG:
+		sceneHandler13_stopWhirlgig();
+		break;
+
+	case MSG_SC13_STARTWHIRLGIG:
+		sceneHandler13_startWhirlgig();
+		break;
+
+	case MSG_SC13_OPENFAST:
+		sceneHandler13_openFast();
+		break;
+
+	case MSG_SC13_UNEATGUM:
+		sceneHandler13_uneatGum();
+		break;
+
+	case MSG_SC13_EATGUM:
+		sceneHandler13_eatGum();
+		break;
+
+	case MSG_SC13_CHEW:
+		g_vars->scene13_guard->_flags &= 0xFF7Fu;
+		break;
+
+	case MSG_SC13_UPDATEBRIDGE:
+		sceneHandler13_updateBridge();
+		break;
+
+	case MSG_SC13_SHOWGUM:
+		sceneHandler13_showGum();
+		break;
+
+	case 29:
+		{
+			StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+
+			if (!ani || !canInteractAny(g_fp->_aniMan, ani, cmd->_keyCode)) {
+				int picId = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+				PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picId, 0);
+
+				if (!pic || !canInteractAny(g_fp->_aniMan, pic, cmd->_keyCode)) {
+					if ((g_fp->_sceneRect.right - cmd->_sceneClickX < 47
+						 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1)
+						|| (cmd->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) {
+						g_fp->processArcade(cmd);
+					}
+				}
+			}
+			break;
+		}
+
+	case 33:
+		{
+			int res = 0;
+			int x;
+
+			if (g_fp->_aniMan2) {
+				x = g_fp->_aniMan2->_ox;
+				g_vars->scene13_var03 = x;
+
+				if (x < g_fp->_sceneRect.left + 200)
+					g_fp->_currentScene->_x = x - g_fp->_sceneRect.left - 300;
+
+				if (x > g_fp->_sceneRect.right - 200)
+					g_fp->_currentScene->_x = x - g_fp->_sceneRect.right + 300;
+
+				res = 1;
+			} else {
+				x = g_vars->scene13_var03;
+			}
+
+			if (g_vars->scene13_var02) {
+				if (x < 1022) {
+					sceneHandler13_sub01(1);
+					sceneHandler13_sub02(0);
+
+					g_vars->scene13_var02 = 0;
+
+					g_fp->_behaviorManager->updateBehaviors();
+					g_fp->startSceneTrack();
+
+					return res;
+				}
+			} else if (x > 1022) {
+				sceneHandler13_sub01(0);
+				sceneHandler13_sub02(1);
+
+				g_vars->scene13_var02 = 1;
+			}
+
+			g_fp->_behaviorManager->updateBehaviors();
+			g_fp->startSceneTrack();
+
+			return res;
+		}
+	}
+
+	return 0;
+}
+
 } // End of namespace Fullpipe


Commit: b10bc540a3a94155f9723db90955a62e77097716
    https://github.com/scummvm/scummvm/commit/b10bc540a3a94155f9723db90955a62e77097716
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-29T13:18:51-08:00

Commit Message:
FULLPIPE: Enable scene13

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



diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 5c2f817..9bdd334 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -490,7 +490,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
 		_updateCursorCallback = defaultUpdateCursor;
 		break;
 
-#if 0
 	case SC_13:
 		sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_13");
 		scene->preloadMovements(sceneVar);
@@ -502,6 +501,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
 		_updateCursorCallback = defaultUpdateCursor;
 		break;
 
+#if 0
 	case SC_14:
 		sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_14");
 		scene->preloadMovements(sceneVar);
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index a46ea5c..c9600fa 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -80,6 +80,9 @@ int scene11_updateCursor();
 void scene12_initScene(Scene *sc);
 int sceneHandler12(ExCommand *ex);
 
+void scene13_initScene(Scene *sc);
+int sceneHandler13(ExCommand *ex);
+
 int scene15_updateCursor();
 void scene15_initScene(Scene *sc);
 int sceneHandler15(ExCommand *cmd);


Commit: ec6da5a4503ea4bc773bdc2643578d5555d13c18
    https://github.com/scummvm/scummvm/commit/ec6da5a4503ea4bc773bdc2643578d5555d13c18
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-29T13:50:15-08:00

Commit Message:
FULLPIPE: Implement MotionController::getLinkByName()

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



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 45ff4ae..8c924e7 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -47,7 +47,39 @@ void MotionController::enableLinks(const char *linkName, bool enable) {
 }
 
 MovGraphLink *MotionController::getLinkByName(const char *name) {
-	warning("STUB: MotionController::getLinkByName()");
+	if (_objtype == kObjTypeMctlCompound) {
+		MctlCompound *obj = (MctlCompound *)this;
+
+		for (uint i = 0;  i < obj->getMotionControllerCount(); i++) {
+			MotionController *con = obj->getMotionController(i);
+
+			if (con->_objtype == kObjTypeMovGraph) {
+				MovGraph *gr = (MovGraph *)con;
+
+				for (ObList::iterator l = gr->_links.begin(); l != gr->_links.end(); ++l) {
+					assert(((CObject *)*l)->_objtype == kObjTypeMovGraphLink);
+
+					MovGraphLink *lnk = (MovGraphLink *)*l;
+
+					if (!strcmp(lnk->_name, name))
+						return lnk;
+				}
+			}
+		}
+	}
+
+	if (_objtype == kObjTypeMovGraph) {
+		MovGraph *gr = (MovGraph *)this;
+
+		for (ObList::iterator l = gr->_links.begin(); l != gr->_links.end(); ++l) {
+			assert(((CObject *)*l)->_objtype == kObjTypeMovGraphLink);
+
+			MovGraphLink *lnk = (MovGraphLink *)*l;
+
+			if (!strcmp(lnk->_name, name))
+				return lnk;
+		}
+	}
 
 	return 0;
 }
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 24f047d..1f1e7a7 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -115,6 +115,9 @@ public:
 	void initMovGraph2();
 	MctlConnectionPoint *findClosestConnectionPoint(int ox, int oy, int destIndex, int connectionX, int connectionY, int sourceIndex, int *minDistancePtr);
 	void replaceNodeX(int from, int to);
+
+	uint getMotionControllerCount() { return _motionControllers.size(); }
+	MotionController *getMotionController(int num) { return _motionControllers[num]->_motionControllerObj; }
 };
 
 struct MGMSubItem {






More information about the Scummvm-git-logs mailing list