diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-18 17:58:45 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-18 17:58:45 +0000 |
commit | 35613f0860a2d8cb643ca8de006de08503e48e53 (patch) | |
tree | 8a5436de643e818e68a82df2e5cb2df2145f5062 /src/game/base | |
parent | db287e4a5133125bb6f25ba21ea97c47b19ac67f (diff) |
example module
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/base.cc | 8 | ||||
-rw-r--r-- | src/game/base/base.h | 13 |
2 files changed, 8 insertions, 13 deletions
diff --git a/src/game/base/base.cc b/src/game/base/base.cc index f27d013..530e520 100644 --- a/src/game/base/base.cc +++ b/src/game/base/base.cc @@ -166,7 +166,7 @@ void func_impulse(core::Player *player, std::string const &args) Base *Base::game_instance = 0; -Base::Base() : core::Module("base", "Project::OSiRiON") +Base::Base() : core::Module("base", "Project::OSiRiON", true) { game_instance = this; g_impulsespeed = 0; @@ -179,8 +179,6 @@ Base::~Base() void Base::init() { - module_running = false; - ShipModel::clear(); if (!load_world()) { @@ -231,9 +229,6 @@ void Base::init() g_devel = core::Cvar::get("g_devel", "0", core::Cvar::Archive); g_devel->set_info("[bool] enable or disable developer mode"); - - // indicate the module is ready to run frames - module_running = true; } void Base::shutdown() @@ -245,7 +240,6 @@ void Base::shutdown() core::Func::remove("list_ship"); ShipModel::clear(); - module_running = false; } bool Base::load_world() diff --git a/src/game/base/base.h b/src/game/base/base.h index db3e7d9..2393a2e 100644 --- a/src/game/base/base.h +++ b/src/game/base/base.h @@ -34,12 +34,6 @@ public: Base(); ~Base(); - /// initialize the game - void init(); - - /// shutdown the game - void shutdown(); - /// run one time frame void frame(float seconds); @@ -57,6 +51,13 @@ public: core::Cvar *g_jumppointrange; core::Cvar *g_devel; +protected: + /// initialize the game + void init(); + + /// shutdown the game + void shutdown(); + private: bool got_entity_key(filesystem::IniFile &inifile, core::Entity *entity); |