[Scummvm-cvs-logs] scummvm master -> 583090a6238ca08996bfdfc10e26d616ab441f11

sev- sev at scummvm.org
Fri Dec 6 23:02:53 CET 2013


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

Summary:
4a27d727a7 FULLPIPE: Proper structure of MctlLadder class variables
00a6ded66c FULLPIPE: Reduce header dependency
9fbc292404 FULLPIPE: More stubs in MctlLadder
8844d461a9 FULLPIPE: implement MctlLadder::addObject()
172128931b FULLPIPE: Implement MctlLadder::freeItems()
583090a623 FULLPIPE: Implement sceneHandler04_goClock()


Commit: 4a27d727a7a32f5407cb1a89016d533df9841d01
    https://github.com/scummvm/scummvm/commit/4a27d727a7a32f5407cb1a89016d533df9841d01
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-06T12:47:30-08:00

Commit Message:
FULLPIPE: Proper structure of MctlLadder class variables

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



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 28201c5..8448138 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -186,13 +186,8 @@ MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos,
 }
 
 MctlLadder::MctlLadder() {
-	_preload.preloadId1 = 0;
-	_preload.keyCode = 0;
-	_preload.sceneId = 0;
-	_preload.preloadId2 = 0;
-
 	_ladder_field_18 = 0;
-	_ladder_field_C = 0;
+	_objId = 0;
 	_ladder_field_1C = 0;
 	_ladder_field_10 = 0;
 	_ladder_field_14 = 0;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 9e1e42a..6cc3862 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -161,16 +161,32 @@ public:
 	MessageQueue *genMovement(MGMInfo *mgminfo);
 };
 
