/* server/main.cc This file is part of the Osirion project and is distributed under the terms and conditions of the GNU General Public License version 2 */ // C++ headers #include // project headers #include "osirion.h" #include "game/game.h" #include "timer.h" void quit(int status) { exit(status); } int main( int argc, char *argv[] ) { const float server_framerate = 1.0f / 20.0f; std::cout << "The Osirion project " << OSIRION_VERSION << std::endl; server::Timer timer; // initialize game game::init(); timer.mark(); while(game::initialized) { float elapsed = timer.elapsed(); game::update(elapsed); timer.sleep(server_framerate - elapsed); timer.mark(); } // shutdown game::shutdown(); quit(0); }