diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/agos.cpp | 18 | ||||
-rw-r--r-- | engines/groovie/groovie.cpp | 6 | ||||
-rw-r--r-- | engines/m4/m4.cpp | 5 | ||||
-rw-r--r-- | engines/saga/saga.cpp | 16 | ||||
-rw-r--r-- | engines/scumm/scumm.cpp | 29 | ||||
-rw-r--r-- | engines/sword1/sword1.cpp | 20 | ||||
-rw-r--r-- | engines/sword2/sword2.cpp | 12 | ||||
-rw-r--r-- | engines/tinsel/tinsel.cpp | 2 |
8 files changed, 42 insertions, 66 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index ee2ef98c42..b9de7b7a05 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -512,24 +512,18 @@ AGOSEngine::AGOSEngine(OSystem *syst) // Add default file directories for Acorn version of // Simon the Sorcerer 1 - File::addDefaultDirectory(_gameDataDir.getChild("execute")); - File::addDefaultDirectory(_gameDataDir.getChild("EXECUTE")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "execute"); // Add default file directories for Amiga/Macintosh // verisons of Simon the Sorcerer 2 - File::addDefaultDirectory(_gameDataDir.getChild("voices")); - File::addDefaultDirectory(_gameDataDir.getChild("VOICES")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "voices"); // Add default file directories for Amiga & Macintosh // versions of The Feeble Files - File::addDefaultDirectory(_gameDataDir.getChild("gfx")); - File::addDefaultDirectory(_gameDataDir.getChild("GFX")); - File::addDefaultDirectory(_gameDataDir.getChild("movies")); - File::addDefaultDirectory(_gameDataDir.getChild("MOVIES")); - File::addDefaultDirectory(_gameDataDir.getChild("sfx")); - File::addDefaultDirectory(_gameDataDir.getChild("SFX")); - File::addDefaultDirectory(_gameDataDir.getChild("speech")); - File::addDefaultDirectory(_gameDataDir.getChild("SPEECH")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "gfx"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "movies"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "sfx"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "speech"); g_eventRec.registerRandomSource(_rnd, "agos"); } diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index bb4e142196..24af155637 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -40,9 +40,9 @@ GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) : _graphicsMan(NULL), _waitingForInput(false) { // Adding the default directories - Common::File::addDefaultDirectory(_gameDataDir.getChild("groovie")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("media")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("system")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "groovie"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "media"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "system"); // Initialize the custom debug levels Common::addDebugChannel(kGroovieDebugAll, "All", "Debug everything"); diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp index b4973002a6..79ffd7bfd0 100644 --- a/engines/m4/m4.cpp +++ b/engines/m4/m4.cpp @@ -108,9 +108,8 @@ M4Engine::M4Engine(OSystem *syst, const M4GameDescription *gameDesc) : // FIXME _vm = this; - Common::File::addDefaultDirectory(_gameDataDir); - Common::File::addDefaultDirectory("goodstuf"); // FIXME: This is nonsense - Common::File::addDefaultDirectory("resource"); // FIXME: This is nonsense + SearchMan.addSubDirectoryMatching(_gameDataDir, "goodstuf"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "resource"); Common::addDebugChannel(kDebugScript, "script", "Script debug level"); Common::addDebugChannel(kDebugConversations, "conversations", "Conversations debugging"); diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 2a2a4b993c..7386b6dd10 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -93,26 +93,26 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc) // The Linux version of Inherit the Earth puts all data files in an // 'itedata' sub-directory, except for voices.rsc - Common::File::addDefaultDirectory(_gameDataDir.getChild("itedata")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "itedata"); // The Windows version of Inherit the Earth puts various data files in // other subdirectories. - Common::File::addDefaultDirectory(_gameDataDir.getChild("graphics")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("music")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("sound")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "graphics"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "music"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "sound"); // The Multi-OS version puts the voices file in the root directory of // the CD. The rest of the data files are in game/itedata - Common::File::addDefaultDirectory(_gameDataDir.getChild("game").getChild("itedata")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "game/itedata"); // Mac CD Wyrmkeep - Common::File::addDefaultDirectory(_gameDataDir.getChild("patch")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "patch"); // Dinotopia - Common::File::addDefaultDirectory(_gameDataDir.getChild("smack")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "smack"); // FTA2 - Common::File::addDefaultDirectory(_gameDataDir.getChild("video")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "video"); _displayClip.left = _displayClip.top = 0; g_eventRec.registerRandomSource(_rnd, "saga"); diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 587e2a8abe..13a12c5480 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -934,15 +934,14 @@ Common::Error 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(_gameDataDir.getChild("ROOMS")); - File::addDefaultDirectory(_gameDataDir.getChild("rooms")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms"); } if ((_game.platform == Common::kPlatformMacintosh) && (_game.version == 3)) { // This is for the Mac version of Indy3/Loom - File::addDefaultDirectory(_gameDataDir.getChild("Rooms 1")); - File::addDefaultDirectory(_gameDataDir.getChild("Rooms 2")); - File::addDefaultDirectory(_gameDataDir.getChild("Rooms 3")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 1"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 2"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 3"); } #ifdef ENABLE_SCUMM_7_8 @@ -955,25 +954,19 @@ Common::Error ScummEngine::init() { // // This check for whether we play from CD is very crude, though. - File::addDefaultDirectory("/Volumes/MONKEY3_1/RESOURCE/"); - File::addDefaultDirectory("/Volumes/MONKEY3_1/resource/"); - File::addDefaultDirectory("/Volumes/MONKEY3_2/"); - File::addDefaultDirectory("/Volumes/MONKEY3_2/RESOURCE/"); - File::addDefaultDirectory("/Volumes/MONKEY3_2/resource/"); + SearchMan.addSubDirectoryMatching(Common::FSNode("/"), "Volumes/MONKEY3_1/RESOURCE"); + SearchMan.addSubDirectoryMatching(Common::FSNode("/"), "Volumes/MONKEY3_2"); + SearchMan.addSubDirectoryMatching(Common::FSNode("/"), "Volumes/MONKEY3_2/RESOURCE"); } else #endif - if (_game.version == 8) { + if (_game.version == 8) // This is for COMI - File::addDefaultDirectory(_gameDataDir.getChild("RESOURCE")); - File::addDefaultDirectory(_gameDataDir.getChild("resource")); - } + SearchMan.addSubDirectoryMatching(_gameDataDir, "resource"); if (_game.version == 7) { // This is for Full Throttle & The Dig - File::addDefaultDirectory(_gameDataDir.getChild("VIDEO")); - File::addDefaultDirectory(_gameDataDir.getChild("video")); - File::addDefaultDirectory(_gameDataDir.getChild("DATA")); - File::addDefaultDirectory(_gameDataDir.getChild("data")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "video"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "data"); } #endif diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 94216d8584..180537f4ec 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -56,19 +56,13 @@ SwordEngine::SwordEngine(OSystem *syst) _features = 0; // Add default file directories - Common::File::addDefaultDirectory(_gameDataDir.getChild("CLUSTERS")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("MUSIC")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("SPEECH")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("VIDEO")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("SMACKSHI")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("ENGLISH"));//PSX Demo - Common::File::addDefaultDirectory(_gameDataDir.getChild("ITALIAN"));//PSX Demo - Common::File::addDefaultDirectory(_gameDataDir.getChild("clusters")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("music")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("speech")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("video")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("smackshi")); - + SearchMan.addSubDirectoryMatching(_gameDataDir, "clusters"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "music"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "speech"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "video"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "smackshi"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "english");//PSX Demo + SearchMan.addSubDirectoryMatching(_gameDataDir, "italian");//PSX Demo } SwordEngine::~SwordEngine() { diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index e368f257a2..ec1bb4888c 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -257,14 +257,10 @@ namespace Sword2 { Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) { // Add default file directories - Common::File::addDefaultDirectory(_gameDataDir.getChild("CLUSTERS")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("SWORD2")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("VIDEO")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("SMACKS")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("clusters")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("sword2")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("video")); - Common::File::addDefaultDirectory(_gameDataDir.getChild("smacks")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "clusters"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "sword2"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "video"); + SearchMan.addSubDirectoryMatching(_gameDataDir, "smacks"); if (!scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2demo") || !scumm_stricmp(ConfMan.get("gameid").c_str(), "sword2psxdemo")) _features = GF_DEMO; diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 7586c5e749..a375e48a2b 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -844,7 +844,7 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); // Add DW2 subfolder to search path in case user is running directly from the CDs - Common::File::addDefaultDirectory(_gameDataDir.getChild("dw2")); + SearchMan.addSubDirectoryMatching(_gameDataDir, "dw2"); // Add subfolders needed for psx versions of Discworld 1 if (TinselV1PSX) |