class SGSubsystem;
class SGSoundMgr;
-class FGATCMgr;
+class FGATISMgr;
class FGAircraftModel;
class FGControls;
class FGFlightPlanDispatcher;
class FGNavList;
class FGTACANList;
+class FGLocale;
class FGModelMgr;
class FGRouteMgr;
class FGScenery;
-class FGPanel;
class FGTileMgr;
class FGViewMgr;
class FGViewer;
SGPropertyNode_ptr initial_state;
// localization
- SGPropertyNode_ptr locale;
+ FGLocale* locale;
FGRenderer *renderer;
SGSubsystemMgr *subsystem_mgr;
SGEventMgr *event_mgr;
- SGSoundMgr *soundmgr;
// Number of milliseconds elapsed since the start of the program.
double sim_time_sec;
// Global autopilot "route"
FGRouteMgr *route_mgr;
- // 2D panel
- FGPanel *current_panel;
-
// ATC manager
- FGATCMgr *ATC_mgr;
+ FGATISMgr *ATIS_mgr;
// control input state
FGControls *controls;
/// roots of Aircraft trees
string_list fg_aircraft_dirs;
+
+ bool haveUserSettings;
+
public:
FGGlobals();
*/
SGPath resolve_maybe_aircraft_path(const std::string& branch) const;
+ /**
+ * Search in the following directories:
+ *
+ * 1. Root directory of current aircraft (defined by /sim/aircraft-dir)
+ * 2. All aircraft directories if branch starts with Aircraft/
+ * 3. fg_data directory
+ */
+ SGPath resolve_ressource_path(const std::string& branch) const;
+
inline const std::string &get_browser () const { return browser; }
void set_browser (const std::string &b) { browser = b; }
inline SGMaterialLib *get_matlib() const { return matlib; }
inline void set_matlib( SGMaterialLib *m ) { matlib = m; }
- inline FGATCMgr *get_ATC_mgr() const { return ATC_mgr; }
- inline void set_ATC_mgr( FGATCMgr *a ) {ATC_mgr = a; }
-
- inline FGPanel *get_current_panel() const { return current_panel; }
- inline void set_current_panel( FGPanel *cp ) { current_panel = cp; }
+ inline FGATISMgr *get_ATIS_mgr() const { return ATIS_mgr; }
+ inline void set_ATIS_mgr( FGATISMgr *a ) {ATIS_mgr = a; }
inline FGControls *get_controls() const { return controls; }
inline void set_controls( FGControls *c ) { controls = c; }
inline SGPropertyNode *get_props () { return props; }
inline void set_props( SGPropertyNode *n ) { props = n; }
- inline SGPropertyNode *get_locale () { return locale; }
- inline void set_locale( SGPropertyNode *n ) { locale = n; }
+ inline FGLocale* get_locale () { return locale; }
inline SGCommandMgr *get_commands () { return commands; }
const SGGeod & get_aircraft_position() const;
- const SGVec3d& get_aircraft_positon_cart() const;
+ SGVec3d get_aircraft_positon_cart() const;
inline FGModelMgr *get_model_mgr () { return model_mgr; }
*/
void restoreInitialState ();
+ /**
+ * Load user settings from autosave.xml
+ */
+ void loadUserSettings(const SGPath& datapath);
+
+ /**
+ * Save user settings in autosave.xml
+ */
+ void saveUserSettings();
};