/* game/game.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 "ship.h" #include "star.h" #include "common/console.h" #include "common/file.h" #include "osirion.h" namespace game { using common::File; using common::Vector3f; Ship ship; Star star; bool initialized = false; // TODO datadir should by set by ./configure and read from config.h // FIXME win32 void init() { 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/"; File::homedir = "~/.osirion/"; File::basedir = "base/"; File::moddir = ""; // read game.ini File f; 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; } void shutdown() { initialized = false; } void update(float elapsed) { ship.update(elapsed); } }; // namespace game