[Scummvm-git-logs] scummvm master -> a1eed0aa70cf6ecf252c52866cbeaf70b6bf7d80

dreammaster dreammaster at scummvm.org
Tue Nov 14 13:28:46 CET 2017


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:
a1eed0aa70 XEEN: Added missing initialization for new games


Commit: a1eed0aa70cf6ecf252c52866cbeaf70b6bf7d80
    https://github.com/scummvm/scummvm/commit/a1eed0aa70cf6ecf252c52866cbeaf70b6bf7d80
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-11-14T07:28:40-05:00

Commit Message:
XEEN: Added missing initialization for new games

Changed paths:
    engines/xeen/party.h
    engines/xeen/saves.cpp


diff --git a/engines/xeen/party.h b/engines/xeen/party.h
index d32c6fd..a8eeb09 100644
--- a/engines/xeen/party.h
+++ b/engines/xeen/party.h
@@ -97,11 +97,6 @@ private:
 	void resetYearlyBits();
 
 	/**
-	 * Resets the inventory that Blacksmiths sell
-	 */
-	void resetBlacksmithWares();
-
-	/**
 	 * Applies interest to any gold and gems in the player's bank account
 	 */
 	void giveBankInterest();
@@ -223,6 +218,11 @@ public:
 	 * Gives and/or takes amounts from various character and/or party properties
 	 */
 	bool giveTake(int takeMode, uint takeVal, int giveMode, uint giveVal, int charIdx);
+
+	/**
+	 * Resets the inventory that Blacksmiths sell
+	 */
+	void resetBlacksmithWares();
 };
 
 } // End of namespace Xeen
diff --git a/engines/xeen/saves.cpp b/engines/xeen/saves.cpp
index f9a26b1..1c06042 100644
--- a/engines/xeen/saves.cpp
+++ b/engines/xeen/saves.cpp
@@ -167,6 +167,11 @@ void SavesManager::reset() {
 	Common::Serializer sChar(&fChar, nullptr);
 	_party._roster.synchronize(sChar);
 	fChar.close();
+
+	// Set any final initial values
+	_party.resetBlacksmithWares();
+	_party._year = _vm->getGameID() == GType_WorldOfXeen ? 610 : 850;
+	_party._totalTime = 0;
 }
 
 void SavesManager::readCharFile() {





More information about the Scummvm-git-logs mailing list