aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorrichiesams2013-08-11 15:08:22 -0500
committerrichiesams2013-08-11 15:08:22 -0500
commitdd77956819091d4a8d3578375fc66a02f4e8283b (patch)
tree71189ab79761f1f6f1894d7207faa38963673f10 /engines
parentca7680599534aec4f89a65bb5a087e3372488896 (diff)
downloadscummvm-rg350-dd77956819091d4a8d3578375fc66a02f4e8283b.tar.gz
scummvm-rg350-dd77956819091d4a8d3578375fc66a02f4e8283b.tar.bz2
scummvm-rg350-dd77956819091d4a8d3578375fc66a02f4e8283b.zip
ZVISION: Move SearchMan directory registration outside ZVision constructor
The launcher can do some extra changes within SearchMan after engine constructor. This makes sure everything is set before registering more directories
Diffstat (limited to 'engines')
-rw-r--r--engines/zvision/zvision.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/engines/zvision/zvision.cpp b/engines/zvision/zvision.cpp
index 0dd62d7a29..72441eb8ad 100644
--- a/engines/zvision/zvision.cpp
+++ b/engines/zvision/zvision.cpp
@@ -60,17 +60,6 @@ ZVision::ZVision(OSystem *syst, const ZVisionGameDescription *gameDesc)
// Do not initialize graphics here
- // However this is the place to specify all default directories
- const Common::FSNode gameDataDir(ConfMan.get("path"));
- // TODO: There are 10 file clashes when we flatten the directories. From a quick look, the files are exactly the same, so it shouldn't matter. But I'm noting it here just in-case it does become a problem.
- SearchMan.addSubDirectoryMatching(gameDataDir, "data1", 0, 4, true);
- SearchMan.addSubDirectoryMatching(gameDataDir, "data2", 0, 4, true);
- SearchMan.addSubDirectoryMatching(gameDataDir, "data3", 0, 4, true);
- SearchMan.addSubDirectoryMatching(gameDataDir, "zassets1", 0, 2, true);
- SearchMan.addSubDirectoryMatching(gameDataDir, "zassets2", 0, 2, true);
- SearchMan.addSubDirectoryMatching(gameDataDir, "znemmx", 0, 1, true);
- SearchMan.addSubDirectoryMatching(gameDataDir, "zgi", 0, 4, true);
-
// Here is the right place to set up the engine specific debug channels
//DebugMan.addDebugChannel(kZVisionDebugExample, "example", "this is just an example for a engine specific debug channel");
//DebugMan.addDebugChannel(kZVisionDebugExample2, "example2", "also an example");
@@ -101,6 +90,16 @@ ZVision::~ZVision() {
}
void ZVision::initialize() {
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ // TODO: There are 10 file clashes when we flatten the directories. From a quick look, the files are exactly the same, so it shouldn't matter. But I'm noting it here just in-case it does become a problem.
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data1", 0, 4, true);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data2", 0, 4, true);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data3", 0, 4, true);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "zassets1", 0, 2, true);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "zassets2", 0, 2, true);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "znemmx", 0, 1, true);
+ SearchMan.addSubDirectoryMatching(gameDataDir, "zgi", 0, 4, true);
+
// Find zfs archive files
Common::ArchiveMemberList list;
SearchMan.listMatchingMembers(list, "*.zfs");