diff options
author | Paul Gilbert | 2018-02-24 16:14:59 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-02-24 16:14:59 -0500 |
commit | c577f6dba40df60f48a87a1b6733abda5aa91dbb (patch) | |
tree | ca9b93a855ca712a5824d56407b8c9a4dc17fc65 /engines/xeen | |
parent | 1b96899afcd78da0bf026f407df08de764f726eb (diff) | |
download | scummvm-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.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); |