[Scummvm-git-logs] scummvm master -> cc0ad208aa3cd7776af984eb9d4eb65463af7a49

sev- sev at scummvm.org
Sun Sep 25 19:39:51 CEST 2016


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:
cc0ad208aa FULLPIPE: Added more debug output to saveload code


Commit: cc0ad208aa3cd7776af984eb9d4eb65463af7a49
    https://github.com/scummvm/scummvm/commit/cc0ad208aa3cd7776af984eb9d4eb65463af7a49
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-25T19:39:07+02:00

Commit Message:
FULLPIPE: Added more debug output to saveload code

Changed paths:
    engines/fullpipe/stateloader.cpp
    engines/fullpipe/statesaver.cpp



diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 8f6a3b2..32c611f 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -106,7 +106,9 @@ void GameLoader::readSavegame(const char *fname) {
 
 	for (uint i = 0; i < arrSize; i++) {
 		_sc2array[i]._picAniInfosCount = archive->readUint32LE();
-		debugC(3, kDebugLoading, "Count %d: %d", i, _sc2array[i]._picAniInfosCount);
+
+		if (_sc2array[i]._picAniInfosCount)
+			debugC(3, kDebugLoading, "Count %d: %d", i, _sc2array[i]._picAniInfosCount);
 
 		free(_sc2array[i]._picAniInfos);
 		_sc2array[i]._picAniInfos = (PicAniInfo **)malloc(sizeof(PicAniInfo *) * _sc2array[i]._picAniInfosCount);
@@ -117,6 +119,14 @@ void GameLoader::readSavegame(const char *fname) {
 		}
 	}
 
+	int num = 2;
+	for (int k = 0; k < _sc2array[num]._picAniInfosCount; k++) {
+		debugC(4, kDebugLoading, "num: %d", k);
+		debugC(4, kDebugLoading, "type: %d id: %d", _sc2array[num]._picAniInfos[k]->type, _sc2array[num]._picAniInfos[k]->objectId);
+		debugC(4, kDebugLoading, "staticsId: %d movid: %d movphase: %d", _sc2array[num]._picAniInfos[k]->staticsId,
+				_sc2array[num]._picAniInfos[k]->movementId, _sc2array[num]._picAniInfos[k]->dynamicPhaseIndex);
+	}
+
 	delete archive;
 
 	getGameLoaderInventory()->rebuildItemRects();
@@ -588,6 +598,8 @@ bool PicAniInfo::load(MfcArchive &file) {
 	oy = file.readSint32LE();
 	priority = file.readUint32LE();
 	staticsId = file.readUint16LE();
+	if (objectId == 334)
+		warning("objid: %d stid: %d", objectId, staticsId);
 	movementId = file.readUint16LE();
 	dynamicPhaseIndex = file.readUint16LE();
 	flags = file.readUint16LE();
diff --git a/engines/fullpipe/statesaver.cpp b/engines/fullpipe/statesaver.cpp
index 31c2543..cbededf 100644
--- a/engines/fullpipe/statesaver.cpp
+++ b/engines/fullpipe/statesaver.cpp
@@ -90,13 +90,22 @@ void GameLoader::writeSavegame(Scene *sc, const char *fname) {
 	for (uint i = 0; i < _sc2array.size(); i++) {
 		archive->writeUint32LE(_sc2array[i]._picAniInfosCount);
 
-		debugC(3, kDebugLoading, "Count %d: %d", i, _sc2array[i]._picAniInfosCount);
+		if (_sc2array[i]._picAniInfosCount)
+			debugC(3, kDebugLoading, "Count %d: %d", i, _sc2array[i]._picAniInfosCount);
 
 		for (uint j = 0; j < _sc2array[i]._picAniInfosCount; j++) {
 			_sc2array[i]._picAniInfos[j]->save(*archive);
 		}
 	}
 
+	int num = 2;
+	for (int k = 0; k < _sc2array[num]._picAniInfosCount; k++) {
+		debugC(4, kDebugLoading, "num: %d", k);
+		debugC(4, kDebugLoading, "type: %d id: %d", _sc2array[num]._picAniInfos[k]->type, _sc2array[num]._picAniInfos[k]->objectId);
+		debugC(4, kDebugLoading, "staticsId: %d movid: %d movphase: %d", _sc2array[num]._picAniInfos[k]->staticsId,
+				_sc2array[num]._picAniInfos[k]->movementId, _sc2array[num]._picAniInfos[k]->dynamicPhaseIndex);
+	}
+
 	header.encSize = stream.size();
 
 	// Now obfuscate the data
@@ -169,6 +178,8 @@ void PicAniInfo::save(MfcArchive &file) {
 	file.writeSint32LE(oy);
 	file.writeUint32LE(priority);
 	file.writeUint16LE(staticsId);
+	if (objectId == 334)
+		warning("objid: %d stid: %d", objectId, staticsId);
 	file.writeUint16LE(movementId);
 	file.writeUint16LE(dynamicPhaseIndex);
 	file.writeUint16LE(flags);





More information about the Scummvm-git-logs mailing list