mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 19:45:07 +00:00
FULLPIPE: Fix game save/load
This commit is contained in:
parent
783d968e20
commit
a60558071d
@ -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();
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user