Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game.cc19
-rw-r--r--src/game/game.h3
2 files changed, 17 insertions, 5 deletions
diff --git a/src/game/game.cc b/src/game/game.cc
index 0ac9acc..c6458d0 100644
--- a/src/game/game.cc
+++ b/src/game/game.cc
@@ -8,8 +8,11 @@
#include "ship.h"
#include "star.h"
+#include "common/console.h"
#include "common/file.h"
+#include "osirion.h"
+
namespace game {
using common::File;
@@ -23,10 +26,9 @@ bool initialized = false;
// FIXME win32
void init()
{
- // load the world
- star.location = Vector3f(256.0f, 0.0f, 256.0f);
- ship.location = Vector3f(0,0,0);
-
+ conmesg << "Project::OSiRiON " << OSIRION_VERSION << std::endl;
+ condebug << "Debug messages enabled" << std::endl;
+
// initialize game data locations
// TODO create game::homedir if it doesn't exist
File::datadir = "./data/";
@@ -36,9 +38,16 @@ void init()
// read game.ini
File f;
- f.open("game.ini");
+ f.open("ini/game.ini");
f.close();
+ // load the world
+ f.open("ini/world.ini");
+ f.close();
+
+ star.location = Vector3f(256.0f, 0.0f, 256.0f);
+ ship.location = Vector3f(0,0,0);
+
// all done, ready to run
initialized = true;
}
diff --git a/src/game/game.h b/src/game/game.h
index ed49135..b86e773 100644
--- a/src/game/game.h
+++ b/src/game/game.h
@@ -12,6 +12,9 @@
#include "common/console.h"
/// The game engine
+/*!
+ * The main game functions. The console should be initialized before calling these.
+ */
namespace game
{
/// initialize the game