aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/detection.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2014-01-23 12:56:28 -0800
committerJohannes Schickel2014-01-23 12:56:28 -0800
commitaa87af50b21a7ce03433e108b690322d44dbbb45 (patch)
treeaccaf944a9b97692e8b5b2db4951b2a90df09bbd /engines/agos/detection.cpp
parent91ebc07eb93d850f2c9bd0a8c9419a1120b63eb2 (diff)
parent047df69407fabf19385012bf8e2ebb55906ba228 (diff)
downloadscummvm-rg350-aa87af50b21a7ce03433e108b690322d44dbbb45.tar.gz
scummvm-rg350-aa87af50b21a7ce03433e108b690322d44dbbb45.tar.bz2
scummvm-rg350-aa87af50b21a7ce03433e108b690322d44dbbb45.zip
Merge pull request #422 from lordhoto/agos-archive
AGOS: Archive code cleanup
Diffstat (limited to 'engines/agos/detection.cpp')
-rw-r--r--engines/agos/detection.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index a5a42a86ad..b6d3c2f020 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -28,6 +28,7 @@
#include "common/savefile.h"
#include "common/system.h"
#include "common/textconsole.h"
+#include "common/installshield_cab.h"
#include "agos/intern.h"
#include "agos/agos.h"
@@ -269,8 +270,12 @@ void AGOSEngine::loadArchives() {
if (getFeatures() & GF_PACKED) {
for (ag = _gameDescription->desc.filesDescriptions; ag->fileName; ag++) {
- if (!_archives.hasArchive(ag->fileName))
- _archives.registerArchive(ag->fileName, ag->fileType);
+ if (!SearchMan.hasArchive(ag->fileName)) {
+ Common::SeekableReadStream *stream = SearchMan.createReadStreamForMember(ag->fileName);
+
+ if (stream)
+ SearchMan.add(ag->fileName, Common::makeInstallShieldArchive(stream, DisposeAfterUse::YES), ag->fileType);
+ }
}
}
}