From 583ec3285c41e9d253c4aaabd2af4dadac75f3a7 Mon Sep 17 00:00:00 2001
From: Stijn Buys <ingar@osirion.org>
Date: Sun, 23 Nov 2008 12:34:07 +0000
Subject: clean module consturction/destruction

---
 src/game/base/game.cc | 16 +++++++---------
 src/game/base/game.h  | 10 +++-------
 2 files changed, 10 insertions(+), 16 deletions(-)

(limited to 'src/game/base')

diff --git a/src/game/base/game.cc b/src/game/base/game.cc
index 7dcf300..cb3bcf0 100644
--- a/src/game/base/game.cc
+++ b/src/game/base/game.cc
@@ -40,6 +40,11 @@ core::Cvar *Game::g_devel = 0;
 core::Zone *Game::default_zone = 0;
 ShipModel  *Game::default_shipmodel = 0;
 
+core::Module *factory()
+{
+	return new Game();
+}
+
 // list the ship model registry
 void Game::func_list_ship(std::string const &args)
 {
@@ -256,18 +261,11 @@ void Game::func_goto(core::Player *player, const std::string &args)
 
 /* -- class Game -------------------------------------------------- */
 
-Game::Game() : core::Module("base", "Project::OSiRiON", true)
+Game::Game() : core::Module("Project::OSiRiON", true)
 {
 	default_shipmodel = 0;
 	default_zone = 0;
-}
-
-Game::~Game()
-{
-}
 
-void Game::init()
-{
 	ShipModel::clear();
 
 	if (!load_ships()) {
@@ -330,7 +328,7 @@ void Game::init()
 	g_devel->set_info("[bool] enable or disable developer mode");
 }
 
-void Game::shutdown()
+Game::~Game()
 {
 	g_impulsespeed = 0;
 	// game functions are automaticly removed
diff --git a/src/game/base/game.h b/src/game/base/game.h
index d4f0743..6f4cffd 100644
--- a/src/game/base/game.h
+++ b/src/game/base/game.h
@@ -64,13 +64,6 @@ public:
 	/// game variable: enable or disable development mode
 	static core::Cvar *g_devel;
 
-protected:
-	/// initialize the game
-	virtual void init();
-
-	/// shutdown the game
-	virtual void shutdown();
-
 private:
 
 	bool load_world();
@@ -99,6 +92,9 @@ private:
 	static void func_goto(core::Player *player, const std::string &args);
 };
 
+/// factory function
+core::Module *factory();
+
 }
 
 #endif // __INCLUDED_BASE_H__
-- 
cgit v1.2.3