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>2007-10-21 15:18:50 +0000
committerStijn Buys <ingar@osirion.org>2007-10-21 15:18:50 +0000
commit97cbb7514135ec81803e746f0b549e9f95abbecc (patch)
tree6d61b17ed1485a5488522dd41011a4225cde18b0 /src/game/game.cc
parent783545505aa51e4f908932fffb1f8362ad898d44 (diff)
added basic file loader
Diffstat (limited to 'src/game/game.cc')
-rw-r--r--src/game/game.cc27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/game/game.cc b/src/game/game.cc
index dfa5fe5..e34a7b8 100644
--- a/src/game/game.cc
+++ b/src/game/game.cc
@@ -1,10 +1,13 @@
-/* game.cc
- This file is part of the Osirion project
+/* game.h
+ 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 "ship.h"
#include "star.h"
+#include "file.h"
namespace game {
@@ -12,10 +15,28 @@ Ship ship;
Star star;
bool initialized = false;
+// TODO datadir should by set by ./configure and read from config.h
+// FIXME win32
+std::string datadir("./data/");
+std::string homedir("~/.osirion/");
+std::string basedir("base/");
+std::string moddir;
+
void init()
{
+ // load the world
star.location = Vector3f(256.0f, 0.0f, 256.0f);
- initialized = true;
+ ship.location = Vector3f(0,0,0);
+
+ // TODO create game::homedir if it doesn't exist
+
+ // read game.ini
+ File f;
+ f.open("game.ini");
+ f.close();
+
+ // all done, ready to run
+ initialized = true;
}
void shutdown()