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

bluegr bluegr at gmail.com
Wed Dec 11 21:54:39 CET 2013


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

Summary:
edbf2d49fb FULLPIPE: Make _exCommands private


Commit: edbf2d49fba3041b8c29c1a256b570512fd44f40
    https://github.com/scummvm/scummvm/commit/edbf2d49fba3041b8c29c1a256b570512fd44f40
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-12-11T12:52:49-08:00

Commit Message:
FULLPIPE: Make _exCommands private

Changed paths:
    engines/fullpipe/gameloader.cpp
    engines/fullpipe/interaction.cpp
    engines/fullpipe/messages.cpp
    engines/fullpipe/messages.h
    engines/fullpipe/motion.cpp
    engines/fullpipe/scenes/scene04.cpp



diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index a2ab71d..e130337 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -209,7 +209,7 @@ bool GameLoader::gotoScene(int sceneId, int entranceId) {
 			ex->_messageNum = 0;
 			ex->_excFlags |= 3;
 
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 		}
 
 		mq->setFlags(mq->getFlags() | 1);
diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp
index b513d2b..cd9aad5 100644
--- a/engines/fullpipe/interaction.cpp
+++ b/engines/fullpipe/interaction.cpp
@@ -186,7 +186,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
 			ex->_excFlags = 3;
 			ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
 			ex->_field_20 = invId;
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 
 			if (mq->_isFinished) {
 				mq->_isFinished = 0;
@@ -255,7 +255,7 @@ LABEL_38:
 			ex->_field_14 = 0x100;
 			ex->_messageNum = 0;
 			ex->_excFlags = 3;
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 		}
 
 		ex = new ExCommand(obj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
@@ -263,19 +263,19 @@ LABEL_38:
 		ex->_field_14 = 0x100;
 		ex->_messageNum = 0;
 		ex->_excFlags = 3;
-		mq->_exCommands.push_back(ex);
+		mq->addExCommandToEnd(ex);
 
 		ex = new ExCommand(subj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
 		ex->_keyCode = subj->_okeyCode;
 		ex->_field_14 = 0x100;
 		ex->_messageNum = 0;
 		ex->_excFlags = 3;
-		mq->_exCommands.push_back(ex);
+		mq->addExCommandToEnd(ex);
 
 		ex = new ExCommand(subj->_id, 17, 0x40, 0, 0, 0, 1, 0, 0, 0);
 		ex->_excFlags |= 3;
 		ex->_keyCode = 0;
-		mq->_exCommands.push_back(ex);
+		mq->addExCommandToEnd(ex);
 
 		if (!mq->chain(subj)) {
 			delete mq;
@@ -317,7 +317,7 @@ LABEL_38:
 			ex->_excFlags = 3;
 			ex->_field_20 = invId;
 			ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 
 			someFlag = true;
 
@@ -357,14 +357,14 @@ LABEL_38:
 						ex->_field_14 = 0x80;
 						ex->_keyCode = ani->_okeyCode;
 						ex->_excFlags = 3;
-						mq->_exCommands.push_back(ex);
+						mq->addExCommandToEnd(ex);
 					}
 				}
 				ex = new ExCommand(ani->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0);
 				ex->_keyCode = ani->_okeyCode;
 				ex->_field_14 = 0x100;
 				ex->_excFlags = 3;
-				mq->_exCommands.push_back(ex);
+				mq->addExCommandToEnd(ex);
 			} else {
 				ex = new ExCommand(subj->_id, 55, 0, 0, 0, 0, 1, 0, 0, 0);
 				ex->_x = ani->_id;
@@ -373,7 +373,7 @@ LABEL_38:
 				ex->_excFlags = 2;
 				ex->_field_14 = (obj->_objtype != kObjTypePictureObject);
 				ex->_field_20 = invId;
-				mq->_exCommands.push_back(ex);
+				mq->addExCommandToEnd(ex);
 
 				if (!mq->_isFinished)
 					return true;
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 32cfb4f..3614873 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -326,6 +326,10 @@ void MessageQueue::addExCommand(ExCommand *ex) {
 	_exCommands.push_front(ex);
 }
 
+void MessageQueue::addExCommandToEnd(ExCommand *ex) {
+	_exCommands.push_back(ex);
+}
+
 ExCommand *MessageQueue::getExCommandByIndex(uint idx) {
 	if (idx > _exCommands.size())
 		return 0;
@@ -492,7 +496,7 @@ int MessageQueue::calcDuration(StaticANIObject *obj) {
 	ExCommand *ex;
 	Movement *mov;
 
-	for (uint i = 0; (ex = getExCommandByIndex(i)); i++)
+	for (uint i = 0; (ex = getExCommandByIndex(i)); i++) {
 		if (ex->_parentId == obj->_id) {
 			if (ex->_messageKind == 1 || ex->_messageKind == 20) {
 				if ((mov = obj->getMovementById(ex->_messageNum)) != 0) {
@@ -503,6 +507,7 @@ int MessageQueue::calcDuration(StaticANIObject *obj) {
 				}
 			}
 		}
+	}
 
 	return res;
 }
diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h
index 326f05c..4109b3e 100644
--- a/engines/fullpipe/messages.h
+++ b/engines/fullpipe/messages.h
@@ -100,13 +100,15 @@ class MessageQueue : public CObject {
 	char *_queueName;
 	int16 _dataId;
 	CObject *_field_14;
-	Common::List<ExCommand *> _exCommands;
 	int _counter;
 	int _field_38;
 	int _isFinished;
 	int _parId;
 	int _flag1;
 
+  private:
+	Common::List<ExCommand *> _exCommands;
+
  public:
 	MessageQueue();
 	MessageQueue(int dataId);
@@ -121,6 +123,7 @@ class MessageQueue : public CObject {
 	uint getCount() { return _exCommands.size(); }
 
 	void addExCommand(ExCommand *ex);
+	void addExCommandToEnd(ExCommand *ex);
 	ExCommand *getExCommandByIndex(uint idx);
 	void deleteExCommandByIndex(uint idx, bool doFree);
 
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 20b710d..30957a9 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -170,7 +170,7 @@ MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos,
 		for (uint i = 0; i < closestP->_messageQueueObj->getCount(); i++) {
 			ex = new ExCommand(closestP->_messageQueueObj->getExCommandByIndex(i));
 			ex->_excFlags |= 2;
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 		}
 
 		ex = new ExCommand(subj->_id, 51, 0, xpos, ypos, 0, 1, 0, 0, 0);
@@ -179,7 +179,7 @@ MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos,
 		ex->_keyCode = subj->_okeyCode;
 		ex->_excFlags |= 2;
 
-		mq->_exCommands.push_back(ex);
+		mq->addExCommandToEnd(ex);
 	}
 
 	return mq;
@@ -817,7 +817,7 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) {
 				ex->_keyCode = _items2[movInfo->field_0]->_obj->_okeyCode;
 				ex->_field_24 = 1;
 				ex->_field_14 = -1;
-				mq->_exCommands.push_back(ex);
+				mq->addExCommandToEnd(ex);
 
 				curX += mg2i->_mx;
 				curY += mg2i->_my;
@@ -1046,20 +1046,20 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
 			ex->_keyCode = picAniInfo.field_8;
 			ex->_excFlags |= 2;
 
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 		} else {
 			ExCommand *ex = new ExCommand(picAniInfo.objectId, 22, obj->_statics->_staticsId, 0, 0, 0, 1, 0, 0, 0);
 
 			ex->_keyCode = picAniInfo.field_8;
 			ex->_excFlags |= 3;
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 
 			ex = new ExCommand(picAniInfo.objectId, 5, -1, obj->_ox, obj->_oy, 0, 1, 0, 0, 0);
 
 			ex->_field_14 = -1;
 			ex->_keyCode = picAniInfo.field_8;
 			ex->_excFlags |= 3;
-			mq->_exCommands.push_back(ex);
+			mq->addExCommandToEnd(ex);
 		}
 
 		obj->setPicAniInfo(&picAniInfo);
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 5006121..d46c84f 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -420,7 +420,7 @@ void sceneHandler04_sub1(ExCommand *ex) {
 	if (ex) {
 		ExCommand *newex = new ExCommand(ex);
 
-		mq->_exCommands.push_back(newex);
+		mq->addExCommandToEnd(newex);
 	  }
 
 	mq->_flags |= 1;






More information about the Scummvm-git-logs mailing list