[Scummvm-cvs-logs] scummvm master -> 31a6095573253d01dfa112f2d2398f47e1348b74

sev- sev at scummvm.org
Sun Dec 8 15:59:37 CET 2013


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

Summary:
2d6abd8f03 FULLPIPE: Implement MctlLadder::collisionDetection()
5e3bbb8156 FULLPIPE: Some renames in MctlLadder
7cbe0fa210 FULLPIPE: Implement sceneHandler04_jumpOnLadder()
99731dfc0e FULLPIPE: Rename in scene04
31a6095573 FULLPIPE: Implement sceneHandler04_sub9()


Commit: 2d6abd8f0310cc7e3e1bf301610495b12c400aad
    https://github.com/scummvm/scummvm/commit/2d6abd8f0310cc7e3e1bf301610495b12c400aad
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-08T06:58:49-08:00

Commit Message:
FULLPIPE: Implement MctlLadder::collisionDetection()

Changed paths:
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 30f71aa..978ef3a 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -201,9 +201,22 @@ MctlLadder::~MctlLadder() {
 }
 
 int MctlLadder::collisionDetection(StaticANIObject *man) {
-	warning("STUB: MctlLaddercollisionDetection()");
+	if (findObjectPos(man) < 0)
+		return 0;
 
-	return 0;
+	double delta;
+
+	if ((double)(man->_oy - _ladder_field_10) / (double)_ladder_field_1C < 0.0)
+		delta = -0.5;
+	else 
+		delta = 0.5;
+
+	int res = (int)((double)(man->_oy - _ladder_field_10) / (double)_ladder_field_1C + delta);
+
+	if (res < 0)
+		return 0;
+
+	return res;
 }
 
 void MctlLadder::addObject(StaticANIObject *obj) {


Commit: 5e3bbb815614053ff56af5674588a6658f2384d9
    https://github.com/scummvm/scummvm/commit/5e3bbb815614053ff56af5674588a6658f2384d9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-08T06:58:50-08:00

Commit Message:
FULLPIPE: Some renames in MctlLadder

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



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 978ef3a..20b710d 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -188,8 +188,8 @@ MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos,
 MctlLadder::MctlLadder() {
 	_ladder_field_18 = 0;
 	_objId = 0;
-	_ladder_field_1C = 0;
-	_ladder_field_10 = 0;
+	_height = 0;
+	_ladderY = 0;
 	_ladder_field_14 = 0;
 
 	_ladder_field_20 = 0;
@@ -206,12 +206,12 @@ int MctlLadder::collisionDetection(StaticANIObject *man) {
 
 	double delta;
 
-	if ((double)(man->_oy - _ladder_field_10) / (double)_ladder_field_1C < 0.0)
+	if ((double)(man->_oy - _ladderY) / (double)_height < 0.0)
 		delta = -0.5;
 	else 
 		delta = 0.5;
 
-	int res = (int)((double)(man->_oy - _ladder_field_10) / (double)_ladder_field_1C + delta);
+	int res = (int)((double)(man->_oy - _ladderY) / (double)_height + delta);
 
 	if (res < 0)
 		return 0;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 5988b71..5842b29 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -180,10 +180,10 @@ struct MctlLadderMovement {
 class MctlLadder : public MotionController {
 public:
 	int _objId;
-	int _ladder_field_10;
+	int _ladderY;
 	int _ladder_field_14;
 	int _ladder_field_18;
-	int _ladder_field_1C;
+	int _height;
 	int _ladder_field_20;
 	int _ladder_field_24;
 	Common::List<MctlLadderMovement *> _movements;


Commit: 7cbe0fa2107e93c66cf553704ab0cef978a2e786
    https://github.com/scummvm/scummvm/commit/7cbe0fa2107e93c66cf553704ab0cef978a2e786
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-08T06:58:50-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_jumpOnLadder()

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 60ca081..b774c89 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -119,6 +119,8 @@ namespace Fullpipe {
 #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_LOOKUP 4773
 #define MV_MAN_STARTLADDER 452
 #define MV_MAN_STARTLADDER2 2842
@@ -291,8 +293,11 @@ namespace Fullpipe {
 #define ST_LBN_9N 2777
 #define ST_LBN_9P 2778
 #define ST_MAN_EMPTY 476
+#define ST_MAN_LADDERDOWN 521
+#define ST_MAN_ONPLANK 552
 #define ST_MAN_RIGHT 325
 #define ST_MAN_SIT 1164
+#define ST_MAN_STANDLADDER 453
 #define ST_PNK_WEIGHTLEFT 503
 #define TrubaDown 697
 #define TrubaLeft 474
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 014459e..74d4b2b 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -100,6 +100,7 @@ Vars::Vars() {
 	scene04_var20 = 0;
 	scene04_var24 = 0;
 	scene04_bottleY = 0;
+	scene04_ladderOffset = 0;
 
 	selector = 0;
 }
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index ced671d..78013f2 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -95,6 +95,8 @@ public:
 	Common::List<StaticANIObject *> scene04_kozyawkiAni;
 
 	MctlLadder *scene04_ladder;
+	int scene04_ladderOffset;
+
 	bool scene04_coinPut;
 	bool scene04_soundPlaying;
 	int scene04_dynamicPhaseIndex;
@@ -102,11 +104,16 @@ public:
 	int scene04_sceneClickY;
 	int scene04_dudePosX;
 	int scene04_dudePosY;
+	int scene04_bottleY;
+
+	StaticANIObject *scene04_walkingKozyawka;
+
+	int scene04_speakerVariant;
+	int scene04_speakerPhase;
 
 	int scene04_var01;
 	int scene04_var02;
 	int scene04_var04;
-	StaticANIObject *scene04_walkingKozyawka;
 	int scene04_var06;
 	int scene04_var07;
 	int scene04_var08;
@@ -117,13 +124,10 @@ public:
 	int scene04_var13;
 	int scene04_var14;
 	int scene04_var15;
-	int scene04_speakerVariant;
-	int scene04_speakerPhase;
 	int scene04_var18;
 	int scene04_var19;
 	int scene04_var20;
 	StaticANIObject *scene04_var24;
-	int scene04_bottleY;
 
 	PictureObject *selector;
 };
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 7ee8899..e2b1243 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -282,13 +282,48 @@ void sceneHandler04_clickLadder() {
 	warning("sceneHandler04_clickLadder()");
 }
 
-void sceneHandler04_sub13() {
-	warning("sceneHandler04_sub13()");
+void sceneHandler04_jumpOnLadder() {
+	if (g_fullpipe->_aniMan->_movement && g_fullpipe->_aniMan->_movement->_id != MV_MAN_LOOKLADDER)
+		return;
+
+	if (g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_STANDLADDER && g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_LADDERDOWN)
+		return;
+
+	g_fullpipe->_aniMan->changeStatics2(ST_MAN_LADDERDOWN);
+
+	g_fullpipe->_aniMan->_flags |= 1;
+
+	MGM mgm;
+	MGMInfo mgminfo;
+
+	mgm.addItem(ANI_MAN);
+
+	mgminfo.ani = g_fullpipe->_aniMan;
+	mgminfo.staticsId2 = ST_MAN_ONPLANK;
+	mgminfo.x1 = 938;
+	mgminfo.y1 = 442;
+	mgminfo.field_1C = 10;
+	mgminfo.field_10 = 1;
+	mgminfo.flags = 78;
+	mgminfo.movementId = MV_MAN_JUMPONPLANK;
+
+	MessageQueue *mq = mgm.genMovement(&mgminfo);
+
+	if (mq) {
+		mq->_flags |= 1;
+
+		if (!mq->chain(g_fullpipe->_aniMan))
+			delete mq;
+
+		g_fullpipe->_aniMan->_priority = 10;
+	}
+
+	g_vars->scene04_ladderOffset = g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan);
 }
 
 void sceneHandler04_clickPlank() {
 	if (sceneHandler04_friesAreWalking())
-		sceneHandler04_sub13();
+		sceneHandler04_jumpOnLadder();
 	else if (g_vars->scene04_var01)
 		g_fullpipe->playSound(SND_4_033, 0);
 	else if (!g_vars->scene04_soundPlaying)


Commit: 99731dfc0e661c30ca5702328babb7b69b981ebd
    https://github.com/scummvm/scummvm/commit/99731dfc0e661c30ca5702328babb7b69b981ebd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-08T06:58:50-08:00

Commit Message:
FULLPIPE: Rename in scene04

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



diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 74d4b2b..9dc4c74 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -72,6 +72,7 @@ Vars::Vars() {
 	scene04_coinPut = false;
 	scene04_soundPlaying = false;
 	scene04_dynamicPhaseIndex = 0;
+	scene04_needJumping = false;
 
 	scene04_sceneClickX = 0;
 	scene04_sceneClickY = 0;
@@ -79,7 +80,6 @@ Vars::Vars() {
 	scene04_dudePosX = 0;
 	scene04_dudePosY = 0;
 
-	scene04_var01 = 0;
 	scene04_var02 = 0;
 	scene04_var04 = 0;
 	scene04_walkingKozyawka = 0;
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 78013f2..e7960fe 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -99,6 +99,8 @@ public:
 
 	bool scene04_coinPut;
 	bool scene04_soundPlaying;
+	bool scene04_needJumping;
+
 	int scene04_dynamicPhaseIndex;
 	int scene04_sceneClickX;
 	int scene04_sceneClickY;
@@ -111,7 +113,6 @@ public:
 	int scene04_speakerVariant;
 	int scene04_speakerPhase;
 
-	int scene04_var01;
 	int scene04_var02;
 	int scene04_var04;
 	int scene04_var06;
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index e2b1243..aacc0f1 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -61,7 +61,7 @@ void scene04_speakerCallback(int *phase) {
 }
 
 void scene04_initScene(Scene *sc) {
-	g_vars->scene04_var01 = 0;
+	g_vars->scene04_needJumping = false;
 	g_vars->scene04_bottle = sc->getPictureObjectById(PIC_SC4_BOTTLE, 0);
 	g_vars->scene04_hand = sc->getStaticANIObject1ById(ANI_HAND, -1);
 	g_vars->scene04_plank = sc->getStaticANIObject1ById(ANI_PLANK, -1);
@@ -196,7 +196,7 @@ void scene04_initScene(Scene *sc) {
 }
 
 bool sceneHandler04_friesAreWalking() {
-	if (g_vars->scene04_var01 && g_fullpipe->_aniMan->isIdle() && !(g_fullpipe->_aniMan->_flags & 0x100)) {
+	if (g_vars->scene04_needJumping && g_fullpipe->_aniMan->isIdle() && !(g_fullpipe->_aniMan->_flags & 0x100)) {
 		int col = g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan);
 		if (col >= 3 && col <= 6 ) {
 			Movement *koz;
@@ -324,7 +324,7 @@ void sceneHandler04_jumpOnLadder() {
 void sceneHandler04_clickPlank() {
 	if (sceneHandler04_friesAreWalking())
 		sceneHandler04_jumpOnLadder();
-	else if (g_vars->scene04_var01)
+	else if (g_vars->scene04_needJumping)
 		g_fullpipe->playSound(SND_4_033, 0);
 	else if (!g_vars->scene04_soundPlaying)
 		chainQueue(QU_PNK_CLICK, 0);
@@ -536,7 +536,7 @@ void sceneHandler04_handTake() {
 void sceneHandler04_sub17() {
 	StaticANIObject *ball =  g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
 
-	if (g_vars->scene04_var01
+	if (g_vars->scene04_needJumping
 		 && (!ball || !(ball->_flags & 4))
 		 && g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan) > 3) {
 
@@ -763,7 +763,7 @@ int sceneHandler04(ExCommand *ex) {
 			if (g_vars->scene04_coinPut && g_vars->scene04_var18 && !g_vars->scene04_var09 && !g_vars->scene04_soundPlaying)
 				sceneHandler04_goClock();
 
-			if (g_vars->scene04_var01) {
+			if (g_vars->scene04_needJumping) {
 				if (!g_vars->scene04_soundPlaying) {
 					g_fullpipe->startSceneTrack();
 
@@ -823,7 +823,7 @@ int sceneHandler04(ExCommand *ex) {
 				sceneHandler04_clickPlank();
 
 				ex->_messageKind = 0;
-			} else if (g_vars->scene04_var01) {
+			} else if (g_vars->scene04_needJumping) {
 				sceneHandler04_sub8(ex);
 			} else if (!ani || !canInteractAny(g_fullpipe->_aniMan, ani, ex->_keyCode)) {
 				PictureObject *pic = g_fullpipe->_currentScene->getPictureObjectById(picid, 0);


Commit: 31a6095573253d01dfa112f2d2398f47e1348b74
    https://github.com/scummvm/scummvm/commit/31a6095573253d01dfa112f2d2398f47e1348b74
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-08T06:58:50-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_sub9()

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



diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index aacc0f1..89e6fc3 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -502,10 +502,6 @@ void sceneHandler04_sub8(ExCommand *ex) {
 	warning("sceneHandler04_sub8()");
 }
 
-void sceneHandler04_sub9(StaticANIObject *ani) {
-	warning("sceneHandler04_sub9()");
-}
-
 void sceneHandler04_sub12() {
 	StaticANIObject *ball =  g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
 
@@ -533,6 +529,25 @@ void sceneHandler04_handTake() {
 	}
 }
 
+void sceneHandler04_sub9(StaticANIObject *ani) {
+	g_vars->scene04_bottleObjList.push_back(ani);
+	g_vars->scene04_kozyawkiAni.push_back(ani);
+
+	g_vars->scene04_var06 += 2;
+	g_vars->scene04_walkingKozyawka = 0;
+	g_vars->scene04_var24 = 0;
+
+	if (g_vars->scene04_kozyawkiAni.size() > 1 )
+		g_vars->scene04_var19 = 0;
+
+	if (g_vars->scene04_kozyawkiAni.size() <= 2 || g_vars->scene04_hand->_movement) {
+		sceneHandler04_walkKozyawka();
+	} else {
+		sceneHandler04_handTake();
+		sceneHandler04_stopSound();
+	}
+}
+
 void sceneHandler04_sub17() {
 	StaticANIObject *ball =  g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
 






More information about the Scummvm-git-logs mailing list