diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/zvision/save_manager.cpp | 10 | ||||
-rw-r--r-- | engines/zvision/save_manager.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/zvision/save_manager.cpp b/engines/zvision/save_manager.cpp index 4f8bfeb836..ff6e1c36fa 100644 --- a/engines/zvision/save_manager.cpp +++ b/engines/zvision/save_manager.cpp @@ -44,6 +44,9 @@ void SaveManager::saveGame(uint slot, const Common::String &saveName) { // Write out the savegame header file->writeUint32BE(SAVEGAME_ID); + // Write version + file->writeByte(1); + // Write savegame name file->writeString(saveName); file->writeByte(0); @@ -58,6 +61,7 @@ void SaveManager::saveGame(uint slot, const Common::String &saveName) { // Skip over the header info autoSaveFile->readSint32BE(); // SAVEGAME_ID + autoSaveFile->readByte(); // Version autoSaveFile->seek(5, SEEK_CUR); // The string "auto" with terminating NULL // Read the rest to a buffer @@ -79,6 +83,9 @@ void SaveManager::autoSave() { // Write out the savegame header file->writeUint32BE(SAVEGAME_ID); + // Version + file->writeByte(1); + file->writeString("auto"); file->writeByte(0); @@ -153,6 +160,9 @@ bool SaveManager::readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &hea return false; } + // Read in the version + header.version = in->readByte(); + // Read in the save name header.saveName.clear(); char ch; diff --git a/engines/zvision/save_manager.h b/engines/zvision/save_manager.h index 219a8e7715..864f176e10 100644 --- a/engines/zvision/save_manager.h +++ b/engines/zvision/save_manager.h @@ -36,6 +36,7 @@ namespace ZVision { class ZVision; struct SaveGameHeader { + byte version; Common::String saveName; Graphics::Surface *thumbnail; int saveYear, saveMonth, saveDay; |