diff options
author | Eugene Sandulenko | 2016-09-19 19:17:02 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-09-19 19:17:02 +0200 |
commit | a60558071d0c6ffec9d099571fd1daff9e735532 (patch) | |
tree | 4e6cceae90921f7b32d2d072deedfbcec631e472 /engines/fullpipe | |
parent | 783d968e20fb7a29d5c19ba6671d6c9ba363ec41 (diff) | |
download | scummvm-rg350-a60558071d0c6ffec9d099571fd1daff9e735532.tar.gz scummvm-rg350-a60558071d0c6ffec9d099571fd1daff9e735532.tar.bz2 scummvm-rg350-a60558071d0c6ffec9d099571fd1daff9e735532.zip |
FULLPIPE: Fix game save/load
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/stateloader.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/statesaver.cpp | 2 | ||||
-rw-r--r-- | engines/fullpipe/utils.cpp | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 1f327b541a..d5d374f454 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -78,8 +78,6 @@ void GameLoader::readSavegame(const char *fname) { for (uint i = 0; i < header.encSize; i++) data[i] -= i & 0x7f; - //Common::hexdump(data, 48); - MfcArchive *archive = new MfcArchive(new Common::MemoryReadStream(data, header.encSize)); GameVar *var = (GameVar *)archive->readClass(); diff --git a/engines/fullpipe/statesaver.cpp b/engines/fullpipe/statesaver.cpp index 406c87af10..eaf0352cec 100644 --- a/engines/fullpipe/statesaver.cpp +++ b/engines/fullpipe/statesaver.cpp @@ -97,8 +97,6 @@ void GameLoader::writeSavegame(Scene *sc, const char *fname) { for (uint i = 0; i < header.encSize; i++) stream.getData()[i] += i & 0x7f; - //Common::hexdump(stream.getData(), 48); - if (_savegameCallback) _savegameCallback(archive, true); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index ba0e180547..9dfebf2e83 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -475,9 +475,11 @@ void MfcArchive::writeObject(CObject *obj) { writeUint16LE(0xffff); // New class _objectHash[obj] = _lastIndex++; + writeUint16LE(1); // schema + switch (obj->_objtype) { case kObjTypeGameVar: - writePascalString(lookupObjectId(kGameVar)); + writePascalString(lookupObjectId(kGameVar), true); // Two byte counter break; default: error("Unhandled save for object type: %d", obj->_objtype); |