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/m4/m4.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'engines/m4/m4.cpp') diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp index f613064888..97b03c8582 100644 --- a/engines/m4/m4.cpp +++ b/engines/m4/m4.cpp @@ -52,6 +52,7 @@ #include "m4/mads_menus.h" #include "common/file.h" +#include "common/fs.h" #include "common/events.h" #include "common/EventRecorder.h" #include "common/endian.h" @@ -111,8 +112,10 @@ MadsM4Engine::MadsM4Engine(OSystem *syst, const M4GameDescription *gameDesc) : _vm = this; _madsVm = NULL; - SearchMan.addSubDirectoryMatching(_gameDataDir, "goodstuf"); - SearchMan.addSubDirectoryMatching(_gameDataDir, "resource"); + const Common::FSNode gameDataDir(ConfMan.get("path")); + + SearchMan.addSubDirectoryMatching(gameDataDir, "goodstuf"); + SearchMan.addSubDirectoryMatching(gameDataDir, "resource"); DebugMan.addDebugChannel(kDebugScript, "script", "Script debug level"); DebugMan.addDebugChannel(kDebugGraphics, "graphics", "Graphics debug level"); -- cgit v1.2.3