From dd77956819091d4a8d3578375fc66a02f4e8283b Mon Sep 17 00:00:00 2001 From: richiesams Date: Sun, 11 Aug 2013 15:08:22 -0500 Subject: 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 --- engines/zvision/zvision.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'engines/zvision') 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"); -- cgit v1.2.3