aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2011-12-31 11:26:42 +0100
committerStrangerke2011-12-31 11:27:14 +0100
commitb59b703f721d4a52b1e73084294d44976419fead (patch)
tree26809b44e07bc86ff4316212eafb7cddb27e1a7c
parentb89e63798a6930125ae4c984ae8bf50d5e4370f2 (diff)
downloadscummvm-rg350-b59b703f721d4a52b1e73084294d44976419fead.tar.gz
scummvm-rg350-b59b703f721d4a52b1e73084294d44976419fead.tar.bz2
scummvm-rg350-b59b703f721d4a52b1e73084294d44976419fead.zip
TSAGE: BF - Fix for bug #3467502, crash when loading in map scene
-rw-r--r--engines/tsage/blue_force/blueforce_scenes0.cpp17
-rw-r--r--engines/tsage/blue_force/blueforce_scenes0.h4
-rw-r--r--engines/tsage/saveload.h2
3 files changed, 22 insertions, 1 deletions
diff --git a/engines/tsage/blue_force/blueforce_scenes0.cpp b/engines/tsage/blue_force/blueforce_scenes0.cpp
index 682e273716..95598babc6 100644
--- a/engines/tsage/blue_force/blueforce_scenes0.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes0.cpp
@@ -209,6 +209,11 @@ void Scene50::Tooltip::synchronize(Serializer &s) {
SavedObject::synchronize(s);
_bounds.synchronize(s);
s.syncString(_msg);
+
+ if (s.getVersion() >= 10) {
+ s.syncAsSint16LE(_newSceneNumber);
+ s.syncAsSint16LE(_locationId);
+ }
}
void Scene50::Tooltip2::signal() {
@@ -323,6 +328,18 @@ void Scene50::Tooltip::highlight(bool btnDown) {
/*--------------------------------------------------------------------------*/
+Scene50::Scene50() {
+ _sceneNumber = 0;
+}
+
+
+void Scene50::synchronize(Serializer &s) {
+ if (s.getVersion() >= 10) {
+ SceneExt::synchronize(s);
+ s.syncAsSint16LE(_sceneNumber);
+ }
+}
+
void Scene50::postInit(SceneObjectList *OwnerList) {
SceneExt::postInit();
diff --git a/engines/tsage/blue_force/blueforce_scenes0.h b/engines/tsage/blue_force/blueforce_scenes0.h
index 9b0bf556f4..dd502c5f30 100644
--- a/engines/tsage/blue_force/blueforce_scenes0.h
+++ b/engines/tsage/blue_force/blueforce_scenes0.h
@@ -88,7 +88,11 @@ public:
Tooltip _location6, _location7, _location8, _location9;
Timer _timer;
public:
+ Scene50();
+
virtual Common::String getClassName() { return "Scene50"; }
+ virtual void synchronize(Serializer &s);
+
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void remove();
virtual void signal();
diff --git a/engines/tsage/saveload.h b/engines/tsage/saveload.h
index ff78abf52d..4126e31822 100644
--- a/engines/tsage/saveload.h
+++ b/engines/tsage/saveload.h
@@ -33,7 +33,7 @@ namespace TsAGE {
typedef void (*SaveNotifierFn)(bool postFlag);
-#define TSAGE_SAVEGAME_VERSION 9
+#define TSAGE_SAVEGAME_VERSION 10
class SavedObject;