]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/globals.hxx
Initialize the bump-mapped 3d clouds to true.
[flightgear.git] / src / Main / globals.hxx
index a84d838352f51ae31ee8deb81982c0ff4efbc12c..071c97c24cd44ea5c4ba35488230aad386e2e418 100644 (file)
 #ifndef _GLOBALS_HXX
 #define _GLOBALS_HXX
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <simgear/compiler.h>
+#include <simgear/structure/callback.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/structure/event_mgr.hxx>
 
 #include <vector>
 #include STL_STRING
 
-#include "fgfs.hxx"
-
-
 SG_USING_STD( vector );
 SG_USING_STD( string );
 
@@ -52,28 +56,29 @@ class SGEphemeris;
 
 class SGCommandMgr;
 class SGMagVar;
+class SGMaterialLib;
+class SGModelLib;
 class SGPropertyNode;
-class SGRoute;
 class SGTime;
+class SGSoundMgr;
 
+class FGAirportList;
+class FGRunwayList;
 class FGAIMgr;
 class FGATCMgr;
 class FGATCDisplay;
 class FGAircraftModel;
-class FGAutopilot;
 class FGControls;
-class FGEnvironment;
-class FGEnvironmentMgr;
 class FGIO;
-class FGModelLoader;
+class FGLight;
 class FGModelMgr;
+class FGRouteMgr;
 class FGScenery;
 #ifdef FG_MPLAYER_AS
 class FGMultiplayRxMgr;
 class FGMultiplayTxMgr;
 #endif
-class FGSoundMgr;
-class FGTextureLoader;
+class FGPanel;
 class FGTileMgr;
 class FGViewMgr;
 class FGViewer;
@@ -82,12 +87,14 @@ class FGViewer;
 /**
  * Bucket for subsystem pointers representing the sim's state.
  */
