aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-05-04 11:56:52 +0000
committerMax Horn2010-05-04 11:56:52 +0000
commit5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3 (patch)
treee16103eabfe926312a01e0d3a18efc1fd7f6a5d9
parentc5f94872a7c4a1082f7c401c4e90f9bd3bf0290e (diff)
downloadscummvm-rg350-5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3.tar.gz
scummvm-rg350-5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3.tar.bz2
scummvm-rg350-5568a8473b975dc2e7e0d1f1ae075ebd6d96f2f3.zip
Get rid of Engine::_gameDataDir.
This greatly reduces indirect dependencies on several header files from common. svn-id: r48933
-rw-r--r--engines/agi/loader_v3.cpp2
-rw-r--r--engines/agi/sound.cpp1
-rw-r--r--engines/agos/agos.cpp19
-rw-r--r--engines/draci/draci.cpp3
-rw-r--r--engines/engine.cpp7
-rw-r--r--engines/engine.h4
-rw-r--r--engines/groovie/groovie.cpp7
-rw-r--r--engines/m4/m4.cpp7
-rw-r--r--engines/mohawk/mohawk.h4
-rw-r--r--engines/mohawk/myst.cpp6
-rw-r--r--engines/mohawk/riven.cpp12
-rw-r--r--engines/mohawk/riven_scripts.h1
-rw-r--r--engines/saga/saga.cpp21
-rw-r--r--engines/sci/resource.h1
-rw-r--r--engines/sci/sci.cpp18
-rw-r--r--engines/sci/sci.h2
-rw-r--r--engines/scumm/resource.cpp2
-rw-r--r--engines/scumm/scumm.cpp18
-rw-r--r--engines/sword1/sword1.cpp15
-rw-r--r--engines/sword2/sword2.cpp9
-rw-r--r--engines/teenagent/inventory.cpp1
-rw-r--r--engines/teenagent/scene.cpp2
-rw-r--r--engines/tinsel/tinsel.cpp6
23 files changed, 99 insertions, 69 deletions
diff --git a/engines/agi/loader_v3.cpp b/engines/agi/loader_v3.cpp
index 3aea4656b2..cd97c44521 100644
--- a/engines/agi/loader_v3.cpp
+++ b/engines/agi/loader_v3.cpp
@@ -27,7 +27,7 @@
#include "agi/lzw.h"
#include "common/config-manager.h"
-//#include "common/fs.h"
+#include "common/fs.h"
namespace Agi {
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index f46c6dae17..ca5d42d981 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -25,6 +25,7 @@
#include "common/md5.h"
#include "common/config-manager.h"
+#include "common/fs.h"
#include "common/random.h"
#include "common/str-array.h"
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");
}
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 40659589b6..ba9e30ba1d 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -79,7 +79,8 @@ DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
// Do not initialize graphics here
// However this is the place to specify all default directories
- //SearchMan.addSubDirectoryMatching(_gameDataDir, "sound");
+ //const Common::FSNode gameDataDir(ConfMan.get("path"));
+ //SearchMan.addSubDirectoryMatching(gameDataDir, "sound");
// Here is the right place to set up the engine specific debug levels
DebugMan.addDebugChannel(kDraciGeneralDebugLevel, "general", "Draci general debug info");
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 34d6ab504a..a1bf09eed3 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -90,7 +90,6 @@ Engine::Engine(OSystem *syst)
_eventMan(_system->getEventManager()),
_saveFileMan(_system->getSavefileManager()),
_targetName(ConfMan.getActiveDomainName()),
- _gameDataDir(ConfMan.get("path")),
_pauseLevel(0),
_mainMenuDialog(NULL) {
@@ -320,12 +319,14 @@ void Engine::checkCD() {
char buffer[MAXPATHLEN];
int i;
- if (_gameDataDir.getPath().empty()) {
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
+ if (gameDataDir.getPath().empty()) {
// That's it! I give up!
if (getcwd(buffer, MAXPATHLEN) == NULL)
return;
} else
- strncpy(buffer, _gameDataDir.getPath().c_str(), MAXPATHLEN);
+ strncpy(buffer, gameDataDir.getPath().c_str(), MAXPATHLEN);
for (i = 0; i < MAXPATHLEN - 1; i++) {
if (buffer[i] == '\\')
diff --git a/engines/engine.h b/engines/engine.h
index 75ab00d6c2..fc05a0bed4 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -27,8 +27,8 @@
#include "common/scummsys.h"
#include "common/error.h"
-#include "common/fs.h"
#include "common/str.h"
+#include "common/list.h"
#include "graphics/pixelformat.h"
class OSystem;
@@ -89,8 +89,6 @@ protected:
const Common::String _targetName; // target name for saves
- const Common::FSNode _gameDataDir; // FIXME: Get rid of this
-
private:
/**
* The pause level, 0 means 'running', a positive value indicates
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 35aa4721e7..0beccbd6c1 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -41,9 +41,10 @@ GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) :
_graphicsMan(NULL), _waitingForInput(false) {
// Adding the default directories
- SearchMan.addSubDirectoryMatching(_gameDataDir, "groovie");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "media");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "system");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "groovie");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "media");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "system");
// Initialize the custom debug levels
DebugMan.addDebugChannel(kGroovieDebugAll, "All", "Debug everything");
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");
diff --git a/engines/mohawk/mohawk.h b/engines/mohawk/mohawk.h
index f5ad730d81..e4d26d16f7 100644
--- a/engines/mohawk/mohawk.h
+++ b/engines/mohawk/mohawk.h
@@ -33,6 +33,10 @@
class OSystem;
+namespace Common {
+ class SeekableReadStream;
+}
+
namespace Mohawk {
enum MohawkGameType {
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index 849440774b..ab55552ef4 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -74,8 +74,10 @@ MohawkEngine_Myst::MohawkEngine_Myst(OSystem *syst, const MohawkGameDescription
_scriptParser->disableInitOpcodes();
- if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh)
- SearchMan.addSubDirectoryMatching(_gameDataDir, "CD Data");
+ if ((getFeatures() & GF_ME) && getPlatform() == Common::kPlatformMacintosh) {
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "CD Data");
+ }
}
MohawkEngine_Myst::~MohawkEngine_Myst() {
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 805ba52f8a..0412144034 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -49,12 +49,14 @@ MohawkEngine_Riven::MohawkEngine_Riven(OSystem *syst, const MohawkGameDescriptio
_activatedSLST = false;
_extrasFile = NULL;
- // Attempt to let game run from the CD's
+ // Attempt to let game run from the CDs
// NOTE: assets2 contains higher quality audio than assets1
- SearchMan.addSubDirectoryMatching(_gameDataDir, "all");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "data");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "exe");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "assets2");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
+ SearchMan.addSubDirectoryMatching(gameDataDir, "all");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "exe");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "assets2");
g_atrusJournalRectSolo = new Common::Rect(295, 402, 313, 426);
g_atrusJournalRect = new Common::Rect(222, 402, 240, 426);
diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h
index f61abee36b..a1512af697 100644
--- a/engines/mohawk/riven_scripts.h
+++ b/engines/mohawk/riven_scripts.h
@@ -27,6 +27,7 @@
#define RIVEN_SCRIPTS_H
#include "common/str-array.h"
+#include "common/ptr.h"
class MohawkEngine_Riven;
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index f67194b2f0..8ccc6d96e5 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -23,9 +23,8 @@
*
*/
-
-
#include "common/file.h"
+#include "common/fs.h"
#include "common/config-manager.h"
#include "common/system.h"
#include "common/events.h"
@@ -112,28 +111,30 @@ SagaEngine::SagaEngine(OSystem *syst, const SAGAGameDescription *gameDesc)
_frameCount = 0;
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
// The Linux version of Inherit the Earth puts all data files in an
// 'itedata' sub-directory, except for voices.rsc
- SearchMan.addSubDirectoryMatching(_gameDataDir, "itedata");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "itedata");
// The Windows version of Inherit the Earth puts various data files in
// other subdirectories.
- SearchMan.addSubDirectoryMatching(_gameDataDir, "graphics");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "music");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "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
- SearchMan.addSubDirectoryMatching(_gameDataDir, "game/itedata");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "game/itedata");
// Mac CD Wyrmkeep
- SearchMan.addSubDirectoryMatching(_gameDataDir, "patch");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "patch");
// Dinotopia
- SearchMan.addSubDirectoryMatching(_gameDataDir, "smack");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "smack");
// FTA2
- SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "video");
_displayClip.left = _displayClip.top = 0;
g_eventRec.registerRandomSource(_rnd, "saga");
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index b9825011e5..64e3cb4a12 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -27,6 +27,7 @@
#define SCI_SCICORE_RESOURCE_H
#include "common/str.h"
+#include "common/fs.h"
#include "sci/graphics/helpers.h" // for ViewType
#include "sci/decompressor.h"
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index 87f156bc67..a730688c3c 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -96,18 +96,20 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc)
_gamestate = 0;
- SearchMan.addSubDirectoryMatching(_gameDataDir, "actors"); // KQ6 hi-res portraits
- SearchMan.addSubDirectoryMatching(_gameDataDir, "aud"); // resource.aud and audio files
- SearchMan.addSubDirectoryMatching(_gameDataDir, "avi"); // AVI movie files for Windows versions
- SearchMan.addSubDirectoryMatching(_gameDataDir, "seq"); // SEQ movie files for DOS versions
- SearchMan.addSubDirectoryMatching(_gameDataDir, "wav"); // speech files in WAV format
- SearchMan.addSubDirectoryMatching(_gameDataDir, "sfx"); // music/sound files in WAV format
- SearchMan.addSubDirectoryMatching(_gameDataDir, "robot"); // robot files
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
+ SearchMan.addSubDirectoryMatching(gameDataDir, "actors"); // KQ6 hi-res portraits
+ SearchMan.addSubDirectoryMatching(gameDataDir, "aud"); // resource.aud and audio files
+ SearchMan.addSubDirectoryMatching(gameDataDir, "avi"); // AVI movie files for Windows versions
+ SearchMan.addSubDirectoryMatching(gameDataDir, "seq"); // SEQ movie files for DOS versions
+ SearchMan.addSubDirectoryMatching(gameDataDir, "wav"); // speech files in WAV format
+ SearchMan.addSubDirectoryMatching(gameDataDir, "sfx"); // music/sound files in WAV format
+ SearchMan.addSubDirectoryMatching(gameDataDir, "robot"); // robot files
// Add the patches directory, except for KQ6CD; The patches folder in some versions of KQ6CD
// is for the demo of Phantasmagoria, included in the disk
if (strcmp(getGameID(), "kq6"))
- SearchMan.addSubDirectoryMatching(_gameDataDir, "patches"); // resource patches
+ SearchMan.addSubDirectoryMatching(gameDataDir, "patches"); // resource patches
}
SciEngine::~SciEngine() {
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index b208824357..fdd10bcd04 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -27,7 +27,7 @@
#define SCI_H
#include "engines/engine.h"
-//#include "engines/advancedDetector.h"
+#include "common/util.h"
struct ADGameDescription;
diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp
index f93df88c6a..301ad2be20 100644
--- a/engines/scumm/resource.cpp
+++ b/engines/scumm/resource.cpp
@@ -226,7 +226,7 @@ void ScummEngine::askForDisk(const char *filename, int disknum) {
#ifdef MACOSX
sprintf(buf, "Cannot find file: '%s'\nPlease insert disc %d.\nPress OK to retry, Quit to exit", filename, disknum);
#else
- sprintf(buf, "Cannot find file: '%s'\nInsert disc %d into drive %s\nPress OK to retry, Quit to exit", filename, disknum, _gameDataDir.getPath().c_str());
+ sprintf(buf, "Cannot find file: '%s'\nInsert disc %d into drive %s\nPress OK to retry, Quit to exit", filename, disknum, ConfMan.get("path").c_str());
#endif
result = displayMessage("Quit", "%s", buf);
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index d858b6c1e5..29154b8738 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -933,22 +933,24 @@ ScummEngine_v8::~ScummEngine_v8() {
Common::Error ScummEngine::init() {
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+
// 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
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms");
}
if ((_game.platform == Common::kPlatformMacintosh) && (_game.version == 3)) {
// This is for the Mac version of Indy3/Loom
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 1");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 2");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "rooms 3");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 1");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 2");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "rooms 3");
}
#ifdef ENABLE_SCUMM_7_8
#ifdef MACOSX
- if (_game.version == 8 && !memcmp(_gameDataDir.getPath().c_str(), "/Volumes/MONKEY3_", 17)) {
+ if (_game.version == 8 && !memcmp(gameDataDir.getPath().c_str(), "/Volumes/MONKEY3_", 17)) {
// Special case for COMI on Mac OS X. The mount points on OS X depend
// on the volume name. Hence if playing from CD, we'd get a problem.
// So if loading of a resource file fails, we fall back to the (fixed)
@@ -963,12 +965,12 @@ Common::Error ScummEngine::init() {
#endif
if (_game.version == 8)
// This is for COMI
- SearchMan.addSubDirectoryMatching(_gameDataDir, "resource");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "resource");
if (_game.version == 7) {
// This is for Full Throttle & The Dig
- SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "data");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "video");
+ SearchMan.addSubDirectoryMatching(gameDataDir, "data");
}
#endif
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 45ad91d6ea..2b3a4042fc 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -56,13 +56,14 @@ SwordEngine::SwordEngine(OSystem *syst)
_features = 0;
// Add default file directories
- 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
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ 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 da34783ec8..7d3a345d3c 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -257,10 +257,11 @@ namespace Sword2 {
Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) {
// Add default file directories
- SearchMan.addSubDirectoryMatching(_gameDataDir, "clusters");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "sword2");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "video");
- SearchMan.addSubDirectoryMatching(_gameDataDir, "smacks");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ 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/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp
index 5a08883a53..47267dabf0 100644
--- a/engines/teenagent/inventory.cpp
+++ b/engines/teenagent/inventory.cpp
@@ -23,6 +23,7 @@
*/
#include "common/stream.h"
+#include "common/ptr.h"
#include "teenagent/inventory.h"
#include "teenagent/resources.h"
diff --git a/engines/teenagent/scene.cpp b/engines/teenagent/scene.cpp
index 296ab576f4..25054e54fc 100644
--- a/engines/teenagent/scene.cpp
+++ b/engines/teenagent/scene.cpp
@@ -25,6 +25,8 @@
#include "common/config-manager.h"
#include "common/debug.h"
#include "common/algorithm.h"
+#include "common/ptr.h"
+
#include "teenagent/scene.h"
#include "teenagent/resources.h"
#include "teenagent/surface.h"
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 31cf3defdb..aed6aae097 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -29,6 +29,7 @@
#include "common/EventRecorder.h"
#include "common/keyboard.h"
#include "common/file.h"
+#include "common/fs.h"
#include "common/savefile.h"
#include "common/config-manager.h"
#include "common/serializer.h"
@@ -834,11 +835,12 @@ 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
- SearchMan.addSubDirectoryMatching(_gameDataDir, "dw2");
+ const Common::FSNode gameDataDir(ConfMan.get("path"));
+ SearchMan.addSubDirectoryMatching(gameDataDir, "dw2");
// Add subfolders needed for psx versions of Discworld 1
if (TinselV1PSX)
- SearchMan.addDirectory(_gameDataDir.getPath(), _gameDataDir, 0, 3, true);
+ SearchMan.addDirectory(gameDataDir.getPath(), gameDataDir, 0, 3, true);
const GameSettings *g;