diff options
author | Max Horn | 2010-05-04 11:56:52 +0000 |
---|---|---|
committer | Max Horn | 2010-05-04 11:56:52 +0000 |
commit | 5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3 (patch) | |
tree | e16103eabfe926312a01e0d3a18efc1fd7f6a5d9 /engines/scumm/scumm.cpp | |
parent | c5f94872a7c4a1082f7c401c4e90f9bd3bf0290e (diff) | |
download | scummvm-rg350-5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3.tar.gz scummvm-rg350-5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3.tar.bz2 scummvm-rg350-5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3.zip |
Get rid of Engine::_gameDataDir.
This greatly reduces indirect dependencies on several header files
from common.
svn-id: r48933
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index d858b6c1e5..29154b8738 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -933,22 +933,24 @@ ScummEngine_v8::~ScummEngine_v8() { Common::Error ScummEngine::init() { + const Common::FSNode gameDataDir(ConfMan.get("path")); + // Add default file directories. if (((_game.platform == Common::kPlatformAmiga) || (_game.platform == Common::kPlatformAtariST)) && (_game.version <= 4)) { // This is for the Amiga version of Indy3/Loom/Maniac/Zak - SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms"); + SearchMan.addSubDirectoryMatching(gameDataDir, "rooms"); } if ((_game.platform == Common::kPlatformMacintosh) && (_game.version == 3)) { // This is for the Mac version of Indy3/Loom - SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 1"); - SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 2"); - SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 3"); + SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 1"); + SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 2"); + SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 3"); } #ifdef ENABLE_SCUMM_7_8 #ifdef MACOSX - if (_game.version == 8 && !memcmp(_gameDataDir.getPath().c_str(), "/Volumes/MONKEY3_", 17)) { + if (_game.version == 8 && !memcmp(gameDataDir.getPath().c_str(), "/Volumes/MONKEY3_", 17)) { // Special case for COMI on Mac OS X. The mount points on OS X depend // on the volume name. Hence if playing from CD, we'd get a problem. // So if loading of a resource file fails, we fall back to the (fixed) @@ -963,12 +965,12 @@ Common::Error ScummEngine::init() { #endif if (_game.version == 8) // This is for COMI - SearchMan.addSubDirectoryMatching(_gameDataDir, "resource"); + SearchMan.addSubDirectoryMatching(gameDataDir, "resource"); if (_game.version == 7) { // This is for Full Throttle & The Dig - SearchMan.addSubDirectoryMatching(_gameDataDir, "video"); - SearchMan.addSubDirectoryMatching(_gameDataDir, "data"); + SearchMan.addSubDirectoryMatching(gameDataDir, "video"); + SearchMan.addSubDirectoryMatching(gameDataDir, "data"); } #endif |