Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-11-08 14:33:14 +0000
committerStijn Buys <ingar@osirion.org>2008-11-08 14:33:14 +0000
commit731dfb8f3ca9c34e4160021cb221c3056c00dbf9 (patch)
treecb8214aa1a8990dbb4b0e1ef4688eea030c76a52 /src/dedicated/dedicated.cc
parent1317b6c1a231f5ccaf4ce11814863c77f93d8921 (diff)
finalized renaming from server namespace to dedicated
Diffstat (limited to 'src/dedicated/dedicated.cc')
-rw-r--r--src/dedicated/dedicated.cc45
1 files changed, 11 insertions, 34 deletions
diff --git a/src/dedicated/dedicated.cc b/src/dedicated/dedicated.cc
index a4424a0..387fcbe 100644
--- a/src/dedicated/dedicated.cc
+++ b/src/dedicated/dedicated.cc
@@ -1,5 +1,5 @@
/*
- server/server.cc
+ dedicated/dedicated.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
*/
@@ -10,36 +10,12 @@
#include "core/core.h"
#include "core/stats.h"
#include "core/timer.h"
-#include "server/console.h"
-#include "server/server.h"
+#include "dedicated/console.h"
+#include "dedicated/dedicated.h"
-namespace server {
+namespace dedicated {
-//--- private definition ------------------------------------------
-
-/// server Application implementation
-class Server : public core::Application {
-public:
- /// initialize the server Application
- virtual void init(int count, char **arguments);
-
- /// run the server Application
- virtual void run();
-
- /// shutdown the server Application
- virtual void shutdown();
-
- /// quit the server Application
- virtual void quit(int status);
-};
-
-
-Server app;
-
-//--- public ------------------------------------------------------
-
-/// the server main loop
-void main(int count, char **arguments)
+void run(int count, char **arguments)
{
std::cout << core::name() << " " << core::version() << std::endl;
@@ -47,14 +23,15 @@ void main(int count, char **arguments)
std::cout << arguments[i] << " ";
std::cout << std::endl;
+ Dedicated app;
app.init(count, arguments);
app.run();
app.shutdown();
}
-//--- private -----------------------------------------------------
+/* ---- class Dedicated -------------------------------------------- */
-void Server::init(int count, char **arguments)
+void Dedicated::init(int count, char **arguments)
{
con_print << "^BInitializing server..." << std::endl;
@@ -71,7 +48,7 @@ void Server::init(int count, char **arguments)
core::Application::connect(empty);
}
-void Server::run()
+void Dedicated::run()
{
float server_framerate = 1.0f / 25.0f;
@@ -89,7 +66,7 @@ void Server::run()
}
}
-void Server::shutdown()
+void Dedicated::shutdown()
{
con_print << "^BShutting down server..." << std::endl;
@@ -114,7 +91,7 @@ void Server::shutdown()
quit(0);
}
-void Server::quit(int status)
+void Dedicated::quit(int status)
{
core::Application::quit(status);
}