From 35613f0860a2d8cb643ca8de006de08503e48e53 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 18 Oct 2008 17:58:45 +0000 Subject: example module --- src/game/base/base.cc | 8 +------- src/game/base/base.h | 13 +++++++------ 2 files changed, 8 insertions(+), 13 deletions(-) (limited to 'src/game/base') 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); -- cgit v1.2.3