[Scummvm-cvs-logs] scummvm master -> 88a1799474bc0fe9c03479a29b73f9a5dce2659b

sev- sev at scummvm.org
Mon Oct 28 00:00:37 CET 2013


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:
0d4055fe7f FULLPIPE: Implement sceneHandlerIntro()
88a1799474 FULLPIPE: Make BaseModalObject pure virtual


Commit: 0d4055fe7f68c7cff2d69b1a3d9340061434bafc
    https://github.com/scummvm/scummvm/commit/0d4055fe7f68c7cff2d69b1a3d9340061434bafc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-27T16:00:06-07:00

Commit Message:
FULLPIPE: Implement sceneHandlerIntro()

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 796764d..fe72238 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -35,12 +35,17 @@ namespace Fullpipe {
 #define MSG_ENABLESAVES 5202
 #define MSG_HMRKICK_METAL 4764
 #define MSG_HMRKICK_STUCCO 4765
+#define MSG_INTR_ENDINTRO 5139
+#define MSG_INTR_GETUPMAN 5135
+#define MSG_INTR_SWITCHTO1 5145
+#define MSG_INTR_SWITCHTO2 5134
 #define MSG_MANSHADOWSOFF 5196
 #define MSG_MANSHADOWSON 5197
 #define MSG_RESTARTGAME 4767
 #define MSG_SC1_SHOWOSK 1019
 #define MSG_SC1_SHOWOSK2 468
 #define MSG_SC1_UTRUBACLICK 1100
+#define MV_IN1MAN_SLEEP 5111
 #define MV_MAN_GOLADDER 451
 #define MV_MAN_GOLADDER2 2844
 #define MV_MAN_LOOKUP 4773
@@ -93,6 +98,9 @@ namespace Fullpipe {
 #define PIC_SC1_OSK 1018
 #define PIC_SC1_OSK2 2932
 #define PIC_SCD_SEL 734
+#define QU_IN2_DO 5144
+#define QU_INTR_FINISH 5138
+#define QU_INTR_GETUPMAN 5136
 #define SC_1 301
 #define SC_10 653
 #define SC_11 654
@@ -147,6 +155,7 @@ namespace Fullpipe {
 #define SC_TITLES 5166
 #define SND_CMN_031 3516
 #define SND_CMN_070 5199
+#define ST_IN1MAN_SLEEP 5112
 #define ST_LBN_0N 2832
 #define ST_LBN_0P 2833
 #define ST_LBN_1N 2753
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index b5f3c7f..cad1934 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -756,4 +756,23 @@ void updateGlobalMessageQueue(int id, int objid) {
 	}
 }
 
+bool chainQueue(int queueId, int flags) {
+	MessageQueue *mq = g_fullpipe->_currentScene->getMessageQueueById(queueId);
+
+	if (!mq)
+		return false;
+
+	MessageQueue *nmq = new MessageQueue(mq, 0, 0);
+
+	nmq->_flags |= flags;
+
+	if (!mq->chain(0)) {
+		delete mq;
+
+		return false;
+	}
+
+	return true;
+}
+
 } // End of namespace Fullpipe
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index 5238ba7..3e0da29 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -173,6 +173,8 @@ void processMessages();
 void updateGlobalMessageQueue(int id, int objid);
 void clearGlobalMessageQueueList1();
 
+bool chainQueue(int queueId, int flags);
+
 } // End of namespace Fullpipe
 
 #endif /* FULLPIPE_MESSAGEQUEUE_H */
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 40d9f21..1793ffd 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -1422,8 +1422,57 @@ void sceneIntro_initScene(Scene *sc) {
 	g_fullpipe->_modalObject = new ModalIntro;
 }
 
