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

sev- sev at scummvm.org
Mon Dec 30 00:00:50 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:
58f4940848 FULLPIPE: Implement remaining scene13 functions
1b0bcfd64b FULLPIPE: Renames in scene13
f794f6ae5b FULLPIPE: Give scene13 vars meaningful names. This completes the scene.


Commit: 58f4940848c4b0e9e50a51a809ed18541269573a
    https://github.com/scummvm/scummvm/commit/58f4940848c4b0e9e50a51a809ed18541269573a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-29T14:52:04-08:00

Commit Message:
FULLPIPE: Implement remaining scene13 functions

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 5214c97..83721ed 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -558,7 +558,11 @@ namespace Fullpipe {
 #define QU_SC13_OPENSUCCESS 3047
 #define QU_SC13_SHOWGUM 1216
 #define QU_STR_CHEW 1190
+#define QU_STR_LTOR 3054
 #define QU_STR_PLUU 1189
+#define QU_STR_RTOL 3053
+#define QU_STR_TURNR 1186
+#define QU_STR_TURNR_L 3059
 #define SND_13_018 3763
 #define SND_13_033 4685
 #define SND_13_034 4686
@@ -571,6 +575,7 @@ namespace Fullpipe {
 #define ST_HDLR_DOWN 1199
 #define ST_HDLR_DOWN_GUM 3044
 #define ST_HDLR_GUM 1201
+#define ST_STR_LEFT 1175
 #define ST_STR_RIGHT 1174
 
 // Scene 15
diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp
index 5689918..42f3ffb 100644
--- a/engines/fullpipe/scenes/scene13.cpp
+++ b/engines/fullpipe/scenes/scene13.cpp
@@ -217,16 +217,32 @@ void sceneHandler13_showGum() {
 	chainQueue(QU_SC13_SHOWGUM, 0);
 }
 
+void sceneHandler13_setBehFlag(BehaviorEntryInfo *beh, bool flag) {
+	warning("STUB: sceneHandler13_sub03()");
+}
+
 void sceneHandler13_sub01(bool flag) {
-	warning("STUB: sceneHandler13_sub01()");
+	BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_RTOL);
+
+	sceneHandler13_setBehFlag(beh, flag);
+
+	beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_LEFT, QU_STR_TURNR);
+
+	sceneHandler13_setBehFlag(beh, flag);
+
+	beh->_flags &= 0xFE;
 }
 
 void sceneHandler13_sub02(bool flag) {
-	warning("STUB: sceneHandler13_sub02()");
-}
+	BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT|0x4000, QU_STR_LTOR);
 
