[Scummvm-git-logs] scummvm master -> 12bb8f9c26d50ea3d66353fb7361bf56bdce220a

phcoder phcoder at gmail.com
Tue Oct 27 10:16:00 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
12bb8f9c26 HADESCH: Save and restore gender from savefiles


Commit: 12bb8f9c26d50ea3d66353fb7361bf56bdce220a
    https://github.com/scummvm/scummvm/commit/12bb8f9c26d50ea3d66353fb7361bf56bdce220a
Author: Vladimir Serbinenko (phcoder at google.com)
Date: 2020-10-27T11:14:52+01:00

Commit Message:
HADESCH: Save and restore gender from savefiles

Changed paths:
    engines/hadesch/persistent.cpp


diff --git a/engines/hadesch/persistent.cpp b/engines/hadesch/persistent.cpp
index fc0e876539..e0c30fe024 100644
--- a/engines/hadesch/persistent.cpp
+++ b/engines/hadesch/persistent.cpp
@@ -116,6 +116,7 @@ Persistent::Persistent() {
 	_troyPlayedOdysseusCongrats = false;
 	_troyPlayFinish = false;
 	_doQuestIntro = false;
+	_gender = kUnknown;
 
 	for (unsigned i = 0; i < ARRAYSIZE(_catacombVariants); i++)
 		for (unsigned j = 0; j < ARRAYSIZE(_catacombVariants[0]); j++)
@@ -162,7 +163,7 @@ bool Persistent::isInInventory(InventoryItem item) {
 
 HadeschSaveDescriptor::HadeschSaveDescriptor(Common::Serializer &s, int slot) {
 	s.matchBytes("hadesch", 7);
-	s.syncVersion(0);
+	s.syncVersion(1);
 	s.syncString(_heroName);
 	s.syncString(_slotName);
 	s.syncAsByte(_room);
@@ -172,7 +173,7 @@ HadeschSaveDescriptor::HadeschSaveDescriptor(Common::Serializer &s, int slot) {
 bool Persistent::syncGameStream(Common::Serializer &s) {
 	if(!s.matchBytes("hadesch", 7))
 		return false;
-	if (!s.syncVersion(0))
+	if (!s.syncVersion(1))
 		return false;
 
 	s.syncString(_heroName);
@@ -286,6 +287,8 @@ bool Persistent::syncGameStream(Common::Serializer &s) {
 	for (unsigned i = 0; i < ARRAYSIZE(_inventory); i++)
 		s.syncAsByte(_inventory[i]);
 
+	s.syncAsByte(_gender, 1);
+
 	debug("serialized");
 
 	return true;




More information about the Scummvm-git-logs mailing list