[Scummvm-git-logs] scummvm branch-2-1 -> bec233797c70234ac5fd8cb8c6110a4a6280c8d4
dreammaster
paulfgilbert at gmail.com
Wed Jan 8 06:15:37 UTC 2020
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:
bec233797c XEEN: Fix crash in WOXCD Deep Mine Alpha
Commit: bec233797c70234ac5fd8cb8c6110a4a6280c8d4
https://github.com/scummvm/scummvm/commit/bec233797c70234ac5fd8cb8c6110a4a6280c8d4
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2020-01-07T22:13:30-08:00
Commit Message:
XEEN: Fix crash in WOXCD Deep Mine Alpha
Changed paths:
NEWS.md
engines/xeen/map.cpp
diff --git a/NEWS.md b/NEWS.md
index 0c4d030..5671ad1 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -39,6 +39,7 @@ For a more comprehensive changelog of the latest experimental code, see:
Xeen:
- Fix display of gold and gem amounts on the Switch.
- Fix tavern exit locations in Swords of Xeen.
+ - Fix crash loading Deep Mine Alpha in World of Xeen CD
3DS port:
- Major improvements.
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index 9fd967b..22a8536 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -785,17 +785,22 @@ void Map::load(int mapId) {
}
} else if (File::exists(mobName)) {
// For surrounding maps, set up flags for whether objects are present
- // Load the monster/object data
- File mobFile(mobName);
- XeenSerializer sMob(&mobFile, nullptr);
- MonsterObjectData mobData(_vm);
- mobData.synchronize(sMob, _monsterData);
- mobFile.close();
- mazeDataP->_objectsPresent.resize(mobData._objects.size());
- for (uint objIndex = 0; objIndex < mobData._objects.size(); ++objIndex) {
- const Common::Point &pt = mobData._objects[objIndex]._position;
- mazeDataP->_objectsPresent[objIndex] = ABS(pt.x) != 128 && ABS(pt.y) != 128;
+ // WORKAROUND: In WOX CD Map 120, one of the maps for Deep Mine Alpha,
+ // has invalid monster data. So to work around it, we just ignore it
+ if (!(mapId == 120 && g_vm->getIsCD() && g_vm->getGameID() == GType_WorldOfXeen)) {
+ // Load the monster/object data
+ File mobFile(mobName);
+ XeenSerializer sMob(&mobFile, nullptr);
+ MonsterObjectData mobData(_vm);
+ mobData.synchronize(sMob, _monsterData);
+ mobFile.close();
+
+ mazeDataP->_objectsPresent.resize(mobData._objects.size());
+ for (uint objIndex = 0; objIndex < mobData._objects.size(); ++objIndex) {
+ const Common::Point &pt = mobData._objects[objIndex]._position;
+ mazeDataP->_objectsPresent[objIndex] = ABS(pt.x) != 128 && ABS(pt.y) != 128;
+ }
}
}
}
More information about the Scummvm-git-logs
mailing list