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

bluegr bluegr at gmail.com
Fri Dec 13 01:53:54 CET 2013


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

Summary:
6ea39711e1 FULLPIPE: Fix crash in MessageQueue::calcDuration(). Some cleanup
fbc0133ac0 FULLPIPE: Add a FIXME regarding buildMovInfo1SubItems()


Commit: 6ea39711e1ca103726f85afd31acd64a8a2c0b4e
    https://github.com/scummvm/scummvm/commit/6ea39711e1ca103726f85afd31acd64a8a2c0b4e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-12-12T16:52:37-08:00

Commit Message:
FULLPIPE: Fix crash in MessageQueue::calcDuration(). Some cleanup

Changed paths:
    engines/fullpipe/messages.cpp



diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 742b023..8ed99fc 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -309,7 +309,7 @@ void MessageQueue::update() {
 	if (_counter > 0)
 		_counter--;
 
-	if (_exCommands.size()) {
+	if (getCount()) {
 		sendNextCommand();
 	} else if (_counter == 0) {
 		_isFinished = 1;
@@ -331,7 +331,7 @@ void MessageQueue::addExCommandToEnd(ExCommand *ex) {
 }
 
 ExCommand *MessageQueue::getExCommandByIndex(uint idx) {
-	if (idx > _exCommands.size())
+	if (idx > getCount())
 		return 0;
 
 	Common::List<ExCommand *>::iterator it = _exCommands.begin();
@@ -345,7 +345,7 @@ ExCommand *MessageQueue::getExCommandByIndex(uint idx) {
 }
 
 void MessageQueue::deleteExCommandByIndex(uint idx, bool doFree) {
-	if (idx > _exCommands.size())
+	if (idx > getCount())
 		return;
 
 	Common::List<ExCommand *>::iterator it = _exCommands.begin();
@@ -369,7 +369,7 @@ void MessageQueue::transferExCommands(MessageQueue *mq) {
 }
 
 void MessageQueue::sendNextCommand() {
-	if (_exCommands.size()) {
+	if (getCount()) {
 		if (!(_flags & 4) && (_flags & 1)) {
 			messageQueueCallback1(16);
 		}
@@ -496,7 +496,8 @@ int MessageQueue::calcDuration(StaticANIObject *obj) {
 	ExCommand *ex;
 	Movement *mov;
 
-	for (uint i = 0; (ex = getExCommandByIndex(i)); i++) {
+	for (uint i = 0; i < getCount(); i++) {
+		ex = getExCommandByIndex(i);
 		if (ex->_parentId == obj->_id) {
 			if (ex->_messageKind == 1 || ex->_messageKind == 20) {
 				if ((mov = obj->getMovementById(ex->_messageNum)) != 0) {
@@ -513,7 +514,7 @@ int MessageQueue::calcDuration(StaticANIObject *obj) {
 }
 
 void MessageQueue::changeParam28ForObjectId(int objId, int oldParam28, int newParam28) {
-	for (uint i = 0; i < _exCommands.size(); i++) {
+	for (uint i = 0; i < getCount(); i++) {
 		ExCommand *ex = getExCommandByIndex(i);
 		int k = ex->_messageKind;
 


Commit: fbc0133ac0cbea90dabbe7333d4dcedc53f78ad7
    https://github.com/scummvm/scummvm/commit/fbc0133ac0cbea90dabbe7333d4dcedc53f78ad7
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-12-12T16:53:07-08:00

Commit Message:
FULLPIPE: Add a FIXME regarding buildMovInfo1SubItems()

Changed paths:
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 753106f..fbe2768 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -1160,6 +1160,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
 	if (_items2[idx]->_subItems[idxsub]._staticsId1 != obj->_statics->_staticsId)
 		movInfo1.flags |= 2;
 
+	// FIXME: This somehow corrupts the heap (reported by MSVC)
 	buildMovInfo1SubItems(&movInfo1, &tempLinkList, &linkInfoSource, &linkInfoDest);
 
 	MessageQueue *mq = buildMovInfo1MessageQueue(&movInfo1);






More information about the Scummvm-git-logs mailing list