aboutsummaryrefslogtreecommitdiff
path: root/engines/engine.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2014-01-22 18:07:06 +0100
committerJohannes Schickel2014-01-22 18:07:06 +0100
commit651e2808018d7ca8f36d05cda49e53229b0fd7dd (patch)
tree552bbd50ca89ebe11ef99f7e9f535c09d7e5e8d4 /engines/engine.cpp
parent1fa74e355cd95c0daec2c8fa0981668aa6446a8b (diff)
downloadscummvm-rg350-651e2808018d7ca8f36d05cda49e53229b0fd7dd.tar.gz
scummvm-rg350-651e2808018d7ca8f36d05cda49e53229b0fd7dd.tar.bz2
scummvm-rg350-651e2808018d7ca8f36d05cda49e53229b0fd7dd.zip
ENGINES: Introduce method Engine::initializePath which sets up SearchMan.
This replaces the hardcoded addition of the game path in runGame in base/main.cpp by an engine configurable one.
Diffstat (limited to 'engines/engine.cpp')
-rw-r--r--engines/engine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 52020c772e..8326a1fe89 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -154,6 +154,10 @@ Engine::~Engine() {
CursorMan.popCursorPalette();
}
+void Engine::initializePath(const Common::FSNode &gamePath) {
+ SearchMan.addDirectory(gamePath.getPath(), gamePath, 0, 4);
+}
+
void initCommonGFX(bool defaultTo1XScaler) {
const Common::ConfigManager::Domain *transientDomain = ConfMan.getDomain(Common::ConfigManager::kTransientDomain);
const Common::ConfigManager::Domain *gameDomain = ConfMan.getActiveDomain();