Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-01-06 18:22:57 +0000
committerStijn Buys <ingar@osirion.org>2008-01-06 18:22:57 +0000
commit217eedd0464be37e75d7fdbcc0fbe492d92cf7be (patch)
tree7da4528cbac24475b3fa7c9701018d3e1322b779 /src/game
parenta71a525675826589aa7e5209118201acb54f5405 (diff)
obsolete
Diffstat (limited to 'src/game')
-rw-r--r--src/game/file.cc61
-rw-r--r--src/game/file.h30
2 files changed, 0 insertions, 91 deletions
diff --git a/src/game/file.cc b/src/game/file.cc
deleted file mode 100644
index b819416..0000000
--- a/src/game/file.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-/* file.cc
- This file is part of the Osirion project and is distributed under
- the terms of the GNU General Public License version 2
-*/
-
-// project headers
-#include "file.h"
-
-namespace game {
-
-void File::open(const char * filename, ios_base::openmode mode)
-{
- std::string fn;
-
- // if moddir is set, try the mods subdir first
- if (game::moddir.size() > 0) {
- // try game::homedir+game::moddir
- fn = homedir;
- fn.append(moddir);
- fn.append(filename);
- std::ifstream::open(fn.c_str(), mode);
- if (this->is_open()) {
- std::cerr << "game::File opened " << fn << std::endl;
- return;
- }
-
- // try datadir + moddir
- fn = game::datadir;
- fn.append(game::moddir);
- std::ifstream::open(fn.c_str(), mode);
- if (this->is_open()) {
- std::cerr << "game::File opened " << fn << std::endl;
- return;
- }
- }
-
- // try game::homedir+game::basedir
- fn = homedir;
- fn.append(basedir);
- fn.append(filename);
- std::ifstream::open(fn.c_str(), mode);
- if (this->is_open()) {
- std::cerr << "game::File opened " << fn << std::endl;
- return;
- }
-
- // try game::datadir+game::basedir
- fn = datadir;
- fn.append(basedir);
- fn.append(filename);
- std::ifstream::open(fn.c_str(), mode);
-
- // FIXME console
- if (!this->is_open()) {
- std::cerr << "game::File could not open " << filename << std::endl;
- } else {
- std::cerr << "game::File opened " << fn << std::endl;
- }
-}
-
-}
diff --git a/src/game/file.h b/src/game/file.h
deleted file mode 100644
index ebdff9e..0000000
--- a/src/game/file.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* file.h
- This file is part of the Osirion project and is distributed under
- the terms of the GNU General Public License version 2
-*/
-
-#ifndef __INCLUDED_FILE_H__
-#define __INCLUDED_FILE_H__
-
-// C++ headers
-#include <string>
-#include <fstream>
-
-// project headers
-#include "game.h"
-
-
-namespace game {
-
-/// a class to open data files
-class File : public std::ifstream
-{
-public:
- /// open the file for reading
- void open(const char * filename, std::ios_base::openmode mode = std::ios_base::in );
-
-}; // class File
-
-} // namesoace game
-
-#endif // __INCLUDED_GAME_H__