aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2010-05-04 11:56:52 +0000
committerMax Horn2010-05-04 11:56:52 +0000
commit5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3 (patch)
treee16103eabfe926312a01e0d3a18efc1fd7f6a5d9 /engines/scumm
parentc5f94872a7c4a1082f7c401c4e90f9bd3bf0290e (diff)
downloadscummvm-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')
-rw-r--r--engines/scumm/resource.cpp2
-rw-r--r--engines/scumm/scumm.cpp18
2 files changed, 11 insertions, 9 deletions
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index f93df88c6a..301ad2be20 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -226,7 +226,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
#ifdef MACOSX
sprintf(buf, "Cannot find file: '%s'\nPlease insert disc %d.\nPress OK to retry, Quit to exit", filename, disknum);
#else
- sprintf(buf, "Cannot find file: '%s'\nInsert disc %d into drive %s\nPress OK to retry, Quit to exit", filename, disknum, _gameDataDir.getPath().c_str());
+ sprintf(buf, "Cannot find file: '%s'\nInsert disc %d into drive %s\nPress OK to retry, Quit to exit", filename, disknum, ConfMan.get("path").c_str());
#endif
result = displayMessage("Quit", "%s", buf);
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