diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/xeen/map.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/map.h | 6 | ||||
-rw-r--r-- | engines/xeen/saves.cpp | 1 |
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); |