diff options
author | Stijn Buys <ingar@osirion.org> | 2008-01-31 18:22:44 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-01-31 18:22:44 +0000 |
commit | f794b9ee52293cefd6ac73fdf0d2a01c5388f057 (patch) | |
tree | 2838d7ee11ae49e2e519ad604ba41f7071fb8288 /src/filesystem/filesystem.cc | |
parent | 1ddff2045848da5136e9e8131e335ac7626b8f68 (diff) |
modular system works now
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() { |