From ed0653e3939a8a9dbfac873a23c40da2c00ab81b Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Sun, 3 Apr 2016 15:26:14 +0200 Subject: ADL: Update save game format for hires2 Note: this breaks loading earlier savegames --- engines/adl/adl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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()); -- cgit v1.2.3