[Scummvm-cvs-logs] scummvm master -> 6cb9429b12e5d500d9732f56799727bd966192e5

sev- sev at scummvm.org
Mon Jul 25 22:24:34 CEST 2016


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:
7b7b1cf0d6 VIDEO: Hid verbose debug output deeper
81446fdc53 FULLPIPE: Streamlined double binary numbers loading
9eb2c7362c FULLPIPE: Fix MGM array allocation
699d97b2de FULLPIPE: Fix subItems addressing in MGM
14757b1d17 FULLPIPE: Fix in MGM::recalcOffsets corner case check
6cb9429b12 FULLPIPE: Added temp trace output


Commit: 7b7b1cf0d62c378f09735ccd8ebf340916f71dd3
    https://github.com/scummvm/scummvm/commit/7b7b1cf0d62c378f09735ccd8ebf340916f71dd3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-07-25T23:24:42+03:00

Commit Message:
VIDEO: Hid verbose debug output deeper

Changed paths:
    video/avi_decoder.cpp



diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp
index 52a55f6..e07805f 100644
--- a/video/avi_decoder.cpp
+++ b/video/avi_decoder.cpp
@@ -115,7 +115,7 @@ bool AVIDecoder::parseNextChunk() {
 	if (_fileStream->eos())
 		return false;
 
-	debug(3, "Decoding tag %s", tag2str(tag));
+	debug(6, "Decoding tag %s", tag2str(tag));
 
 	switch (tag) {
 	case ID_LIST:
@@ -169,7 +169,7 @@ void AVIDecoder::handleList(uint32 listSize) {
 	listSize -= 4; // Subtract away listType's 4 bytes
 	uint32 curPos = _fileStream->pos();
 
-	debug(0, "Found LIST of type %s", tag2str(listType));
+	debug(7, "Found LIST of type %s", tag2str(listType));
 
 	switch (listType) {
 	case ID_MOVI: // Movie List
@@ -384,7 +384,7 @@ void AVIDecoder::handleNextPacket(TrackStatus &status) {
 		if (status.track->getTrackType() == Track::kTrackTypeVideo) {
 			// Horrible AVI video has a premature end
 			// Force the frame to be the last frame
-			debug(0, "Forcing end of AVI video");
+			debug(7, "Forcing end of AVI video");
 			((AVIVideoTrack *)status.track)->forceTrackEnd();
 		}
 
@@ -404,7 +404,7 @@ void AVIDecoder::handleNextPacket(TrackStatus &status) {
 			if (status.track->getTrackType() == Track::kTrackTypeVideo) {
 				// Horrible AVI video has a premature end
 				// Force the frame to be the last frame
-				debug(0, "Forcing end of AVI video");
+				debug(7, "Forcing end of AVI video");
 				((AVIVideoTrack *)status.track)->forceTrackEnd();
 			}
 
@@ -647,7 +647,7 @@ byte AVIDecoder::getStreamIndex(uint32 tag) const {
 void AVIDecoder::readOldIndex(uint32 size) {
 	uint32 entryCount = size / 16;
 
-	debug(0, "Old Index: %d entries", entryCount);
+	debug(7, "Old Index: %d entries", entryCount);
 
 	if (entryCount == 0)
 		return;
@@ -663,12 +663,12 @@ void AVIDecoder::readOldIndex(uint32 size) {
 	// If it's absolute, the offset will equal the start of the movie list
 	bool isAbsolute = firstEntry.offset == _movieListStart;
 
-	debug(1, "Old index is %s", isAbsolute ? "absolute" : "relative");
+	debug(6, "Old index is %s", isAbsolute ? "absolute" : "relative");
 
 	if (!isAbsolute)
 		firstEntry.offset += _movieListStart - 4;
 
-	debug(0, "Index 0: Tag '%s', Offset = %d, Size = %d (Flags = %d)", tag2str(firstEntry.id), firstEntry.offset, firstEntry.size, firstEntry.flags);
+	debug(7, "Index 0: Tag '%s', Offset = %d, Size = %d (Flags = %d)", tag2str(firstEntry.id), firstEntry.offset, firstEntry.size, firstEntry.flags);
 	_indexEntries.push_back(firstEntry);
 
 	for (uint32 i = 1; i < entryCount; i++) {
@@ -683,7 +683,7 @@ void AVIDecoder::readOldIndex(uint32 size) {
 			indexEntry.offset += _movieListStart - 4;
 
 		_indexEntries.push_back(indexEntry);
-		debug(0, "Index %d: Tag '%s', Offset = %d, Size = %d (Flags = %d)", i, tag2str(indexEntry.id), indexEntry.offset, indexEntry.size, indexEntry.flags);
+		debug(7, "Index %d: Tag '%s', Offset = %d, Size = %d (Flags = %d)", i, tag2str(indexEntry.id), indexEntry.offset, indexEntry.size, indexEntry.flags);
 	}
 }
 


Commit: 81446fdc539d95d1f23e32d2a8cbb87d83717ce1
    https://github.com/scummvm/scummvm/commit/81446fdc539d95d1f23e32d2a8cbb87d83717ce1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-07-25T23:24:42+03:00

Commit Message:
FULLPIPE: Streamlined double binary numbers loading

Changed paths:
    engines/fullpipe/utils.cpp



diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 0cc8bd8..a7dee2e 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -262,15 +262,11 @@ double MfcArchive::readDouble() {
 	// http://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/
 
 	union {
-		struct {
-			int32 a;
-			int32 b;
-		} i;
+		byte b[8];
 		double d;
 	} tmp;
 
-	tmp.i.a = readUint32LE();
-	tmp.i.b = readUint32LE();
+	read(&tmp.b, 8);
 
 	return tmp.d;
 }


Commit: 9eb2c7362c1c05c9a28ae53d30e61e4ad4514674
    https://github.com/scummvm/scummvm/commit/9eb2c7362c1c05c9a28ae53d30e61e4ad4514674
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-07-25T23:24:42+03:00

Commit Message:
FULLPIPE: Fix MGM array allocation

Changed paths:
    engines/fullpipe/mgm.cpp



diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
index 1c8ca2a..8a7e72e 100644
--- a/engines/fullpipe/mgm.cpp
+++ b/engines/fullpipe/mgm.cpp
@@ -158,7 +158,8 @@ void MGM::rebuildTables(int objId) {
 	for (uint i = 0; i < obj->_staticsList.size(); i++) {
 		_items[idx]->statics.push_back((Statics *)obj->_staticsList[i]);
 
-		_items[idx]->subItems.push_back(new MGMSubItem);
+		for (uint j = 0; j < obj->_staticsList.size(); j++) // Yes, square
+			_items[idx]->subItems.push_back(new MGMSubItem);
 	}
 
 	for (uint i = 0; i < obj->_movements.size(); i++)


Commit: 699d97b2de0290b393ca9d69bfce290604c9fa4b
    https://github.com/scummvm/scummvm/commit/699d97b2de0290b393ca9d69bfce290604c9fa4b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-07-25T23:24:42+03:00

Commit Message:
FULLPIPE: Fix subItems addressing in MGM

Changed paths:
    engines/fullpipe/mgm.cpp



diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
index 8a7e72e..a30e791 100644
--- a/engines/fullpipe/mgm.cpp
+++ b/engines/fullpipe/mgm.cpp
@@ -392,7 +392,7 @@ int MGM::countPhases(int idx, int subIdx, int endIdx, int flag) {
 
 		res += _items[idx]->subItems[subIdx + endIdx * _items[idx]->statics.size()]->movement->countPhasesWithFlag(-1, flag);
 
-		subIdx = _items[idx]->subItems[subIdx + 6 * endIdx * _items[idx]->statics.size()]->staticsIndex;
+		subIdx = _items[idx]->subItems[subIdx + endIdx * _items[idx]->statics.size()]->staticsIndex;
 	}
 
 	return res;
@@ -518,7 +518,7 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
 				int stidx = getStaticsIndex(idx, item->movements1[i]->_staticsObj2);
 				int recalc = recalcOffsets(idx, stidx, st2idx, flip, flop);
 				int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
-				int newsz = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+				int newsz = sz + item->subItems[stidx + st2idx * _items[idx]->statics.size()]->field_C;
 
 				if (recalc >= 0) {
 					if (!item->subItems[subIdx]->movement || item->subItems[subIdx]->field_8 > recalc + 1 ||
@@ -530,8 +530,8 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
 
 						mov->calcSomeXY(point, 0, -1);
 
-						item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x + point.x;
-						item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y + point.y;
+						item->subItems[subIdx]->x = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->x + point.x;
+						item->subItems[subIdx]->y = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->y + point.y;
 					}
 				}
 			}
@@ -551,12 +551,12 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
 
 							int sz = mov->_currMovement ? mov->_currMovement->_dynamicPhases.size() : mov->_dynamicPhases.size();
 
-							item->subItems[subIdx]->field_C = sz + item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->field_C;
+							item->subItems[subIdx]->field_C = sz + item->subItems[stidx + st2idx * _items[idx]->statics.size()]->field_C;
 
 							mov->calcSomeXY(point, 0, -1);
 
-							item->subItems[subIdx]->x = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->x - point.x;
-							item->subItems[subIdx]->y = item->subItems[stidx + 6 * st2idx * _items[idx]->statics.size()]->y - point.y;
+							item->subItems[subIdx]->x = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->x - point.x;
+							item->subItems[subIdx]->y = item->subItems[stidx + st2idx * _items[idx]->statics.size()]->y - point.y;
 						}
 					}
 				}


Commit: 14757b1d1719740c3ad35de31c35fccb99cb4bc3
    https://github.com/scummvm/scummvm/commit/14757b1d1719740c3ad35de31c35fccb99cb4bc3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-07-25T23:24:42+03:00

Commit Message:
FULLPIPE: Fix in MGM::recalcOffsets corner case check

Changed paths:
    engines/fullpipe/mgm.cpp



diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
index a30e791..d1f90f8 100644
--- a/engines/fullpipe/mgm.cpp
+++ b/engines/fullpipe/mgm.cpp
@@ -503,7 +503,7 @@ int MGM::recalcOffsets(int idx, int st1idx, int st2idx, bool flip, bool flop) {
 		return 0;
 	}
 
-	if (item->subItems[subIdx])
+	if (item->subItems[subIdx]->movement)
 		return item->subItems[subIdx]->field_8;
 
 	Common::Point point;


Commit: 6cb9429b12e5d500d9732f56799727bd966192e5
    https://github.com/scummvm/scummvm/commit/6cb9429b12e5d500d9732f56799727bd966192e5
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-07-25T23:24:42+03:00

Commit Message:
FULLPIPE: Added temp trace output

Changed paths:
    engines/fullpipe/messagehandlers.cpp
    engines/fullpipe/mgm.cpp
    engines/fullpipe/motion.cpp



diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index caaa8f3..b9c7996 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -425,6 +425,7 @@ int global_messageHandler3(ExCommand *cmd) {
 				if (g_fp->_msgX != cmd->_sceneClickX || g_fp->_msgY != cmd->_sceneClickY) {
 					ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
 					if (!ani || (ani->isIdle() && !(ani->_flags & 0x80) && !(ani->_flags & 0x100))) {
+						warning("WWW 1");
 						result = startWalkTo(g_fp->_gameLoader->_field_FA, -1, cmd->_sceneClickX, cmd->_sceneClickY, 0);
 						if (result) {
 							ExCommand *ex = new ExCommand(g_fp->_gameLoader->_field_FA, 17, 64, 0, 0, 0, 1, 0, 0, 0);
diff --git a/engines/fullpipe/mgm.cpp b/engines/fullpipe/mgm.cpp
index d1f90f8..c64404c 100644
--- a/engines/fullpipe/mgm.cpp
+++ b/engines/fullpipe/mgm.cpp
@@ -155,6 +155,7 @@ void MGM::rebuildTables(int objId) {
 	if (!obj)
 		return;
 
+	warning("WWW rebuild. idx: %d, size: %d", idx, obj->_staticsList.size() * obj->_staticsList.size());
 	for (uint i = 0; i < obj->_staticsList.size(); i++) {
 		_items[idx]->statics.push_back((Statics *)obj->_staticsList[i]);
 
@@ -577,6 +578,7 @@ int MGM::refreshOffsets(int objectId, int idx1, int idx2) {
 		int from = getStaticsIndexById(idx, idx1);
 		int to = getStaticsIndexById(idx, idx2);
 
+		warning("WWW 6, want idx: %d, off: %d", idx, from + to * _items[idx]->statics.size());
 		MGMSubItem *sub = _items[idx]->subItems[from + to * _items[idx]->statics.size()];
 
 		if (sub->movement) {
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index ceb3208..81424db 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -186,6 +186,7 @@ MessageQueue *MctlCompound::startMove(StaticANIObject *ani, int sourceX, int sou
 	if (sourceIdx == -1)
 		return 0;
 
+	warning("WWW 2");
 	if (idx == sourceIdx)
 		return _motionControllers[idx]->_motionControllerObj->startMove(ani, sourceX, sourceY, fuzzyMatch, staticsId);
 
@@ -1633,6 +1634,7 @@ int MovGraph2::getItemSubIndexByMGM(int index, StaticANIObject *ani) {
 		int min = 0;
 
 		for (int i = 0; i < 4; i++) {
+			warning("WWW 5");
 			int tmp = _mgm.refreshOffsets(ani->_id, ani->_statics->_staticsId, _items2[index]->_subItems[i]._staticsId1);
 
 			if (tmp >= 0 && (minidx == -1 || tmp < min)) {
@@ -2050,6 +2052,7 @@ MessageQueue *MovGraph2::startMove(StaticANIObject *ani, int xpos, int ypos, int
 	if (ani->_flags & 0x100)
 		return 0;
 
+	warning("WWW 3");
 	MessageQueue *mq = doWalkTo(ani, xpos, ypos, fuzzyMatch, staticsId);
 
 	if (!mq)
@@ -2118,6 +2121,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
 	bool subMgm = false;
 
 	if (idxsub == -1) {
+		warning("WWW 4");
 		idxsub = getItemSubIndexByMGM(idx, obj);
 		subMgm = true;
 






More information about the Scummvm-git-logs mailing list