aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/scene.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-07-25 22:07:34 -0400
committerPaul Gilbert2014-07-25 22:07:34 -0400
commit5f2687fdb3a1f5543b4214db0170317c039e60ac (patch)
tree3e7db012ed3d0557367df1b673236e86d41651c1 /engines/mads/scene.cpp
parent7d4b05098d101cdb6918ec8a11017a7d03ea8814 (diff)
downloadscummvm-rg350-5f2687fdb3a1f5543b4214db0170317c039e60ac.tar.gz
scummvm-rg350-5f2687fdb3a1f5543b4214db0170317c039e60ac.tar.bz2
scummvm-rg350-5f2687fdb3a1f5543b4214db0170317c039e60ac.zip
MADS: Main menu background is now correctly loading
Diffstat (limited to 'engines/mads/scene.cpp')
-rw-r--r--engines/mads/scene.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 639f297f86..1f95749fd8 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -196,21 +196,24 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) {
}
void Scene::loadHotspots() {
- File f(Resources::formatName(RESPREFIX_RM, _currentSceneId, ".HH"));
- MadsPack madsPack(&f);
- bool isV2 = (_vm->getGameID() != GType_RexNebular);
+ _hotspots.clear();
- Common::SeekableReadStream *stream = madsPack.getItemStream(0);
- int count = stream->readUint16LE();
- delete stream;
+ Common::File f;
+ if (f.open(Resources::formatName(RESPREFIX_RM, _currentSceneId, ".HH"))) {
+ MadsPack madsPack(&f);
+ bool isV2 = (_vm->getGameID() != GType_RexNebular);
- stream = madsPack.getItemStream(1);
- _hotspots.clear();
- for (int i = 0; i < count; ++i)
- _hotspots.push_back(Hotspot(*stream, isV2));
+ Common::SeekableReadStream *stream = madsPack.getItemStream(0);
+ int count = stream->readUint16LE();
+ delete stream;
- delete stream;
- f.close();
+ stream = madsPack.getItemStream(1);
+ for (int i = 0; i < count; ++i)
+ _hotspots.push_back(Hotspot(*stream, isV2));
+
+ delete stream;
+ f.close();
+ }
}
void Scene::loadVocab() {