From 731dfb8f3ca9c34e4160021cb221c3056c00dbf9 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 8 Nov 2008 14:33:14 +0000 Subject: finalized renaming from server namespace to dedicated --- src/dedicated/dedicated.cc | 45 +++++++++++---------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) (limited to 'src/dedicated/dedicated.cc') 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); } -- cgit v1.2.3