diff options
author | Eugene Sandulenko | 2011-08-27 08:21:57 -0700 |
---|---|---|
committer | Eugene Sandulenko | 2011-08-27 08:21:57 -0700 |
commit | 35aa235e4b4c4212b59d00adb77d2e3d00dd440e (patch) | |
tree | 08f22fd45b7d886a96e73809ff48dc4e9df39bcc /engines/agos/detection.cpp | |
parent | ac53915d01e69b90fc6bf64dbce2606c9d4044fd (diff) | |
parent | 5346ac18b7e33a603aa2743fa57f430d96cdbc33 (diff) | |
download | scummvm-rg350-35aa235e4b4c4212b59d00adb77d2e3d00dd440e.tar.gz scummvm-rg350-35aa235e4b4c4212b59d00adb77d2e3d00dd440e.tar.bz2 scummvm-rg350-35aa235e4b4c4212b59d00adb77d2e3d00dd440e.zip |
Merge pull request #79 from clone2727/agos_cab
AGOS: Add support for loading data from Windows (InstallShield) installer archives
Diffstat (limited to 'engines/agos/detection.cpp')
-rw-r--r-- | engines/agos/detection.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index 2be888b92a..a14b660817 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -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,19 @@ 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); + } + } + + _archives.enableFallback(true); +} +#endif + } // End of namespace AGOS |