[Scummvm-cvs-logs] SF.net SVN: scummvm:[50137] scummvm/trunk/engines/sci/engine
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Jun 22 10:57:26 CEST 2010
Revision: 50137
http://scummvm.svn.sourceforge.net/scummvm/?rev=50137&view=rev
Author: thebluegr
Date: 2010-06-22 08:57:25 +0000 (Tue, 22 Jun 2010)
Log Message:
-----------
Stop saving the buffer, script and heap sizes of each script in saved games
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/savegame.cpp
scummvm/trunk/engines/sci/engine/savegame.h
Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp 2010-06-22 05:10:43 UTC (rev 50136)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp 2010-06-22 08:57:25 UTC (rev 50137)
@@ -520,10 +520,13 @@
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()));
// OBSOLETE: Skip over the old _objIndices data when loading
@@ -775,9 +778,11 @@
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);
+ }
}
}
}
Modified: scummvm/trunk/engines/sci/engine/savegame.h
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.h 2010-06-22 05:10:43 UTC (rev 50136)
+++ scummvm/trunk/engines/sci/engine/savegame.h 2010-06-22 08:57:25 UTC (rev 50137)
@@ -36,7 +36,7 @@
struct EngineState;
enum {
- CURRENT_SAVEGAME_VERSION = 22,
+ CURRENT_SAVEGAME_VERSION = 23,
MINIMUM_SAVEGAME_VERSION = 9
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list