-void sceneHandler13_sub03(bool flag) {
-	warning("STUB: sceneHandler13_sub03()");
+	sceneHandler13_setBehFlag(beh, flag);
+
+	beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_LEFT|0x4000, QU_STR_TURNR_L);
+
+	sceneHandler13_setBehFlag(beh, flag);
+
+	beh->_flags &= 0xFE;
 }
 
 int sceneHandler13(ExCommand *cmd) {


Commit: 1b0bcfd64bf306db859ec8aeae04f37b219e1fd2
    https://github.com/scummvm/scummvm/commit/1b0bcfd64bf306db859ec8aeae04f37b219e1fd2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-29T14:56:27-08:00

Commit Message:
FULLPIPE: Renames in scene13

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



diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp
index 42f3ffb..1a080d2 100644
--- a/engines/fullpipe/scenes/scene13.cpp
+++ b/engines/fullpipe/scenes/scene13.cpp
@@ -218,10 +218,18 @@ void sceneHandler13_showGum() {
 }
 
 void sceneHandler13_setBehFlag(BehaviorEntryInfo *beh, bool flag) {
-	warning("STUB: sceneHandler13_sub03()");
+	if (!flag) {
+		beh->_percent = 327;
+		beh->_flags |= 1;
+		beh->_delay = 36;
+	} else {
+		beh->_percent = 0x7FFF;
+		beh->_flags &= 0xFFFFFFFE;
+		beh->_delay = 0;
+	}
 }
 
-void sceneHandler13_sub01(bool flag) {
+void sceneHandler13_walkForward(bool flag) {
 	BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT, QU_STR_RTOL);
 
 	sceneHandler13_setBehFlag(beh, flag);
@@ -233,7 +241,7 @@ void sceneHandler13_sub01(bool flag) {
 	beh->_flags &= 0xFE;
 }
 
-void sceneHandler13_sub02(bool flag) {
+void sceneHandler13_walkBackward(bool flag) {
 	BehaviorEntryInfo *beh = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene13_guard, ST_STR_RIGHT|0x4000, QU_STR_LTOR);
 
 	sceneHandler13_setBehFlag(beh, flag);
@@ -343,8 +351,8 @@ int sceneHandler13(ExCommand *cmd) {
 
 			if (g_vars->scene13_var02) {
 				if (x < 1022) {
-					sceneHandler13_sub01(1);
-					sceneHandler13_sub02(0);
+					sceneHandler13_walkForward(1);
+					sceneHandler13_walkBackward(0);
 
 					g_vars->scene13_var02 = 0;
 
@@ -354,8 +362,8 @@ int sceneHandler13(ExCommand *cmd) {
 					return res;
 				}
 			} else if (x > 1022) {
-				sceneHandler13_sub01(0);
-				sceneHandler13_sub02(1);
+				sceneHandler13_walkForward(0);
+				sceneHandler13_walkBackward(1);
 
 				g_vars->scene13_var02 = 1;
 			}


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

Commit Message:
FULLPIPE: Give scene13 vars meaningful names. This completes the scene.

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



diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 9bdd334..d1a5eff 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -195,9 +195,8 @@ Vars::Vars() {
 	scene13_handleR = 0;
 	scene13_handleL = 0;
 	scene13_bridge = 0;
-	scene13_var01 = 0;
-	scene13_var02 = 0;
-	scene13_var03 = 0;
+	scene13_guardDirection = false;
+	scene13_dudeX = 0;
 
 	scene15_chantingCountdown = 0;
 	scene15_plusminus = 0;
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index c9600fa..e75cec0 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -266,9 +266,8 @@ public:
 	StaticANIObject *scene13_handleR;
 	StaticANIObject *scene13_handleL;
 	StaticANIObject *scene13_bridge;
-	int scene13_var01;
-	int scene13_var02;
-	int scene13_var03;
+	bool scene13_guardDirection;
+	int scene13_dudeX;
 
 	int scene15_chantingCountdown;
 	StaticANIObject *scene15_plusminus;
diff --git a/engines/fullpipe/scenes/scene13.cpp b/engines/fullpipe/scenes/scene13.cpp
index 1a080d2..0a0c2f3 100644
--- a/engines/fullpipe/scenes/scene13.cpp
+++ b/engines/fullpipe/scenes/scene13.cpp
@@ -42,8 +42,7 @@ void scene13_initScene(Scene *sc) {
 	g_vars->scene13_handleR = sc->getStaticANIObject1ById(ANI_HANDLE_R, -1);
 	g_vars->scene13_handleL = sc->getStaticANIObject1ById(ANI_HANDLE_L, -1);
 	g_vars->scene13_bridge = sc->getStaticANIObject1ById(ANI_BRIDGE, -1);
-	g_vars->scene13_var01 = 0;
-	g_vars->scene13_var02 = 1;
+	g_vars->scene13_guardDirection = true;
 
 	MovGraphLink *lnk = getSc2MctlCompoundBySceneId(sc->_sceneId)->getLinkByName(sO_Bridge);
 	Scene *oldsc = g_fp->_currentScene;
@@ -336,7 +335,7 @@ int sceneHandler13(ExCommand *cmd) {
 
 			if (g_fp->_aniMan2) {
 				x = g_fp->_aniMan2->_ox;
-				g_vars->scene13_var03 = x;
+				g_vars->scene13_dudeX = x;
 
 				if (x < g_fp->_sceneRect.left + 200)
 					g_fp->_currentScene->_x = x - g_fp->_sceneRect.left - 300;
@@ -346,15 +345,15 @@ int sceneHandler13(ExCommand *cmd) {
 
 				res = 1;
 			} else {
-				x = g_vars->scene13_var03;
+				x = g_vars->scene13_dudeX;
 			}
 
-			if (g_vars->scene13_var02) {
+			if (g_vars->scene13_guardDirection) {
 				if (x < 1022) {
 					sceneHandler13_walkForward(1);
 					sceneHandler13_walkBackward(0);
 
-					g_vars->scene13_var02 = 0;
+					g_vars->scene13_guardDirection = false;
 
 					g_fp->_behaviorManager->updateBehaviors();
 					g_fp->startSceneTrack();
@@ -365,7 +364,7 @@ int sceneHandler13(ExCommand *cmd) {
 				sceneHandler13_walkForward(0);
 				sceneHandler13_walkBackward(1);
 
-				g_vars->scene13_var02 = 1;
+				g_vars->scene13_guardDirection = true;
 			}
 
 			g_fp->_behaviorManager->updateBehaviors();






More information about the Scummvm-git-logs mailing list