diff options
-rw-r--r-- | engines/tsage/converse.cpp | 9 | ||||
-rw-r--r-- | engines/tsage/core.cpp | 14 | ||||
-rw-r--r-- | engines/tsage/globals.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/ringworld_logic.cpp | 3 | ||||
-rw-r--r-- | engines/tsage/saveload.cpp | 2 | ||||
-rw-r--r-- | engines/tsage/saveload.h | 2 | ||||
-rw-r--r-- | engines/tsage/scenes.cpp | 3 |
7 files changed, 24 insertions, 12 deletions
diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp index 8e36acf2b6..84c2089471 100644 --- a/engines/tsage/converse.cpp +++ b/engines/tsage/converse.cpp @@ -53,7 +53,8 @@ void SequenceManager::setup() { } void SequenceManager::synchronise(Serialiser &s) { - Action::synchronise(s); + if (s.getVersion() >= 2) + Action::synchronise(s); s.syncAsSint32LE(_resNum); s.syncAsSint32LE(_sequenceOffset); @@ -590,7 +591,8 @@ void StripManager::load() { } void StripManager::synchronise(Serialiser &s) { - Action::synchronise(s); + if (s.getVersion() >= 2) + Action::synchronise(s); s.syncAsSint32LE(_stripNum); s.syncAsSint32LE(_obj44Index); @@ -804,7 +806,8 @@ Speaker::Speaker() : EventHandler() { } void Speaker::synchronise(Serialiser &s) { - EventHandler::synchronise(s); + if (s.getVersion() >= 2) + EventHandler::synchronise(s); _fieldA.synchronise(s); SYNC_POINTER(_field18); diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index eab5efbce0..cdebc8b77f 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -110,6 +110,8 @@ Action::Action() { void Action::synchronise(Serialiser &s) { EventHandler::synchronise(s); + if (s.getVersion() == 1) + remove(); SYNC_POINTER(_owner); s.syncAsSint32LE(_actionIndex); @@ -925,7 +927,8 @@ bool PlayerMover::sub_F8E5(const Common::Point &pt1, const Common::Point &pt2, c /*--------------------------------------------------------------------------*/ void PlayerMover2::synchronise(Serialiser &s) { - PlayerMover::synchronise(s); + if (s.getVersion() >= 2) + PlayerMover::synchronise(s); SYNC_POINTER(_destObject); s.syncAsSint16LE(_maxArea); s.syncAsSint16LE(_minArea); @@ -1346,7 +1349,8 @@ void ScenePalette::changeBackground(const Rect &bounds, FadeMode fadeMode) { } void ScenePalette::synchronise(Serialiser &s) { - SavedObject::synchronise(s); + if (s.getVersion() >= 2) + SavedObject::synchronise(s); s.syncBytes(_palette, 256 * 3); s.syncAsSint32LE(_colors.foreground); @@ -2502,7 +2506,8 @@ void SceneObjectList::deactivate() { } void SceneObjectList::synchronise(Serialiser &s) { - SavedObject::synchronise(s); + if (s.getVersion() >= 2) + SavedObject::synchronise(s); _objList.synchronise(s); } @@ -3425,7 +3430,8 @@ void GameHandler::execute() { } void GameHandler::synchronise(Serialiser &s) { - EventHandler::synchronise(s); + if (s.getVersion() >= 2) + EventHandler::synchronise(s); _lockCtr.synchronise(s); _waitCtr.synchronise(s); diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp index 10db2e9c5d..26d2d13e4f 100644 --- a/engines/tsage/globals.cpp +++ b/engines/tsage/globals.cpp @@ -101,7 +101,8 @@ void Globals::reset() { } void Globals::synchronise(Serialiser &s) { - SavedObject::synchronise(s); + if (s.getVersion() >= 2) + SavedObject::synchronise(s); assert(_gfxManagers.size() == 1); _sceneItems.synchronise(s); diff --git a/engines/tsage/ringworld_logic.cpp b/engines/tsage/ringworld_logic.cpp index 204f798f81..84276b026e 100644 --- a/engines/tsage/ringworld_logic.cpp +++ b/engines/tsage/ringworld_logic.cpp @@ -320,7 +320,8 @@ void SceneArea::wait() { } void SceneArea::synchronise(Serialiser &s) { - SavedObject::synchronise(s); + if (s.getVersion() >= 2) + SavedObject::synchronise(s); s.syncAsSint16LE(_pt.x); s.syncAsSint16LE(_pt.y); diff --git a/engines/tsage/saveload.cpp b/engines/tsage/saveload.cpp index 317bc4bbb7..f495f5a433 100644 --- a/engines/tsage/saveload.cpp +++ b/engines/tsage/saveload.cpp @@ -225,7 +225,7 @@ bool Saver::readSavegameHeader(Common::InSaveFile *in, tSageSavegameHeader &head return false; header.version = in->readByte(); - if (header.version != TSAGE_SAVEGAME_VERSION) + if (header.version > TSAGE_SAVEGAME_VERSION) return false; // Read in the string diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h index c45271b8fc..b1b98ce640 100644 --- a/engines/tsage/saveload.h +++ b/engines/tsage/saveload.h @@ -36,7 +36,7 @@ namespace tSage { typedef void (*SaveNotifierFn)(bool postFlag); -#define TSAGE_SAVEGAME_VERSION 1 +#define TSAGE_SAVEGAME_VERSION 2 class SavedObject; diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp index a59c86c97d..fdd692d188 100644 --- a/engines/tsage/scenes.cpp +++ b/engines/tsage/scenes.cpp @@ -257,7 +257,8 @@ Scene::~Scene() { } void Scene::synchronise(Serialiser &s) { - StripCallback::synchronise(s); + if (s.getVersion() >= 2) + StripCallback::synchronise(s); s.syncAsSint32LE(_field12); s.syncAsSint32LE(_screenNumber); |