ScummVM API documentation
detection_steam.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef SCUMM_DETECTION_STEAM_H
23 #define SCUMM_DETECTION_STEAM_H
24 
25 #include "scumm/file.h"
26 
27 namespace Scumm {
28 
29 // The following table includes all the index files, which are embedded in the
30 // main game executables in Steam versions.
31 static const SteamIndexFile steamIndexFiles[] = {
32  { GID_INDY3, Common::kPlatformWindows, "%02d.LFL", "00.LFL", "Indiana Jones and the Last Crusade.exe", 162056, 6295 },
33  { GID_INDY3, Common::kPlatformMacintosh, "%02d.LFL", "00.LFL", "The Last Crusade", 150368, 6295 },
34  { GID_INDY4, Common::kPlatformWindows, "atlantis.%03d", "ATLANTIS.000", "Indiana Jones and the Fate of Atlantis.exe", 224336, 12035 },
35  { GID_INDY4, Common::kPlatformMacintosh, "atlantis.%03d", "ATLANTIS.000", "The Fate of Atlantis", 260224, 12035 },
36  { GID_LOOM, Common::kPlatformWindows, "%03d.LFL", "000.LFL", "Loom.exe", 187248, 8307 },
37  { GID_LOOM, Common::kPlatformMacintosh, "%03d.LFL", "000.LFL", "Loom", 170464, 8307 },
38  { GID_DIG, Common::kPlatformWindows, "dig.la%d", "DIG.LA0", "The Dig.exe", 340632, 16304 },
39  { GID_DIG, Common::kPlatformMacintosh, "dig.la%d", "DIG.LA0", "The Dig", 339744, 16304 },
40  { 0, Common::kPlatformUnknown, nullptr, nullptr, nullptr, 0, 0 }
41 };
42 
43 static const SteamIndexFile *lookUpSteamIndexFile(Common::String pattern, Common::Platform platform) {
44  for (const SteamIndexFile *indexFile = steamIndexFiles; indexFile->len; ++indexFile) {
45  if (platform == indexFile->platform && pattern.equalsIgnoreCase(indexFile->pattern))
46  return indexFile;
47  }
48 
49  return nullptr;
50 }
51 
52 } // End of namespace Scumm
53 
54 #endif // SCUMM_DETECTION_STEAM_H
Definition: str.h:59
Definition: actor.h:30
Platform
Definition: platform.h:46