[Scummvm-cvs-logs] scummvm master -> 5d759d181f228d4b6576647dcf3d668fe931a324

sev- sev at scummvm.org
Tue Nov 5 23:42:13 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:
95c7cba9f4 FULLPIPE: More work on scene03
38dfb4da38 FULLPIPE: More scene03 functions
b895a88a4f FULLPIPE: Remaining scene03 functions
5d759d181f FULLPIPE: Completed scene03 code


Commit: 95c7cba9f4c824eca22e77557283600caecb7078
    https://github.com/scummvm/scummvm/commit/95c7cba9f4c824eca22e77557283600caecb7078
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-11-05T14:41:35-08:00

Commit Message:
FULLPIPE: More work on scene03

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index c0034e4..9816ec9 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -29,6 +29,11 @@ namespace Fullpipe {
 #define ANI_DOMINO_3 2732
 #define ANI_EGGEATER 334
 #define ANI_IN1MAN 5110
+#define ANI_INV_EGGAPL 1564
+#define ANI_INV_EGGBOOT 1570
+#define ANI_INV_EGGCOIN 1567
+#define ANI_INV_EGGDOM 1561
+#define ANI_INV_EGGGLS 1573
 #define ANI_INV_MAP 5321
 #define ANI_LIFTBUTTON 2751
 #define ANI_MAN 322
@@ -47,6 +52,7 @@ namespace Fullpipe {
 #define MSG_SC1_SHOWOSK 1019
 #define MSG_SC1_SHOWOSK2 468
 #define MSG_SC1_UTRUBACLICK 1100
+#define MV_EGTR_FATASK 5332
 #define MV_IN1MAN_SLEEP 5111
 #define MV_MAN_GOLADDER 451
 #define MV_MAN_GOLADDER2 2844
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index a655ee8..ce53e91 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -1600,6 +1600,33 @@ int scene03_updateCursor() {
 	return g_fullpipe->_cursorId;
 }
 
+void sceneHandler03_eaterFat() {
+	g_vars->scene03_eggeater->_flags &= 0xFF7F;
+
+	g_vars->scene03_eggeater->startAnim(MV_EGTR_FATASK, 0, -1);
+}
+
+void sceneHandler03_swallowEgg(int item) {
+	if (!g_vars->swallowedEgg1->_value.intValue) {
+		g_vars->swallowedEgg1->_value.intValue = item;
+	} else if (!g_vars->swallowedEgg2->_value.intValue) {
+		g_vars->swallowedEgg2->_value.intValue = item;
+	} else if (!g_vars->swallowedEgg3->_value.intValue) {
+		g_vars->swallowedEgg3->_value.intValue = item;
+
+		g_fullpipe->setObjectState(sO_EggGulperGaveCoin, g_fullpipe->getObjectEnumState(sO_EggGulperGaveCoin, sO_Yes));
+
+		scene03_setEaterState();
+	}
+}
+
+void sceneHandler03_giveItem(ExCommand *ex) {
+	if (ex->_parentId == ANI_INV_EGGAPL || ex->_parentId == ANI_INV_EGGDOM ||
+		ex->_parentId == ANI_INV_EGGCOIN || ex->_parentId == ANI_INV_EGGBOOT ||
+		ex->_parentId == ANI_INV_EGGGLS)
+		sceneHandler03_swallowEgg(ex->_parentId);
+}
+
 int sceneHandler03(ExCommand *ex) {
 #if 0
 	if (ex->_messageKind != 17) {


Commit: 38dfb4da38a27368e787babab8f2996ad8674d95
    https://github.com/scummvm/scummvm/commit/38dfb4da38a27368e787babab8f2996ad8674d95
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-11-05T14:41:35-08:00

Commit Message:
FULLPIPE: More scene03 functions

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 9816ec9..c7bb33a 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -29,6 +29,7 @@ namespace Fullpipe {
 #define ANI_DOMINO_3 2732
 #define ANI_EGGEATER 334
 #define ANI_IN1MAN 5110
+#define ANI_INV_COIN 875
 #define ANI_INV_EGGAPL 1564
 #define ANI_INV_EGGBOOT 1570
 #define ANI_INV_EGGCOIN 1567
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index ce53e91..f951cac 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -1627,6 +1627,34 @@ void sceneHandler03_giveItem(ExCommand *ex) {
 		sceneHandler03_swallowEgg(ex->_parentId);
 }
 
+int sceneHandler03_swallowedEgg1State() {
+	return g_vars->swallowedEgg1->_value.intValue;
+}
+
+void sceneHandler03_getCoin(ExCommand *ex) {
+	MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex->_parId);
+
+	if (mq && mq->getCount() > 0) {
+		ExCommand *ex0 = mq->getExCommandByIndex(0);
+		ExCommand *ex1 = mq->getExCommandByIndex(1);
+
+		if (sceneHandler03_swallowedEgg1State()) {
+			ex0->_messageKind = 1;
+			ex1->_messageKind = 1;
+
+			getGameLoaderInventory()->removeItem(ANI_INV_COIN, 1);
+		} else {
+			ex0->_messageKind = 0;
+			ex0->_excFlags |= 1;
+
+			ex1->_messageKind = 0;
+			ex1->_excFlags |= 1;
+
+			g_vars->scene03_eggeater->_flags &= 0xFF7Fu;
+		}
+	}
+}
+
 int sceneHandler03(ExCommand *ex) {
 #if 0
 	if (ex->_messageKind != 17) {


Commit: b895a88a4f2ad9e4755fb462f295333bf439634c
    https://github.com/scummvm/scummvm/commit/b895a88a4f2ad9e4755fb462f295333bf439634c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-11-05T14:41:35-08:00

Commit Message:
FULLPIPE: Remaining scene03 functions

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index c7bb33a..c8cd05d 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -108,6 +108,7 @@ namespace Fullpipe {
 #define PIC_SC1_OSK 1018
 #define PIC_SC1_OSK2 2932
 #define PIC_SC3_DOMIN 5182
+#define PIC_SC3_LADDER 1102
 #define PIC_SCD_SEL 734
 #define QU_EGTR_MD2_SHOW 4698
 #define QU_EGTR_MD1_SHOW 4697
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index f951cac..245bd02 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -1655,6 +1655,56 @@ void sceneHandler03_getCoin(ExCommand *ex) {
 	}
 }
 
+void sceneHandler03_goLadder() {
+	handleObjectInteraction(g_fullpipe->_aniMan, g_fullpipe->_currentScene->getPictureObjectById(PIC_SC3_LADDER, 0), 0);
+}
+
+void sceneHandler03_pushEggStack() {
+	g_vars->swallowedEgg1->_value.intValue = g_vars->swallowedEgg2->_value.intValue;
+	g_vars->swallowedEgg2->_value.intValue = g_vars->swallowedEgg3->_value.intValue;
+	g_vars->swallowedEgg3->_value.intValue = 0;
+
+	if (g_vars->swallowedEgg2->_value.intValue == ANI_INV_EGGBOOT
+		 && g_vars->swallowedEgg1->_value.intValue == ANI_INV_EGGAPL) {
+		g_vars->swallowedEgg1->_value.intValue = ANI_INV_EGGBOOT;
+		g_vars->swallowedEgg2->_value.intValue = ANI_INV_EGGAPL;
+  }
+}
+
+void sceneHandler03_releaseEgg() {
+	g_vars->scene03_eggeater->_flags &= 0xFF7F;
+
+	g_vars->scene03_eggeater->show1(-1, -1, -1, 0);
+}
+
+void sceneHandler03_takeEgg(ExCommand *ex) {
+	MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex->_parId);
+
+	if (mq && mq->getCount() > 0) {
+		ExCommand *ex0 = mq->getExCommandByIndex(0);
+		ExCommand *ex1 = mq->getExCommandByIndex(1);
+
+		int egg1 = sceneHandler03_swallowedEgg1State();
+
+		if (egg1 && ex0) {
+			ex0->_parentId = egg1;
+			sceneHandler03_pushEggStack();
+		}
+
+		if ( g_vars->swallowedEgg1->_value.intValue == ANI_INV_EGGAPL
+			 && !g_vars->swallowedEgg2->_value.intValue
+			 && !g_vars->swallowedEgg3->_value.intValue
+			 && ex1) {
+
+			if (ex1->_objtype == kObjTypeObjstateCommand) {
+				ObjstateCommand *com = (ObjstateCommand *)ex1;
+
+				com->_value = g_fullpipe->getObjectEnumState(sO_EggGulper, sO_WantsNothing);
+			}
+		}
+	}
+}
+
 int sceneHandler03(ExCommand *ex) {
 #if 0
 	if (ex->_messageKind != 17) {


Commit: 5d759d181f228d4b6576647dcf3d668fe931a324
    https://github.com/scummvm/scummvm/commit/5d759d181f228d4b6576647dcf3d668fe931a324
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-11-05T14:41:35-08:00

Commit Message:
FULLPIPE: Completed scene03 code

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index c8cd05d..9d8f503 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -47,12 +47,23 @@ namespace Fullpipe {
 #define MSG_INTR_GETUPMAN 5135
 #define MSG_INTR_SWITCHTO1 5145
 #define MSG_INTR_SWITCHTO2 5134
+#define MSG_LIFT_CLICKBUTTON 2780
+#define MSG_LIFT_CLOSEDOOR 5194
+#define MSG_LIFT_EXITLIFT 5187
+#define MSG_LIFT_GO 1065
+#define MSG_LIFT_STARTEXITQUEUE 5186
 #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 MSG_SC3_HIDEDOMINO 3177
+#define MSG_SC3_ONTAKECOIN 5338
+#define MSG_SC3_RELEASEEGG 2681
+#define MSG_SC3_TAKEEGG 1583
+#define MSG_SC3_TESTFAT 1582
+#define MSG_SC3_UTRUBACLICK 1103
 #define MV_EGTR_FATASK 5332
 #define MV_IN1MAN_SLEEP 5111
 #define MV_MAN_GOLADDER 451
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 7f1c9ba..2cd0f87 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -232,6 +232,13 @@ public:
 
 	int lift_getButtonIdP(int objid);
 	void lift_sub5(Scene *sc, int qu1, int qu2);
+	void lift_exitSeq(ExCommand *ex);
+	void lift_closedoorSeq();
+	void lift_animation3();
+	void lift_goAnimation();
+	void lift_sub1(StaticANIObject *ani);
+	void lift_startExitQueue();
+	void lift_sub05(ExCommand *ex);
 
 public:
 
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 8fa6cf7..0e38c4f 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -68,4 +68,32 @@ void FullpipeEngine::lift_sub5(Scene *sc, int qu1, int qu2) {
 	warning("STUB: FullpipeEngine::lift_sub5()");
 }
 
+void FullpipeEngine::lift_exitSeq(ExCommand *ex) {
+	warning("STUB: FullpipeEngine::lift_exitSeq()");
+}
+
+void FullpipeEngine::lift_closedoorSeq() {
+	warning("STUB: FullpipeEngine::lift_closedoorSeq()");
+}
+
+void FullpipeEngine::lift_animation3() {
+	warning("STUB: FullpipeEngine::lift_animation3()");
+}
+
+void FullpipeEngine::lift_goAnimation() {
+	warning("STUB: FullpipeEngine::lift_goAnimation()");
+}
+
+void FullpipeEngine::lift_sub1(StaticANIObject *ani) {
+	warning("STUB: FullpipeEngine::lift_sub1()");
+}
+
+void FullpipeEngine::lift_startExitQueue() {
+	warning("STUB: FullpipeEngine::lift_startExitQueue()");
+}
+
+void FullpipeEngine::lift_sub05(ExCommand *ex) {
+	warning("STUB: FullpipeEngine::lift_sub05()");
+}
+
 } // End of namespace Fullpipe
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 245bd02..c266a81 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -1631,7 +1631,7 @@ int sceneHandler03_swallowedEgg1State() {
 	return g_vars->swallowedEgg1->_value.intValue;
 }
 
-void sceneHandler03_getCoin(ExCommand *ex) {
+void sceneHandler03_giveCoin(ExCommand *ex) {
 	MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex->_parId);
 
 	if (mq && mq->getCount() > 0) {
@@ -1706,20 +1706,19 @@ void sceneHandler03_takeEgg(ExCommand *ex) {
 }
 
 int sceneHandler03(ExCommand *ex) {
-#if 0
 	if (ex->_messageKind != 17) {
 		if (ex->_messageKind == 57)
 			sceneHandler03_giveItem(ex);
 		return 0;
 	}
 
-	switch (ex->messageNum) {
+	switch (ex->_messageNum) {
 	case MSG_LIFT_EXITLIFT:
-		lift_exitSeq(ex);
+		g_fullpipe->lift_exitSeq(ex);
 		break;
 
 	case MSG_LIFT_CLOSEDOOR:
-		lift_closedoorSeq();
+		g_fullpipe->lift_closedoorSeq();
 		break;
 
 	case MSG_SC3_ONTAKECOIN:
@@ -1727,7 +1726,7 @@ int sceneHandler03(ExCommand *ex) {
 		break;
 
 	case MSG_LIFT_STARTEXITQUEUE:
-		sceneHandlers_startExitQueue();
+		g_fullpipe->lift_startExitQueue();
 		break;
 
 	case MSG_SC3_RELEASEEGG:
@@ -1735,7 +1734,7 @@ int sceneHandler03(ExCommand *ex) {
 		break;
 
 	case MSG_LIFT_CLICKBUTTON:
-		lift_animation3();
+		g_fullpipe->lift_animation3();
 		break;
 
 	case MSG_SC3_HIDEDOMINO:
@@ -1747,7 +1746,7 @@ int sceneHandler03(ExCommand *ex) {
 		break;
 
 	case MSG_LIFT_GO:
-		lift_goAnimation();
+		g_fullpipe->lift_goAnimation();
 		break;
 
 	case MSG_SC3_UTRUBACLICK:
@@ -1759,14 +1758,14 @@ int sceneHandler03(ExCommand *ex) {
 		break;
 
 	case 64:
-		sceneHandlers_sub05(ex);
+		g_fullpipe->lift_sub05(ex);
 		break;
 
 	case 93:
 		{
-			StaticANIObject *ani = Scene_getStaticANIObjectAtPos(g_currentScene, ex->msg.sceneClickX, ex->msg.sceneClickY);
+			StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
 			if (ani && ani->_id == ANI_LIFTBUTTON) {
-				lift_sub1(ani);
+				g_fullpipe->lift_sub1(ani);
 				ex->_messageKind = 0;
 
 				return 0;
@@ -1792,23 +1791,22 @@ int sceneHandler03(ExCommand *ex) {
 			int res = 0;
 
 			if (g_fullpipe->_aniMan2) {
-				if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200) {
-					g_fullpipe->_currentScene->bg.x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
-					v7 = g_fullpipe->_aniMan2;
-				}
+				if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200)
+					g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
 
 				if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
-					g_fullpipe->_currentScene->bg.x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+					g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+
 				res = 1;
 			}
+
 			g_fullpipe->_behaviorManager->updateBehaviors();
 
-			startSceneTrack();
+			g_fullpipe->startSceneTrack();
 
 			return res;
 		}
 	}
-#endif
 
 	return 0;
 }






More information about the Scummvm-git-logs mailing list