Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-18 09:24:15 +0000
commitf030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch)
treecd92baf9e4fa8a136523b9eb570e9811846c9250 /src/filesystem/filesystem.cc
parent5636fad174f0bcff857c357c394c4cc8d424b302 (diff)
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/filesystem/filesystem.cc')
-rw-r--r--src/filesystem/filesystem.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/filesystem/filesystem.cc b/src/filesystem/filesystem.cc
index d268ccc..4ea715c 100644
--- a/src/filesystem/filesystem.cc
+++ b/src/filesystem/filesystem.cc
@@ -20,7 +20,7 @@
#include "filesystem/file.h"
#include "sys/sys.h"
-namespace filesystem
+namespace filesystem
{
SearchPath filesystem_searchpath;
@@ -56,17 +56,17 @@ void init(const std::string &binaryname, const std::string & basename, const std
filesystem_basename.assign("base");
filesystem_modname.assign(modname);
-
+
#ifndef _WIN32
// UNIX home directory is $HOME/.osirion
filesystem_homedir.assign(getenv("HOME"));
filesystem_homedir.append("/.osirion");
-
+
// create homedir if necessary
if (!sys::directory_exists(filesystem_homedir))
- sys::mkdir(filesystem_homedir);
+ sys::mkdir(filesystem_homedir);
filesystem_homedir += '/';
-
+
#else
// windows home directory is My Documents\My Games\Osirion
char mydocuments[512];
@@ -84,10 +84,10 @@ void init(const std::string &binaryname, const std::string & basename, const std
if (!sys::directory_exists(filesystem_homedir))
sys::mkdir(filesystem_homedir);
filesystem_homedir.append("\\");
-
+
} else {
con_warn << "using fallback home directory" << std::endl;
-
+
filesystem_homedir.assign("home");
if (!sys::directory_exists(filesystem_homedir))
sys::mkdir(filesystem_homedir);
@@ -111,15 +111,15 @@ void init(const std::string &binaryname, const std::string & basename, const std
// the data dir set by the configure script
std::string package_datadir(PACKAGE_DATADIR);
std::string dir;
-
+
// set writedir depending on modname and add home paths to the searchpath
filesystem_writedir.assign(filesystem_homedir);
if (filesystem_modname.size()) {
// append modname to writedir
- filesystem_writedir.append(filesystem_modname);
+ filesystem_writedir.append(filesystem_modname);
} else {
// append basename to writedir
- filesystem_writedir.append(filesystem_basename);
+ filesystem_writedir.append(filesystem_basename);
}
// create writedir if necessary
@@ -181,7 +181,7 @@ void init(const std::string &binaryname, const std::string & basename, const std
for (SearchPath::iterator path = filesystem_searchpath.begin(); path != filesystem_searchpath.end(); ++path) {
#ifdef _WIN32
for (size_t i = 0; i < (*path).size(); i++)
- if ((*path)[i] == '/') (*path)[i] = '\\';
+ if ((*path)[i] == '/')(*path)[i] = '\\';
#endif
con_print << " directory " << (*path) << std::endl;
}
@@ -203,7 +203,7 @@ void shutdown()
filesystem_writedir.clear();
}
-File *open(const char *filename)
+File *open(const char *filename)
{
// for now, File is always a DiskFile
DiskFile *f = new DiskFile();