aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/file.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2014-07-05 14:08:24 +0200
committerJohannes Schickel2014-07-05 14:16:20 +0200
commitc44c46a4fbd778d32b522d5a004167c5847e7778 (patch)
tree0361b893a3395e63d9b4f50fb09c99ad41dbeb18 /engines/scumm/file.cpp
parent44ac74119bd5eb827ad15aebf087905124132e3f (diff)
downloadscummvm-rg350-c44c46a4fbd778d32b522d5a004167c5847e7778.tar.gz
scummvm-rg350-c44c46a4fbd778d32b522d5a004167c5847e7778.tar.bz2
scummvm-rg350-c44c46a4fbd778d32b522d5a004167c5847e7778.zip
SCUMM: Simplify index file handling for Steam versions.
This also makes sure that all extra needed detection data for the Steam releases is located inside detection.cpp.
Diffstat (limited to 'engines/scumm/file.cpp')
-rw-r--r--engines/scumm/file.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/engines/scumm/file.cpp b/engines/scumm/file.cpp
index 8f6fdbe0cf..475ffa3238 100644
--- a/engines/scumm/file.cpp
+++ b/engines/scumm/file.cpp
@@ -29,22 +29,6 @@
namespace Scumm {
-// The following table includes all the index files, which are embedded in the
-// main game executables in Steam versions.
-const SteamIndexFile steamIndexFiles[] = {
- { GID_INDY3, Common::kPlatformWindows, "%02d.LFL", "00.LFL", "Indiana Jones and the Last Crusade.exe", 162056, 6295 },
- { GID_INDY3, Common::kPlatformMacintosh, "%02d.LFL", "00.LFL", "The Last Crusade", 150368, 6295 },
- { GID_INDY4, Common::kPlatformWindows, "atlantis.%03d", "ATLANTIS.000", "Indiana Jones and the Fate of Atlantis.exe", 224336, 12035 },
- { GID_INDY4, Common::kPlatformMacintosh, "atlantis.%03d", "ATLANTIS.000", "The Fate of Atlantis", 260224, 12035 },
- { GID_LOOM, Common::kPlatformWindows, "%03d.LFL", "000.LFL", "Loom.exe", 187248, 8307 },
- { GID_LOOM, Common::kPlatformMacintosh, "%03d.LFL", "000.LFL", "Loom", 170464, 8307 },
-#ifdef ENABLE_SCUMM_7_8
- { GID_DIG, Common::kPlatformWindows, "dig.la%d", "DIG.LA0", "The Dig.exe", 340632, 16304 },
- { GID_DIG, Common::kPlatformMacintosh, "dig.la%d", "DIG.LA0", "The Dig", 339744, 16304 },
-#endif
- { 0, Common::kPlatformUnknown, "", "", "", 0, 0 }
-};
-
#pragma mark -
#pragma mark --- ScummFile ---
#pragma mark -
@@ -205,13 +189,12 @@ uint32 ScummFile::read(void *dataPtr, uint32 dataSize) {
#pragma mark -
bool ScummSteamFile::open(const Common::String &filename) {
- for (const SteamIndexFile *indexFile = steamIndexFiles; indexFile->len; ++indexFile) {
- if (indexFile->id == _steamGame.id && indexFile->platform == _steamGame.platform && filename.equalsIgnoreCase(indexFile->indexFileName))
- return openWithSubRange(indexFile->executableName, indexFile->start, indexFile->len);
+ if (filename.equalsIgnoreCase(_indexFile.indexFileName)) {
+ return openWithSubRange(_indexFile.executableName, _indexFile.start, _indexFile.len);
+ } else {
+ // Regular non-bundled file
+ return ScummFile::open(filename);
}
-
- // Regular non-bundled file
- return ScummFile::open(filename);
}
bool ScummSteamFile::openWithSubRange(const Common::String &filename, int32 subFileStart, int32 subFileLen) {