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

sev- sev at scummvm.org
Wed Dec 11 22:18:20 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:
8caec7691c FULLPIPE: Implement StaticANIObject::changeStatics2()
e867326b9b FULLPIPE: Implement MGM::updateAnimStatics()
d078399e89 FULLPIPE: Fix wrong deletion order in MessageQueue::deleteExCommandByIndex()


Commit: 8caec7691cf625baba382e425fdcf1bee9e7d17c
    https://github.com/scummvm/scummvm/commit/8caec7691cf625baba382e425fdcf1bee9e7d17c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-11T13:17:45-08:00

Commit Message:
FULLPIPE: Implement StaticANIObject::changeStatics2()

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



diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index a254ea6..970af42 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -35,6 +35,7 @@
 #include "fullpipe/input.h"
 #include "fullpipe/scenes.h"
 #include "fullpipe/floaters.h"
+#include "fullpipe/motion.h"
 #include "fullpipe/console.h"
 
 namespace Fullpipe {
@@ -100,6 +101,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
 	_scene2 = 0;
 	_movTable = 0;
 	_floaters = 0;
+	_mgm = 0;
 
 	_globalMessageQueueList = 0;
 	_messageHandlers = 0;
@@ -168,6 +170,7 @@ void FullpipeEngine::initialize() {
 	_sceneRect.bottom = 599;
 
 	_floaters = new Floaters;
+	_mgm = new MGM;
 }
 
 Common::Error FullpipeEngine::run() {
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index ca025a4..6e8c7b7 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -61,6 +61,7 @@ class GameObject;
 class GlobalMessageQueueList;
 struct MessageHandler;
 struct MovTable;
+class MGM;
 class NGIArchive;
 class Scene;
 class SoundList;
@@ -173,6 +174,7 @@ public:
 	MovTable *_movTable;
 
 	Floaters *_floaters;
+	MGM *_mgm;
 
 	void initMap();
 	void updateMapPiece(int mapId, int update);
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 30957a9..e7cd7ef 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1519,6 +1519,10 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
 	return 0;
 }
 
+void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
+	warning("STUB: MGM::updateAnimStatics()");
+}
+
 MovGraphLink::MovGraphLink() {
 	_distance = 0;
 	_angle = 0;
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 5842b29..9e84148 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -159,6 +159,7 @@ public:
 	int getItemIndexById(int objId);
 
 	MessageQueue *genMovement(MGMInfo *mgminfo);
+	void updateAnimStatics(StaticANIObject *ani, int staticsId);
 };
 
 struct MctlLadderMovementVars {
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index b97e7f8..12c56fe 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -27,6 +27,7 @@
 #include "fullpipe/statics.h"
 #include "fullpipe/messages.h"
 #include "fullpipe/interaction.h"
+#include "fullpipe/motion.h"
 
 #include "fullpipe/constants.h"
 #include "fullpipe/objectnames.h"
@@ -880,7 +881,23 @@ MessageQueue *StaticANIObject::changeStatics1(int msgNum) {
 }
 
 void StaticANIObject::changeStatics2(int objId) {
-	warning("STUB: StaticANIObject::changeStatics2(%d)", objId);
+	_animExFlag = 0;
+
+	deleteFromGlobalMessageQueue();
+
+	if (_movement || _statics) {
+		g_fullpipe->_mgm->addItem(_id);
+		g_fullpipe->_mgm->updateAnimStatics(this, objId);
+	} else {
+		_statics = getStaticsById(objId);
+	}
+
+	if (_messageQueueId) {
+		if (g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId))
+			g_fullpipe->_globalMessageQueueList->deleteQueueById(_messageQueueId);
+
+		_messageQueueId = 0;
+	}
 }
 
 void StaticANIObject::hide() {
@@ -1664,7 +1681,7 @@ bool Movement::gotoNextFrame(void (*callback1)(int, Common::Point *point, int, i
 				point.x = _framePosOffsets[_currDynamicPhaseIndex]->x;
 				point.y = _framePosOffsets[_currDynamicPhaseIndex]->y;
 
-				//callback1(_currDynamicPhaseIndex, &point, _ox, _oy);
+				callback1(_currDynamicPhaseIndex, &point, _ox, _oy);
 				_ox += point.x;
 				_oy += point.y;
 			} else if (oldDynIndex >= _currDynamicPhaseIndex) {


Commit: e867326b9b32ca5c64eeb950cd9d4706b8493d34
    https://github.com/scummvm/scummvm/commit/e867326b9b32ca5c64eeb950cd9d4706b8493d34
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-11T13:17:45-08:00

Commit Message:
FULLPIPE: Implement MGM::updateAnimStatics()

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



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index e7cd7ef..753106f 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1520,7 +1520,33 @@ MessageQueue *MGM::genMovement(MGMInfo *mgminfo) {
 }
 
 void MGM::updateAnimStatics(StaticANIObject *ani, int staticsId) {
-	warning("STUB: MGM::updateAnimStatics()");
+	if (getItemIndexById(ani->_id) == -1)
+		return;
+
+	if (ani->_movement) {
+		ani->queueMessageQueue(0);
+		ani->_movement->gotoLastFrame();
+		ani->_statics = ani->_movement->_staticsObj2;
+		ani->_movement = 0;
+
+		ani->setOXY(ani->_movement->_ox, ani->_movement->_oy);
+	}
+
+	if (ani->_statics) {
+		Common::Point point;
+
+		getPoint(&point, ani->_id, ani->_statics->_staticsId, staticsId);
+
+		ani->setOXY(ani->_ox + point.x, ani->_oy + point.y);
+
+		ani->_statics = ani->getStaticsById(staticsId);
+	}
+}
+
+Common::Point *MGM::getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2) {
+	warning("STUB: MGM::getPoint()");
+
+	return point;
 }
 
 MovGraphLink::MovGraphLink() {
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h
index 9e84148..b49fea5 100644
--- a/engines/fullpipe/motion.h
+++ b/engines/fullpipe/motion.h
@@ -160,6 +160,7 @@ public:
 
 	MessageQueue *genMovement(MGMInfo *mgminfo);
 	void updateAnimStatics(StaticANIObject *ani, int staticsId);
+	Common::Point *getPoint(Common::Point *point, int aniId, int staticsId1, int staticsId2);
 };
 
 struct MctlLadderMovementVars {


Commit: d078399e896f721247a401cc612a2027486c12ee
    https://github.com/scummvm/scummvm/commit/d078399e896f721247a401cc612a2027486c12ee
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2013-12-11T13:17:45-08:00

Commit Message:
FULLPIPE: Fix wrong deletion order in MessageQueue::deleteExCommandByIndex()

Changed paths:
    engines/fullpipe/messages.cpp



diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 3614873..c2f5ca3 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -355,10 +355,10 @@ void MessageQueue::deleteExCommandByIndex(uint idx, bool doFree) {
 		idx--;
 	}
 
-	_exCommands.erase(it);
-
 	if (doFree)
 		delete *it;
+
+	_exCommands.erase(it);
 }
 
 void MessageQueue::transferExCommands(MessageQueue *mq) {






More information about the Scummvm-git-logs mailing list