aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen
diff options
context:
space:
mode:
authorPaul Gilbert2018-02-24 16:14:59 -0500
committerPaul Gilbert2018-02-24 16:14:59 -0500
commitc577f6dba40df60f48a87a1b6733abda5aa91dbb (patch)
treeca9b93a855ca712a5824d56407b8c9a4dc17fc65 /engines/xeen
parent1b96899afcd78da0bf026f407df08de764f726eb (diff)
downloadscummvm-rg350-c577f6dba40df60f48a87a1b6733abda5aa91dbb.tar.gz
scummvm-rg350-c577f6dba40df60f48a87a1b6733abda5aa91dbb.tar.bz2
scummvm-rg350-c577f6dba40df60f48a87a1b6733abda5aa91dbb.zip
XEEN: Don't save prior map state when loading new saves
Diffstat (limited to 'engines/xeen')
-rw-r--r--engines/xeen/map.cpp4
-rw-r--r--engines/xeen/map.h6
-rw-r--r--engines/xeen/saves.cpp1
3 files changed, 11 insertions, 0 deletions
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index 2200d145ef..d57d2585d7 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -1169,6 +1169,10 @@ void Map::saveMaze() {
saveMonsters();
}
+void Map::clearMaze() {
+ _mazeData[0]._mazeNumber = 0;
+}
+
void Map::cellFlagLookup(const Common::Point &pt) {
Common::Point pos = pt;
findMap();
diff --git a/engines/xeen/map.h b/engines/xeen/map.h
index 1f17954bac..a0bc77a7ec 100644
--- a/engines/xeen/map.h
+++ b/engines/xeen/map.h
@@ -484,6 +484,12 @@ public:
void saveMaze();
/**
+ * Clears the current maze. This is used during savegame loads so that
+ * the previous games maze data isn't saved as the new map is loaded
+ */
+ void clearMaze();
+
+ /**
* Gets the data for a map position at one of the relative indexes
* surrounding the current position
*/
diff --git a/engines/xeen/saves.cpp b/engines/xeen/saves.cpp
index dbd3d8bc80..27819fda0a 100644
--- a/engines/xeen/saves.cpp
+++ b/engines/xeen/saves.cpp
@@ -213,6 +213,7 @@ Common::Error SavesManager::loadGameState(int slot) {
files.load(*saveFile);
// Load the new map
+ map.clearMaze();
map._loadDarkSide = files._isDarkCc;
map.load(party._mazeId);