aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2014-07-03 00:13:33 +0300
committerFilippos Karapetis2014-07-03 00:13:33 +0300
commit902a140f3e8058c582496296c7c1e0c55b243dda (patch)
tree3b29ba7b03b085eceec9267f575b02d06017361b /engines/scumm/scumm.cpp
parent5e78bee2f556466e090d7920b0983a23ea32b9f3 (diff)
downloadscummvm-rg350-902a140f3e8058c582496296c7c1e0c55b243dda.tar.gz
scummvm-rg350-902a140f3e8058c582496296c7c1e0c55b243dda.tar.bz2
scummvm-rg350-902a140f3e8058c582496296c7c1e0c55b243dda.zip
SCUMM: Add support for Steam versions of Indy 3, Indy 4, Loom and Dig
Many Thanks to Ben Castricum for the original patch
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp47
1 files changed, 43 insertions, 4 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 34c231e5d4..8c0325934d 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1026,6 +1026,35 @@ Common::Error ScummEngine::init() {
}
#endif
+ // Extra directories needed for the Steam versions
+ if (_filenamePattern.genMethod == kGenDiskNumSteam || _filenamePattern.genMethod == kGenRoomNumSteam) {
+ if (_game.platform == Common::kPlatformWindows) {
+ switch (_game.id) {
+ case GID_INDY3 :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "indy3");
+ break;
+ case GID_INDY4 :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "atlantis");
+ break;
+ case GID_LOOM :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "loom");
+ break;
+#ifdef ENABLE_SCUMM_7_8
+ case GID_DIG :
+ SearchMan.addSubDirectoryMatching(gameDataDir, "dig");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "dig/video");
+ break;
+#endif
+ default:
+ break;
+ }
+ } else {
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/MacOS");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/Resources");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "Contents/Resources/video");
+ }
+ }
// The kGenUnchanged method is only used for 'container files', i.e. files
// that contain the real game files bundled together in an archive format.
@@ -1126,15 +1155,25 @@ Common::Error ScummEngine::init() {
error("Couldn't find known subfile inside container file '%s'", _containerFile.c_str());
_fileHandle->close();
-
} else {
error("kGenUnchanged used with unsupported platform");
}
} else {
- // Regular access, no container file involved
- _fileHandle = new ScummFile();
+ if (_filenamePattern.genMethod == kGenDiskNumSteam || _filenamePattern.genMethod == kGenRoomNumSteam) {
+ // Steam game versions have the index file embedded in the main executable
+ _fileHandle = new ScummSteamFile(_game);
+ } else {
+ // Regular access, no container file involved
+ _fileHandle = new ScummFile();
+ }
}
+ // Steam Win and Mac versions share the same DOS data files. We show Windows or Mac
+ // for the platform the detector, but internally we force the platform to DOS, so that
+ // the code for handling the original DOS data files is used.
+ if (_filenamePattern.genMethod == kGenDiskNumSteam || _filenamePattern.genMethod == kGenRoomNumSteam)
+ _game.platform = Common::kPlatformDOS;
+
// Load CJK font, if present
// Load it earlier so _useCJKMode variable could be set
loadCJKFont();
@@ -1218,7 +1257,7 @@ Common::Error ScummEngine::init() {
void ScummEngine::setupScumm() {
// On some systems it's not safe to run CD audio games from the CD.
- if (_game.features & GF_AUDIOTRACKS) {
+ if (_game.features & GF_AUDIOTRACKS && !Common::File::exists("CDDA.SOU")) {
checkCD();
int cd_num = ConfMan.getInt("cdrom");