+struct MctlLadderMovementVars {
+	int varUpGo;
+	int varDownGo;
+	int varUpStop;
+	int varDownStop;
+	int varUpStart;
+	int varDownStart;
+};
+
+struct MctlLadderMovement {
+	int objId;
+	int staticIdsSize;
+	MctlLadderMovementVars *movVars;
+	int *staticIds;
+};
+
 class MctlLadder : public MotionController {
 public:
-	int _ladder_field_C;
+	int _objId;
 	int _ladder_field_10;
 	int _ladder_field_14;
 	int _ladder_field_18;
 	int _ladder_field_1C;
 	int _ladder_field_20;
 	int _ladder_field_24;
-	PreloadItem _preload;
+	Common::List<MctlLadderMovement *> _movements;
 	MGM _mgm;
 
 public:


Commit: 00a6ded66c962efc904f3672b5ec051ec198b8cd
    https://github.com/scummvm/scummvm/commit/00a6ded66c962efc904f3672b5ec051ec198b8cd
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-06T12:48:37-08:00

Commit Message:
FULLPIPE: Reduce header dependency

Changed paths:
    engines/fullpipe/utils.cpp



diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 063aa5c..3a65801 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -26,7 +26,6 @@
 #include "common/memstream.h"
 
 #include "fullpipe/objects.h"
-#include "fullpipe/gameloader.h"
 #include "fullpipe/motion.h"
 #include "fullpipe/ngiarchive.h"
 #include "fullpipe/messages.h"


Commit: 9fbc292404cbb5ec6d1ad37cd56dc9141dfe4048
    https://github.com/scummvm/scummvm/commit/9fbc292404cbb5ec6d1ad37cd56dc9141dfe4048
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-06T12:59:42-08:00

Commit Message:
FULLPIPE: More stubs 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 8448138..080c607 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -202,6 +202,26 @@ int MctlLadder::collisionDetection(StaticANIObject *man) {
 	return 0;
 }
 
+void MctlLadder::addObject(StaticANIObject *obj) {
+	warning("STUB: MctlLadder::addObject()");
+}
+
+void MctlLadder::freeItems() {
+	warning("STUB: MctlLadder::freeItems()");
+}
+
+MessageQueue *MctlLadder::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
+	warning("STUB: MctlLadder::method34()");
+
+	return 0;
+}
+
+MessageQueue *MctlLadder::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
+	warning("STUB: MctlLadder::doWalkTo()");
+
+	return 0;
+}
+
 MctlConnectionPoint *MctlCompound::findClosestConnectionPoint(int ox, int oy, int destIndex, int connectionX, int connectionY, int sourceIndex, int *minDistancePtr) {
 	warning("STUB: MctlCompound::findClosestConnectionPoint()");
 
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 6cc3862..43ec367 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -192,6 +192,12 @@ public:
 public:
 	MctlLadder();
 	int collisionDetection(StaticANIObject *man);
+
+	virtual void addObject(StaticANIObject *obj);
+	virtual int removeObject(StaticANIObject *obj) { return 1; }
+	virtual void freeItems();
+	virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
+	virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
 };
 
 class MovGraphNode : public CObject {


Commit: 8844d461a959d8ffbbd7ec397c529cdd2fcee606
    https://github.com/scummvm/scummvm/commit/8844d461a959d8ffbbd7ec397c529cdd2fcee606
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-06T13:22:28-08:00

Commit Message:
FULLPIPE: implement MctlLadder::addObject()

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



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 080c607..5e399a2 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -203,7 +203,70 @@ int MctlLadder::collisionDetection(StaticANIObject *man) {
 }
 
 void MctlLadder::addObject(StaticANIObject *obj) {
-	warning("STUB: MctlLadder::addObject()");
+	if (findObjectPos(obj) < 0) {
+		MctlLadderMovement *movement = new MctlLadderMovement;
+		
+		if (initMovement(obj, movement)) {
+			_mgm.addItem(obj->_id);
+			_movements.push_back(movement);
+		} else {
+			delete movement;
+		}
+	}
+}
+
+int MctlLadder::findObjectPos(StaticANIObject *obj) {
+	int res = -1;
+
+	for (Common::List<MctlLadderMovement *>::iterator it = _movements.begin(); it != _movements.end(); ++it, ++res)
+		if ((*it)->objId == obj->_id)
+			break;
+
+	return res;
+}
+
+bool MctlLadder::initMovement(StaticANIObject *ani, MctlLadderMovement *movement) {
+	GameVar *v = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(ani->getName());
+
+	if (!v)
+		return false;
+
+	v = v->getSubVarByName("Test_Ladder");
+
+	if (!v)
+		return false;
+
+	movement->staticIdsSize = 6;
+	movement->movVars = new MctlLadderMovementVars;
+	movement->staticIds = new int[movement->staticIdsSize];
+
+	v = v->getSubVarByName("Up");
+
+	if (!v)
+		return false;
+
+	movement->movVars->varUpStart = v->getSubVarAsInt("Start");
+	movement->movVars->varUpGo = v->getSubVarAsInt("Go");
+	movement->movVars->varUpStop = v->getSubVarAsInt("Stop");
+
+	movement->staticIds[0] = ani->getMovementById(movement->movVars->varUpStart)->_staticsObj1->_staticsId;
+	movement->staticIds[2] = ani->getMovementById(movement->movVars->varUpGo)->_staticsObj1->_staticsId;
+
+	v = v->getSubVarByName("Down");
+
+	if (!v)
+		return false;
+
+	movement->movVars->varDownStart = v->getSubVarAsInt("Start");
+	movement->movVars->varDownGo = v->getSubVarAsInt("Go");
+	movement->movVars->varDownStop = v->getSubVarAsInt("Stop");
+
+	movement->staticIds[1] = ani->getMovementById(movement->movVars->varDownStart)->_staticsObj1->_staticsId;
+	movement->staticIds[3] = ani->getMovementById(movement->movVars->varDownGo)->_staticsObj1->_staticsId;
+
+	movement->objId = ani->_id;
+
+	return true;
 }
 
 void MctlLadder::freeItems() {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 43ec367..9224050 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -198,6 +198,10 @@ public:
 	virtual void freeItems();
 	virtual MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
 	virtual MessageQueue *doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId);
+
+private:
+	int findObjectPos(StaticANIObject *obj);
+	bool initMovement(StaticANIObject *ani, MctlLadderMovement *movement);
 };
 
 class MovGraphNode : public CObject {


Commit: 172128931bbcfae86b61be0b13050654ae63f0a3
    https://github.com/scummvm/scummvm/commit/172128931bbcfae86b61be0b13050654ae63f0a3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-06T13:36:31-08:00

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

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



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 5e399a2..30f71aa 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -196,6 +196,10 @@ MctlLadder::MctlLadder() {
 	_ladder_field_24 = 0;
 }
 
+MctlLadder::~MctlLadder() {
+	freeItems();
+}
+
 int MctlLadder::collisionDetection(StaticANIObject *man) {
 	warning("STUB: MctlLaddercollisionDetection()");
 
@@ -270,7 +274,14 @@ bool MctlLadder::initMovement(StaticANIObject *ani, MctlLadderMovement *movement
 }
 
 void MctlLadder::freeItems() {
-	warning("STUB: MctlLadder::freeItems()");
+	_mgm.clear();
+
+	for (Common::List<MctlLadderMovement *>::iterator it = _movements.begin(); it != _movements.end(); ++it) {
+		delete (*it)->movVars;
+		delete [] (*it)->staticIds;
+	}
+
+	_movements.clear();
 }
 
 MessageQueue *MctlLadder::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 9224050..5988b71 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -191,6 +191,7 @@ public:
 
 public:
 	MctlLadder();
+	virtual ~MctlLadder();
 	int collisionDetection(StaticANIObject *man);
 
 	virtual void addObject(StaticANIObject *obj);


Commit: 583090a6238ca08996bfdfc10e26d616ab441f11
    https://github.com/scummvm/scummvm/commit/583090a6238ca08996bfdfc10e26d616ab441f11
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-06T14:01:59-08:00

Commit Message:
FULLPIPE: Implement sceneHandler04_goClock()

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



diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h
index 41800da..60ca081 100644
--- a/engines/fullpipe/constants.h
+++ b/engines/fullpipe/constants.h
@@ -202,6 +202,7 @@ namespace Fullpipe {
 #define QU_PNK_CLICK 550
 #define QU_SC3_ENTERLIFT 2779
 #define QU_SC3_EXITLIFT 2808
+#define QU_SC4_GOCLOCK 595
 #define QU_SC4_MANFROMBOTTLE 2851
 #define SC_1 301
 #define SC_10 653
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index 00d2863..84354e5 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -143,6 +143,7 @@ public:
 	void playSound(int id, int flag);
 	void startSceneTrack();
 	void stopSoundStream2();
+	void stopAllSoundStreams();
 
 	int _sfxVolume;
 
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 689260a..dab40ec 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -434,8 +434,21 @@ void sceneHandler04_liftBottle() {
 	}
 }
 
-void sceneHandler04_sub7() {
-	warning("sceneHandler04_sub7()");
+void sceneHandler04_startSounds(const char *snd1, const char *snd2, const char *snd3) {
+	warning("STUB: sceneHandler04_startSounds()");
+}
+
+void sceneHandler04_goClock() {
+	sceneHandler04_walkKozyawka();
+	chainQueue(QU_SC4_GOCLOCK, 0);
+	g_vars->scene04_soundPlaying = 1;
+	g_vars->scene04_coinPut = 0;
+
+	g_fullpipe->stopAllSoundStreams();
+
+	sceneHandler04_startSounds("sc4_start.ogg", "sc4_loop.ogg", "sc4_stop2.ogg");
+
+	g_vars->scene04_var14 = 0;
 }
 
 void sceneHandler04_sub8(ExCommand *ex) {
@@ -701,7 +714,7 @@ int sceneHandler04(ExCommand *ex) {
 				sceneHandler04_sub1(0);
 
 			if (g_vars->scene04_coinPut && g_vars->scene04_var18 && !g_vars->scene04_var09 && !g_vars->scene04_soundPlaying)
-				sceneHandler04_sub7();
+				sceneHandler04_goClock();
 
 			if (g_vars->scene04_var01) {
 				if (!g_vars->scene04_soundPlaying) {
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index b4a864d..147d621 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -139,5 +139,9 @@ void FullpipeEngine::stopSoundStream2() {
 	warning("STUB: FullpipeEngine::stopSoundStream2()");
 }
 
+void FullpipeEngine::stopAllSoundStreams() {
+	warning("STUB: FullpipeEngine::stopAllSoundStreams()");
+}
+
 
 } // End of namespace Fullpipe






More information about the Scummvm-git-logs mailing list