Removed dependency on viewmgr.hxx from globals.hxx, so that changes to
the viewer code do not require most of FlightGear to be rebuilt. Added some now-required includes to environment.cxx.
This commit is contained in:
parent
04bc768e0a
commit
d2344cbabb
3 changed files with 12 additions and 5 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; }
|
||||
|
|
Loading…
Add table
Reference in a new issue