AVALANCHE: Fix savegames compatibility before/after Nim implementation

This commit is contained in:
Strangerke 2013-11-23 10:18:04 +01:00
parent 13449472f2
commit 84e99ae652
3 changed files with 8 additions and 1 deletions

View File

@ -60,7 +60,7 @@ struct AvalancheGameDescription {
ADGameDescription desc;
};
static const int kSavegameVersion = 1;
static const int kSavegameVersion = 2;
enum Pitch {
kPitchInvalid,

View File

@ -43,6 +43,9 @@ void Nim::resetVariables() {
}
void Nim::synchronize(Common::Serializer &sz) {
if (sz.isLoading() && sz.getVersion() < 2)
return;
sz.syncAsByte(_playedNim);
}

View File

@ -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);
}