aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter van Niftrik2016-04-03 15:26:14 +0200
committerWalter van Niftrik2016-06-06 20:35:49 +0200
commited0653e3939a8a9dbfac873a23c40da2c00ab81b (patch)
tree0903cbce81e318423489268d1fcc1f4d4457e7eb
parent83d75c2f4c74e8e62b1cacc08a54678394daf22b (diff)
downloadscummvm-rg350-ed0653e3939a8a9dbfac873a23c40da2c00ab81b.tar.gz
scummvm-rg350-ed0653e3939a8a9dbfac873a23c40da2c00ab81b.tar.bz2
scummvm-rg350-ed0653e3939a8a9dbfac873a23c40da2c00ab81b.zip
ADL: Update save game format for hires2
Note: this breaks loading earlier savegames
-rw-r--r--engines/adl/adl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index ba51b45f4f..c0592588c8 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -658,6 +658,8 @@ Common::Error AdlEngine::loadGameState(int slot) {
_state.room = inFile->readByte();
_state.moves = inFile->readByte();
_state.isDark = inFile->readByte();
+ _state.time.hours = inFile->readByte();
+ _state.time.minutes = inFile->readByte();
uint32 size = inFile->readUint32BE();
if (size != _state.rooms.size())
@@ -666,6 +668,7 @@ Common::Error AdlEngine::loadGameState(int slot) {
for (uint i = 0; i < size; ++i) {
_state.rooms[i].picture = inFile->readByte();
_state.rooms[i].curPicture = inFile->readByte();
+ _state.rooms[i].isFirstTime = inFile->readByte();
}
size = inFile->readUint32BE();
@@ -744,11 +747,14 @@ Common::Error AdlEngine::saveGameState(int slot, const Common::String &desc) {
outFile->writeByte(_state.room);
outFile->writeByte(_state.moves);
outFile->writeByte(_state.isDark);
+ outFile->writeByte(_state.time.hours);
+ outFile->writeByte(_state.time.minutes);
outFile->writeUint32BE(_state.rooms.size());
for (uint i = 0; i < _state.rooms.size(); ++i) {
outFile->writeByte(_state.rooms[i].picture);
outFile->writeByte(_state.rooms[i].curPicture);
+ outFile->writeByte(_state.rooms[i].isFirstTime);
}
outFile->writeUint32BE(_state.items.size());