aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos/detection.cpp')
-rw-r--r--engines/agos/detection.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index 2be888b92a..116e66820a 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -83,7 +83,7 @@ static const PlainGameDescriptor agosGames[] = {
#include "agos/detection_tables.h"
-static const char *directoryGlobs[] = {
+static const char *const directoryGlobs[] = {
"execute", // Used by Simon1 Acorn CD
0
};
@@ -240,6 +240,22 @@ Common::Platform AGOSEngine::getPlatform() const {
}
const char *AGOSEngine::getFileName(int type) const {
+ // Required if the InstallShield cab is been used
+ if (getGameType() == GType_PP) {
+ if (type == GAME_BASEFILE)
+ return gss->base_filename;
+ }
+
+ // Required if the InstallShield cab is been used
+ if (getGameType() == GType_FF && getPlatform() == Common::kPlatformWindows) {
+ if (type == GAME_BASEFILE)
+ return gss->base_filename;
+ if (type == GAME_RESTFILE)
+ return gss->restore_filename;
+ if (type == GAME_TBLFILE)
+ return gss->tbl_filename;
+ }
+
for (int i = 0; _gameDescription->desc.filesDescriptions[i].fileType; i++) {
if (_gameDescription->desc.filesDescriptions[i].fileType == type)
return _gameDescription->desc.filesDescriptions[i].fileName;
@@ -247,4 +263,17 @@ const char *AGOSEngine::getFileName(int type) const {
return NULL;
}
+#ifdef ENABLE_AGOS2
+void AGOSEngine::loadArchives() {
+ const ADGameFileDescription *ag;
+
+ if (getFeatures() & GF_PACKED) {
+ for (ag = _gameDescription->desc.filesDescriptions; ag->fileName; ag++) {
+ if (!_archives.hasArchive(ag->fileName))
+ _archives.registerArchive(ag->fileName, ag->fileType);
+ }
+ }
+}
+#endif
+
} // End of namespace AGOS