[Scummvm-cvs-logs] scummvm master -> 7b8f3021ac8f1bbc266f7e00c4a649830316fe24

bluegr md5 at scummvm.org
Wed May 4 09:54:34 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7b8f3021ac TSAGE: Bumped up savegame version, so that the old savegames are still usable


Commit: 7b8f3021ac8f1bbc266f7e00c4a649830316fe24
    https://github.com/scummvm/scummvm/commit/7b8f3021ac8f1bbc266f7e00c4a649830316fe24
Author: md5 (md5 at scummvm.org)
Date: 2011-05-04T00:52:36-07:00

Commit Message:
TSAGE: Bumped up savegame version, so that the old savegames are still usable

Savegames from revisions bf9b98f and 4f70162d are now version 2 savegames

Changed paths:
    engines/tsage/converse.cpp
    engines/tsage/core.cpp
    engines/tsage/globals.cpp
    engines/tsage/ringworld_logic.cpp
    engines/tsage/saveload.cpp
    engines/tsage/saveload.h
    engines/tsage/scenes.cpp



diff --git a/engines/tsage/converse.cpp b/engines/tsage/converse.cpp
index 8e36acf..84c2089 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 eab5efb..cdebc8b 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 10db2e9..26d2d13 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 204f798..84276b0 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 317bc4b..f495f5a 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 c45271b..b1b98ce 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 a59c86c..fdd692d 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);






More information about the Scummvm-git-logs mailing list