-int sceneHandlerIntro(ExCommand *cmd) {
-	warning("STUB: sceneHandlerIntro()");
+void sceneHandlerIntro_part1() {
+	g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO1);
+	chainQueue(QU_INTR_FINISH, 0);
+}
+
+void sceneHandlerIntro_part2() {
+	g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO2);
+	chainQueue(QU_IN2_DO, 0);
+}
+
+int sceneHandlerIntro(ExCommand *ex) {
+	if (ex->_messageKind != 17)
+		return 0;
+
+	switch (ex->_messageNum) {
+	case MSG_INTR_ENDINTRO:
+		g_vars->sceneIntro_playing = 0;
+		return 0;
+
+	case MSG_INTR_SWITCHTO1:
+		sceneHandlerIntro_part1();
+		return 0;
+
+	case MSG_INTR_GETUPMAN:
+		g_vars->sceneIntro_needSleep = 0;
+		g_vars->sceneIntro_needGetup = 1;
+		return 0;
+
+	case MSG_INTR_SWITCHTO2:
+		sceneHandlerIntro_part2();
+		return 0;
+
+	case 33:
+		// fall trhough
+		break;
+
+	default:
+		return 0;
+	}
+
+	if (g_vars->sceneIntro_needSleep) {
+		if (!g_vars->sceneIntro_aniin1man->_movement && g_vars->sceneIntro_aniin1man->_statics->_staticsId == ST_IN1MAN_SLEEP)
+			g_vars->sceneIntro_aniin1man->startAnim(MV_IN1MAN_SLEEP, 0, -1);
+	} else if (g_vars->sceneIntro_needGetup && !g_vars->sceneIntro_aniin1man->_movement &&
+			   g_vars->sceneIntro_aniin1man->_statics->_staticsId == ST_IN1MAN_SLEEP) {
+		g_vars->sceneIntro_needGetup = 0;
+
+		chainQueue(QU_INTR_GETUPMAN, 0);
+	}
+
+	g_fullpipe->startSceneTrack();
 
 	return 0;
 }


Commit: 88a1799474bc0fe9c03479a29b73f9a5dce2659b
    https://github.com/scummvm/scummvm/commit/88a1799474bc0fe9c03479a29b73f9a5dce2659b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-10-27T16:00:06-07:00

Commit Message:
FULLPIPE: Make BaseModalObject pure virtual

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



diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index 26048ce..85999bc 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -28,29 +28,6 @@
 
 namespace Fullpipe {
 
-bool BaseModalObject::handleMessage(ExCommand *message) {
-	warning("STUB: BaseModalObject::handleMessage()");
-
-	return true;
-}
-
-bool BaseModalObject::init(int counterdiff) {
-	warning("STUB: BaseModalObject::init(%d)", counterdiff);
-
-	return true;
-}
-
-bool BaseModalObject::update() {
-	warning("STUB: BaseModalObject::update()");
-
-	return true;
-}
-
-void BaseModalObject::saveload() {
-	warning("STUB: BaseModalObject::saveload()");
-}
-
-
 ModalIntro::ModalIntro() {
 	_field_8 = 0;
 	_countDown = 0;
@@ -91,6 +68,22 @@ bool ModalIntro::handleMessage(ExCommand *message) {
 	return true;
 }
 
+bool ModalIntro::init(int counterdiff) {
+	warning("STUB: ModalIntro::init(%d)", counterdiff);
+
+	return true;
+}
+
+bool ModalIntro::update() {
+	warning("STUB: ModalIntro::update()");
+
+	return true;
+}
+
+void ModalIntro::saveload() {
+	// No saveload
+}
+
 void FullpipeEngine::openMap() {
 	warning("STUB: FullpipeEngine::openMap()");
 }
diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h
index 7d98427..3562622 100644
--- a/engines/fullpipe/modal.h
+++ b/engines/fullpipe/modal.h
@@ -34,11 +34,10 @@ class BaseModalObject {
  	BaseModalObject() : _parentObj(0) {}
 	virtual ~BaseModalObject() {}
 
-	virtual bool handleMessage(ExCommand *message);
-	virtual bool init(int counterdiff);
-	virtual bool update();
-
-	void saveload();
+	virtual bool handleMessage(ExCommand *message) = 0;
+	virtual bool init(int counterdiff) = 0;
+	virtual bool update() = 0;
+	virtual void saveload() = 0;
 };
 
 class ModalIntro : public BaseModalObject {
@@ -52,6 +51,9 @@ class ModalIntro : public BaseModalObject {
 	ModalIntro();
 
 	virtual bool handleMessage(ExCommand *message);
+	virtual bool init(int counterdiff);
+	virtual bool update();
+	virtual void saveload();
 };
 
 } // End of namespace Fullpipe






More information about the Scummvm-git-logs mailing list