aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2008-09-07 22:10:58 +0000
committerMax Horn2008-09-07 22:10:58 +0000
commit2bc093828f0c626c7dd57f9cb300284b8563e411 (patch)
treedb05cf763dd73e0f413648e7b62863b104af220b /engines/scumm
parent3c48fb7eaec11a81ee90577ee2e94bfa209aee69 (diff)
downloadscummvm-rg350-2bc093828f0c626c7dd57f9cb300284b8563e411.tar.gz
scummvm-rg350-2bc093828f0c626c7dd57f9cb300284b8563e411.tar.bz2
scummvm-rg350-2bc093828f0c626c7dd57f9cb300284b8563e411.zip
Replaced Engine::_gameDataPath (a String) by Engine::_gameDataDir (an FSNode); adapted code to that (by using getChild() to get subdirs, not string concatenation
svn-id: r34434
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/resource.cpp2
-rw-r--r--engines/scumm/scumm.cpp24
2 files changed, 13 insertions, 13 deletions
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index 5160dd09e9..50e0d221ca 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, _gameDataPath.c_str());
+ 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());
#endif
result = displayMessage("Quit", buf);
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index e4a6859e21..40a6136628 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -913,20 +913,20 @@ int ScummEngine::init() {
// 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
- File::addDefaultDirectory(_gameDataPath + "ROOMS/");
- File::addDefaultDirectory(_gameDataPath + "rooms/");
+ File::addDefaultDirectory(_gameDataDir.getChild("ROOMS"));
+ File::addDefaultDirectory(_gameDataDir.getChild("rooms"));
}
if ((_game.platform == Common::kPlatformMacintosh) && (_game.version == 3)) {
// This is for the Mac version of Indy3/Loom
- File::addDefaultDirectory(_gameDataPath + "Rooms 1/");
- File::addDefaultDirectory(_gameDataPath + "Rooms 2/");
- File::addDefaultDirectory(_gameDataPath + "Rooms 3/");
+ File::addDefaultDirectory(_gameDataDir.getChild("Rooms 1"));
+ File::addDefaultDirectory(_gameDataDir.getChild("Rooms 2"));
+ File::addDefaultDirectory(_gameDataDir.getChild("Rooms 3"));
}
#ifdef ENABLE_SCUMM_7_8
#ifdef MACOSX
- if (_game.version == 8 && !memcmp(_gameDataPath.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)
@@ -943,16 +943,16 @@ int ScummEngine::init() {
#endif
if (_game.version == 8) {
// This is for COMI
- File::addDefaultDirectory(_gameDataPath + "RESOURCE/");
- File::addDefaultDirectory(_gameDataPath + "resource/");
+ File::addDefaultDirectory(_gameDataDir.getChild("RESOURCE"));
+ File::addDefaultDirectory(_gameDataDir.getChild("resource"));
}
if (_game.version == 7) {
// This is for Full Throttle & The Dig
- File::addDefaultDirectory(_gameDataPath + "VIDEO/");
- File::addDefaultDirectory(_gameDataPath + "video/");
- File::addDefaultDirectory(_gameDataPath + "DATA/");
- File::addDefaultDirectory(_gameDataPath + "data/");
+ File::addDefaultDirectory(_gameDataDir.getChild("VIDEO"));
+ File::addDefaultDirectory(_gameDataDir.getChild("video"));
+ File::addDefaultDirectory(_gameDataDir.getChild("DATA"));
+ File::addDefaultDirectory(_gameDataDir.getChild("data"));
}
#endif