aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-22 08:57:25 +0000
committerFilippos Karapetis2010-06-22 08:57:25 +0000
commit53b82298e8236938d8724f904d2baba1f67b9eb1 (patch)
tree8acafce8acf7575973e490acc010e903d602eca9 /engines
parente3b3641db22ba38177a66d2ff73f342075f0687b (diff)
downloadscummvm-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')
-rw-r--r--engines/sci/engine/savegame.cpp17
-rw-r--r--engines/sci/engine/savegame.h2
2 files changed, 12 insertions, 7 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);
+ }
}
}
}
diff --git a/engines/sci/engine/savegame.h b/engines/sci/engine/savegame.h
index aa22d42135..29f716d48d 100644
--- a/engines/sci/engine/savegame.h
+++ b/engines/sci/engine/savegame.h
@@ -36,7 +36,7 @@ namespace Sci {
struct EngineState;
enum {
- CURRENT_SAVEGAME_VERSION = 22,
+ CURRENT_SAVEGAME_VERSION = 23,
MINIMUM_SAVEGAME_VERSION = 9
};