Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/application.cc')
-rw-r--r--src/server/application.cc66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/server/application.cc b/src/server/application.cc
deleted file mode 100644
index 8ea0808..0000000
--- a/src/server/application.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- server/application.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
-*/
-
-// project headers
-#include "server/server.h"
-#include "server/application.h"
-#include "server/timer.h"
-#include "core/core.h"
-#include "game/game.h"
-
-namespace server {
-
-void Application::init()
-{
- // FIXME core should be able to load game.so
- // force initialization of the game object
- server::game = new game::Game();
-
- con_print << "Initializing server..." << std::endl;
-
- // initialize core
- core::ApplicationInterface::init();
-
- // connect to the game module
- core::ApplicationInterface::connect();
-}
-
-void Application::run()
-{
- const float server_framerate = 1.0f / 20.0f;
- server::Timer timer;
-
- timer.mark();
-
- while(true) {
- float elapsed = timer.elapsed();
-
- frame(elapsed);
-
- sys::sleep(server_framerate - elapsed);
- timer.mark();
- }
-
-}
-
-void Application::shutdown()
-{
- con_debug << "Shutting down server..." << std::endl;
-
- core::ApplicationInterface::shutdown();
-
- quit(0);
-}
-
-void Application::quit(int status)
-{
- // FIXME core should be able to unload game.so
- delete server::game;
-
- core::ApplicationInterface::quit(status);
-}
-
-}