aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/xeen/party.cpp6
-rw-r--r--engines/xeen/party.h5
-rw-r--r--engines/xeen/saves.cpp1
3 files changed, 12 insertions, 0 deletions
diff --git a/engines/xeen/party.cpp b/engines/xeen/party.cpp
index eafc026e34..db73a475bc 100644
--- a/engines/xeen/party.cpp
+++ b/engines/xeen/party.cpp
@@ -87,6 +87,12 @@ void Treasure::clear() {
}
}
+void Treasure::reset() {
+ clear();
+ _hasItems = false;
+ _gold = _gems = 0;
+}
+
/*------------------------------------------------------------------------*/
const int BLACKSMITH_DATA1[4][4] = {
diff --git a/engines/xeen/party.h b/engines/xeen/party.h
index 4b0616bfc6..3d6142451c 100644
--- a/engines/xeen/party.h
+++ b/engines/xeen/party.h
@@ -87,6 +87,11 @@ public:
* Clears the treasure list
*/
void clear();
+
+ /**
+ * Completely reset the treasure data
+ */
+ void reset();
};
/**
diff --git a/engines/xeen/saves.cpp b/engines/xeen/saves.cpp
index 4aee1a6a34..60cac91b75 100644
--- a/engines/xeen/saves.cpp
+++ b/engines/xeen/saves.cpp
@@ -190,6 +190,7 @@ Common::Error SavesManager::loadGameState(int slot) {
// Reset any combat information from the previous game
combat.reset();
+ party._treasure.reset();
// Load the new map
map.clearMaze();