diff options
author | Filippos Karapetis | 2010-06-22 08:57:25 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-06-22 08:57:25 +0000 |
commit | 53b82298e8236938d8724f904d2baba1f67b9eb1 (patch) | |
tree | 8acafce8acf7575973e490acc010e903d602eca9 /engines/sci/engine/savegame.cpp | |
parent | e3b3641db22ba38177a66d2ff73f342075f0687b (diff) | |
download | scummvm-rg350-53b82298e8236938d8724f904d2baba1f67b9eb1.tar.gz scummvm-rg350-53b82298e8236938d8724f904d2baba1f67b9eb1.tar.bz2 scummvm-rg350-53b82298e8236938d8724f904d2baba1f67b9eb1.zip |
Stop saving the buffer, script and heap sizes of each script in saved games
svn-id: r50137
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r-- | engines/sci/engine/savegame.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index fb79056e0c..d6cbd32eae 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -520,9 +520,12 @@ void HunkTable::saveLoadWithSerializer(Common::Serializer &s) { void Script::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint32LE(_nr); - s.syncAsUint32LE(_bufSize); - s.syncAsUint32LE(_scriptSize); - s.syncAsUint32LE(_heapSize); + + if (s.isLoading()) + init(_nr, g_sci->getResMan()); + s.skip(4, VER(9), VER(22)); // OBSOLETE: Used to be _bufSize + s.skip(4, VER(9), VER(22)); // OBSOLETE: Used to be _scriptSize + s.skip(4, VER(9), VER(22)); // OBSOLETE: Used to be _heapSize if (s.getVersion() <= 10) { assert((s.isLoading())); @@ -775,9 +778,11 @@ void SegManager::reconstructScripts(EngineState *s) { Object *obj = scr->scriptObjInit(addr, false); if (getSciVersion() < SCI_VERSION_1_1) { - if (!obj->initBaseObject(this, addr, false)) { - warning("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr)); - //scr->scriptObjRemove(addr); + if (!obj->isFreed()) { + if (!obj->initBaseObject(this, addr, false)) { + warning("Failed to locate base object for object at %04X:%04X; skipping", PRINT_REG(addr)); + //scr->scriptObjRemove(addr); + } } } } |