diff options
author | Strangerke | 2013-11-23 10:18:04 +0100 |
---|---|---|
committer | Strangerke | 2013-11-23 10:18:04 +0100 |
commit | 84e99ae652662dfb32294cd9034666af9cf47e76 (patch) | |
tree | 0e270d81d31f527e509408744aee837eb4f8d1bb | |
parent | 13449472f2b2930cb09bcb685bf1d9a49c0d8ed1 (diff) | |
download | scummvm-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.h | 2 | ||||
-rw-r--r-- | engines/avalanche/nim.cpp | 3 | ||||
-rw-r--r-- | engines/avalanche/parser.cpp | 4 |
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); } |