+
 class FGGlobals
 {
 
 private:
 
-    FGSubsystemMgr * subsystem_mgr;
+    SGSubsystemMgr * subsystem_mgr;
+    SGEventMgr * event_mgr;
 
     // Number of milliseconds elapsed since the start of the program.
     double sim_time_sec;
@@ -120,17 +127,23 @@ private:
     // Magnetic Variation
     SGMagVar *mag;
 
-    // Current autopilot
-    FGAutopilot *autopilot;
+    // Material properties library
+    SGMaterialLib *matlib;
 
     // Global autopilot "route"
-    SGRoute *route;
+    FGRouteMgr *route_mgr;
+
+    // 2D panel
+    FGPanel *current_panel;
 
     // sound manager
-    FGSoundMgr *soundmgr;
+    SGSoundMgr *soundmgr;
+
+    // Simple Airport List
+    FGAirportList *airports;
 
-    // environment information
-    FGEnvironmentMgr * environment_mgr;
+    // Runway List
+    FGRunwayList *runways;
 
     // ATC manager
     FGATCMgr *ATC_mgr;
@@ -156,9 +169,7 @@ private:
 
     SGCommandMgr *commands;
 
-    FGModelLoader * model_loader;
-
-    FGTextureLoader * texture_loader;
+    SGModelLib *model_lib;
 
     FGAircraftModel *acmodel;
 
@@ -167,13 +178,18 @@ private:
     // list of serial port-like configurations
     string_list *channel_options_list;
 
+    // A list of initial waypoints that are read from the command line
+    // and or flight-plan file during initialization
+    string_list *initial_waypoints;
+
     // FlightGear scenery manager
     FGScenery *scenery;
 
     // Tile manager
     FGTileMgr *tile_mgr;
 
-    FGIO* io;
+    // Input/Ouput subsystem
+    FGIO *io;
 
 #ifdef FG_MPLAYER_AS
     //Mulitplayer managers
@@ -187,22 +203,24 @@ public:
     FGGlobals();
     virtual ~FGGlobals();
 
-    virtual FGSubsystemMgr * get_subsystem_mgr () const;
+    virtual SGSubsystemMgr * get_subsystem_mgr () const;
 
-    virtual FGSubsystem * get_subsystem (const char * name);
+    virtual SGSubsystem * get_subsystem (const char * name);
 
     virtual void add_subsystem (const char * name,
-                                FGSubsystem * subsystem,
-                                FGSubsystemMgr::GroupType
-                                  type = FGSubsystemMgr::GENERAL,
+                                SGSubsystem * subsystem,
+                                SGSubsystemMgr::GroupType
+                                type = SGSubsystemMgr::GENERAL,
                                 double min_time_sec = 0);
 
+    virtual SGEventMgr * get_event_mgr () const;
+
     inline double get_sim_time_sec () const { return sim_time_sec; }
     inline void inc_sim_time_sec (double dt) { sim_time_sec += dt; }
     inline void set_sim_time_sec (double t) { sim_time_sec = t; }
 
     inline const string &get_fg_root () const { return fg_root; }
-    inline void set_fg_root (const string &root) { fg_root = root; }
+    void set_fg_root (const string &root);
 
     inline const string &get_fg_scenery () const { return fg_scenery; }
     inline void set_fg_scenery (const string &scenery) {
@@ -231,18 +249,14 @@ public:
     inline SGMagVar *get_mag() const { return mag; }
     inline void set_mag( SGMagVar *m ) { mag = m; }
 
-    inline FGAutopilot *get_autopilot() const { return autopilot; }
-    inline void set_autopilot( FGAutopilot *ap) { autopilot = ap; }
+    inline SGMaterialLib *get_matlib() const { return matlib; }
+    inline void set_matlib( SGMaterialLib *m ) { matlib = m; }
 
-    inline SGRoute *get_route() const { return route; }
-    inline void set_route( SGRoute *r ) { route = r; }
+    inline FGAirportList *get_airports() const { return airports; }
+    inline void set_airports( FGAirportList *a ) {airports = a; }
 
-    inline FGEnvironmentMgr * get_environment_mgr() {
-      return environment_mgr;
-    }
-    inline void set_environment_mgr(FGEnvironmentMgr * mgr) {
-      environment_mgr = mgr;
-    }
+    inline FGRunwayList *get_runways() const { return runways; }
+    inline void set_runways( FGRunwayList *r ) {runways = r; }
 
     inline FGATCMgr *get_ATC_mgr() const { return ATC_mgr; }
     inline void set_ATC_mgr( FGATCMgr *a ) {ATC_mgr = a; }
@@ -253,8 +267,11 @@ public:
     inline FGAIMgr *get_AI_mgr() const { return AI_mgr; }
     inline void set_AI_mgr( FGAIMgr *a ) {AI_mgr = a; }
 
-    inline FGSoundMgr *get_soundmgr() const { return soundmgr; }
-    inline void set_soundmgr( FGSoundMgr *sm ) { soundmgr = sm; }
+    inline FGPanel *get_current_panel() const { return current_panel; }
+    inline void set_current_panel( FGPanel *cp ) { current_panel = cp; }
+
+    inline SGSoundMgr *get_soundmgr() const { return soundmgr; }
+    inline void set_soundmgr( SGSoundMgr *sm ) { soundmgr = sm; }
 
     inline FGControls *get_controls() const { return controls; }
     inline void set_controls( FGControls *c ) { controls = c; }
@@ -271,16 +288,10 @@ public:
 
     inline SGCommandMgr *get_commands () { return commands; }
 
-    inline FGModelLoader * get_model_loader () { return model_loader; }
-
-    inline void set_model_loader (FGModelLoader * loader) {
-        model_loader = loader;
-    }
-
-    inline FGTextureLoader * get_texture_loader () { return texture_loader; }
+    inline SGModelLib * get_model_lib () { return model_lib; }
 
-    inline void set_texture_loader (FGTextureLoader * loader) {
-        texture_loader = loader;
+    inline void set_model_lib (SGModelLib *m) {
+        model_lib = m;
     }
 
     inline FGAircraftModel *get_aircraft_model () { return acmodel; }
@@ -320,14 +331,21 @@ public:
        channel_options_list = l;
     }
 
+    inline string_list *get_initial_waypoints () {
+        return initial_waypoints;
+    }
+  
+    inline void set_initial_waypoints (string_list *list) {
+        initial_waypoints = list;
+    }
+
     inline FGScenery * get_scenery () const { return scenery; }
     inline void set_scenery ( FGScenery *s ) { scenery = s; }
 
     inline FGTileMgr * get_tile_mgr () const { return tile_mgr; }
     inline void set_tile_mgr ( FGTileMgr *t ) { tile_mgr = t; }
 
-    FGIO* get_io() const { return io; }
-
+    inline FGIO* get_io() const { return io; }
 
     /**
      * Save the current state as the initial state.