diff options
Diffstat (limited to 'src/filesystem/filesystem.cc')
-rw-r--r-- | src/filesystem/filesystem.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/filesystem/filesystem.cc b/src/filesystem/filesystem.cc index 9c00930..5ae4da7 100644 --- a/src/filesystem/filesystem.cc +++ b/src/filesystem/filesystem.cc @@ -15,6 +15,21 @@ std::string filesystem::moddir = ""; void filesystem::init() { con_debug << "Initializing filesystem..." << std::endl; + + // FIXME datadir should by set by ./configure and read from config.h + + // initialize game data locations + datadir = "./data/"; + basedir = "base/"; + moddir = ""; + + // FIXME win32 + homedir = getenv("HOME"); + homedir = homedir + "/.osirion/"; + Path::create(homedir); + Path::create(homedir+basedir); + if (moddir.size() && !Path::exists(homedir+moddir)) + Path::create(homedir+moddir); } void filesystem::shutdown() { |