diff options
author | Stijn Buys <ingar@osirion.org> | 2007-10-27 13:17:31 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2007-10-27 13:17:31 +0000 |
commit | babef2ec1d88b6057b0e17bf1c04dfa3c9d0d5a0 (patch) | |
tree | 89c9f65138b500198061954fcf918ca82a11a5ea /src/game | |
parent | 8a4aa60b830467d81f8029c194bec5b2e74ceb17 (diff) |
conditional -DDEBUG messages
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/game.cc | 19 | ||||
-rw-r--r-- | src/game/game.h | 3 |
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 |