]> git.mxchange.org Git - flightgear.git/commitdiff
Removed dependency on viewmgr.hxx from globals.hxx, so that changes to
authordavid <david>
Fri, 5 Apr 2002 18:46:47 +0000 (18:46 +0000)
committerdavid <david>
Fri, 5 Apr 2002 18:46:47 +0000 (18:46 +0000)
the viewer code do not require most of FlightGear to be rebuilt.
Added some now-required includes to environment.cxx.

src/Environment/environment.cxx
src/Main/globals.cxx
src/Main/globals.hxx

index bb5894443266da66e1de20f069c64e930c9885b7..8a8f13c41edfcdd04ff897fa5718265894daf92f 100644 (file)
@@ -31,6 +31,9 @@
 
 #include <math.h>
 
+#include <plib/sg.h>
+
+#include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 
 #include <Main/fg_props.hxx>
index 15c898998eacbebf1553a975152fc5b481fa1b9e..b03f7f0a8dc4dd731c20bb4a79a411a820d58f36 100644 (file)
@@ -26,6 +26,8 @@
 #include <Environment/environment_mgr.hxx>
 
 #include "globals.hxx"
+#include "viewmgr.hxx"
+
 #include "fg_props.hxx"
 
 
@@ -100,5 +102,10 @@ FGGlobals::get_environment (double lat, double lon, double alt) const
   return environment_mgr->getEnvironment(lat, lon, alt);
 }
 
+FGViewer *
+FGGlobals::get_current_view () const
+{
+  return viewmgr->get_current_view();
+}
 
 // end of globals.cxx
index 4bcdf73e9b641e0cf311e9c05fbf448bcb4eccee..4d4d12364b4410421c53cac459ec353a23d2f6c7 100644 (file)
@@ -29,8 +29,6 @@
 #include <vector>
 #include STL_STRING
 
-#include "viewmgr.hxx"
-
 SG_USING_STD( vector );
 SG_USING_STD( string );
 
@@ -61,6 +59,7 @@ class FGControls;
 class FGSoundMgr;
 class FGAutopilot;
 class FGFX;
+class FGViewMgr;
 class FGViewer;
 class FGATCMgr;
 class FGATCDisplay;
@@ -235,9 +234,7 @@ public:
 
     inline FGViewMgr *get_viewmgr() const { return viewmgr; }
     inline void set_viewmgr( FGViewMgr *vm ) { viewmgr = vm; }
-    inline FGViewer *get_current_view() const {
-      return viewmgr->get_current_view();
-    }
+    FGViewer *get_current_view() const;
 
     inline SGPropertyNode *get_props () { return props; }
     inline void set_props( SGPropertyNode *n ) { props = n; }