From f030154fe727e25a2afe1f78b3998c2d2dba95e4 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 18 Aug 2009 09:24:15 +0000 Subject: astyle cleanup, corrects not loading of material textures --- src/filesystem/filesystem.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/filesystem/filesystem.cc') 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(); -- cgit v1.2.3