diff options
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/tinsel.cpp | 19 | ||||
-rw-r--r-- | engines/tinsel/tinsel.h | 1 |
2 files changed, 12 insertions, 8 deletions
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 5d410e62c7..5ba3c5e80a 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -835,14 +835,6 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) // Setup mixer syncSoundSettings(); - // Add DW2 subfolder to search path in case user is running directly from the CDs - 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); - const GameSettings *g; const char *gameid = ConfMan.get("gameid").c_str(); @@ -892,6 +884,17 @@ Common::String TinselEngine::getSavegameFilename(int16 saveNum) const { return Common::String::format("%s.%03d", getTargetName().c_str(), saveNum); } +void TinselEngine::initializePath(const Common::FSNode &gamePath) { + if (TinselV1PSX) { + // Add subfolders needed for psx versions of Discworld 1 + SearchMan.addDirectory(gamePath.getPath(), gamePath, 0, 3, true); + } else { + // Add DW2 subfolder to search path in case user is running directly from the CDs + SearchMan.addSubDirectoryMatching(gamePath, "dw2"); + Engine::initializePath(gamePath); + } +} + Common::Error TinselEngine::run() { // Initialize backend if (getGameID() == GID_DW2) { diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index d26153245d..efa9355dd5 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -161,6 +161,7 @@ class TinselEngine : public Engine { protected: // Engine APIs + virtual void initializePath(const Common::FSNode &gamePath); virtual Common::Error run(); virtual bool hasFeature(EngineFeature f) const; Common::Error loadGameState(int slot); |