From e6f1fad441a7737549f463ebac1c9de062b5173d Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Oct 2008 09:51:27 +0000 Subject: game module cleanups --- src/game/base/base.h | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'src/game/base/base.h') diff --git a/src/game/base/base.h b/src/game/base/base.h index 2393a2e..34b3bd7 100644 --- a/src/game/base/base.h +++ b/src/game/base/base.h @@ -11,13 +11,14 @@ #include #include "base/ship.h" +#include "base/shipmodel.h" #include "base/star.h" #include "core/core.h" #include "filesystem/inifile.h" #include "sys/sys.h" /// the base game module -/** the base game module containis the game-specific code for Project::Osirion +/** the base game module contains the game-specific code for Project::OSiRiON */ namespace base { @@ -29,6 +30,7 @@ const unsigned int planet_enttype = 258; const unsigned int navpoint_enttype = 259; const unsigned int jumppoint_enttype = 260; +/// the base Project::OSiRiON game model class Base : public core::Module { public: Base(); @@ -43,13 +45,28 @@ public: /// is called when a player disconnects void player_disconnect(core::Player *player); - static inline Base *instance() { return game_instance; } + /* --- game variables -------------------------------------- */ - core::Cvar *g_impulsespeed; - core::Cvar *g_impulseacceleration; - core::Cvar *g_strafespeed; - core::Cvar *g_jumppointrange; - core::Cvar *g_devel; + /// game variable: speed of the impulse drive + static core::Cvar *g_impulsespeed; + + /// game variable: acceleration of the impulse drive + static core::Cvar *g_impulseacceleration; + + /// game variable strafe speed + static core::Cvar *g_strafespeed; + + /// game variable: jumppoint range + static core::Cvar *g_jumppointrange; + + /// game variable: enable or disable development mode + static core::Cvar *g_devel; + + /// default zone + static core::Zone *default_zone; + + /// default ship model + static ShipModel *default_shipmodel; protected: /// initialize the game @@ -59,7 +76,6 @@ protected: void shutdown(); private: - bool got_entity_key(filesystem::IniFile &inifile, core::Entity *entity); bool load_world(); @@ -69,7 +85,6 @@ private: bool load_ships(); - static Base *game_instance; }; } -- cgit v1.2.3