aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-25 19:38:44 +0200
committerEugene Sandulenko2016-09-25 19:39:07 +0200
commitcc0ad208aa3cd7776af984eb9d4eb65463af7a49 (patch)
tree0d228ec2902c6428c54e52cbee526327df349691
parent5de0eb90453646d29e5d195a5150650c44acab1b (diff)
downloadscummvm-rg350-cc0ad208aa3cd7776af984eb9d4eb65463af7a49.tar.gz
scummvm-rg350-cc0ad208aa3cd7776af984eb9d4eb65463af7a49.tar.bz2
scummvm-rg350-cc0ad208aa3cd7776af984eb9d4eb65463af7a49.zip
FULLPIPE: Added more debug output to saveload code
-rw-r--r--engines/fullpipe/stateloader.cpp14
-rw-r--r--engines/fullpipe/statesaver.cpp13
2 files changed, 25 insertions, 2 deletions
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 8f6a3b243c..32c611ff0b 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 31c2543a23..cbededf283 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);