From 5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 4 May 2010 11:56:52 +0000 Subject: Get rid of Engine::_gameDataDir. This greatly reduces indirect dependencies on several header files from common. svn-id: r48933 --- engines/agos/agos.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 38112bc14a..61e4351967 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -24,10 +24,11 @@ */ #include "common/config-manager.h" +#include "common/EventRecorder.h" +#include "common/events.h" #include "common/file.h" +#include "common/fs.h" #include "common/system.h" -#include "common/events.h" -#include "common/EventRecorder.h" #include "agos/debugger.h" #include "agos/intern.h" @@ -514,20 +515,22 @@ AGOSEngine::AGOSEngine(OSystem *syst) "\x5\x5\x4\x6\x5\x3\x4\x5\x6\x3\x5\x5\x4\x6\x5\x3\x4\x6\x5\x6\x6\x6\x5\x5\x5\x6\x5\x6\x6\x6\x6\x6", 32); + const Common::FSNode gameDataDir(ConfMan.get("path")); + // Add default file directories for Acorn version of // Simon the Sorcerer 1 - SearchMan.addSubDirectoryMatching(_gameDataDir, "execute"); + SearchMan.addSubDirectoryMatching(gameDataDir, "execute"); // Add default file directories for Amiga/Macintosh // verisons of Simon the Sorcerer 2 - SearchMan.addSubDirectoryMatching(_gameDataDir, "voices"); + SearchMan.addSubDirectoryMatching(gameDataDir, "voices"); // Add default file directories for Amiga & Macintosh // versions of The Feeble Files - SearchMan.addSubDirectoryMatching(_gameDataDir, "gfx"); - SearchMan.addSubDirectoryMatching(_gameDataDir, "movies"); - SearchMan.addSubDirectoryMatching(_gameDataDir, "sfx"); - SearchMan.addSubDirectoryMatching(_gameDataDir, "speech"); + SearchMan.addSubDirectoryMatching(gameDataDir, "gfx"); + SearchMan.addSubDirectoryMatching(gameDataDir, "movies"); + SearchMan.addSubDirectoryMatching(gameDataDir, "sfx"); + SearchMan.addSubDirectoryMatching(gameDataDir, "speech"); g_eventRec.registerRandomSource(_rnd, "agos"); } -- cgit v1.2.3