aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2013-11-23 10:18:04 +0100
committerStrangerke2013-11-23 10:18:04 +0100
commit84e99ae652662dfb32294cd9034666af9cf47e76 (patch)
tree0e270d81d31f527e509408744aee837eb4f8d1bb
parent13449472f2b2930cb09bcb685bf1d9a49c0d8ed1 (diff)
downloadscummvm-rg350-84e99ae652662dfb32294cd9034666af9cf47e76.tar.gz
scummvm-rg350-84e99ae652662dfb32294cd9034666af9cf47e76.tar.bz2
scummvm-rg350-84e99ae652662dfb32294cd9034666af9cf47e76.zip
AVALANCHE: Fix savegames compatibility before/after Nim implementation
-rw-r--r--engines/avalanche/avalanche.h2
-rw-r--r--engines/avalanche/nim.cpp3
-rw-r--r--engines/avalanche/parser.cpp4
3 files changed, 8 insertions, 1 deletions
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index fac17df6e3..87eb3c2158 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -60,7 +60,7 @@ struct AvalancheGameDescription {
ADGameDescription desc;
};
-static const int kSavegameVersion = 1;
+static const int kSavegameVersion = 2;
enum Pitch {
kPitchInvalid,
diff --git a/engines/avalanche/nim.cpp b/engines/avalanche/nim.cpp
index faca3e491d..d066ffc3e8 100644
--- a/engines/avalanche/nim.cpp
+++ b/engines/avalanche/nim.cpp
@@ -43,6 +43,9 @@ void Nim::resetVariables() {
}
void Nim::synchronize(Common::Serializer &sz) {
+ if (sz.isLoading() && sz.getVersion() < 2)
+ return;
+
sz.syncAsByte(_playedNim);
}
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index a77a71d157..f43ba61dcf 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -2471,6 +2471,10 @@ void Parser::synchronize(Common::Serializer &sz) {
sz.syncAsByte(_wearing);
sz.syncAsByte(_sworeNum);
sz.syncAsByte(_alcoholLevel);
+ if (sz.isLoading() && sz.getVersion() < 2) {
+ int dummy;
+ sz.syncAsByte(dummy);
+ }
sz.syncAsByte(_boughtOnion);
}