From f8df262633786746d350fd2095f9a51bf50e4034 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 6 Oct 1999 20:58:57 +0000 Subject: [PATCH] Added a simple auto-coordination capability. Can be enabled/disabled from the command line. --- src/Main/options.cxx | 5 +++++ src/Main/options.hxx | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index d9a8d48d7..e904e2747 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -153,6 +153,7 @@ fgOPTIONS::fgOPTIONS() : mouse_pointer(0), pause(0), control_mode(FG_JOYSTICK), + auto_coordination(FG_AUTO_COORD_NOT_SPECIFIED), // Features hud_status(1), @@ -586,6 +587,10 @@ int fgOPTIONS::parse_option( const string& arg ) { pause = true; } else if ( arg.find( "--control=") != string::npos ) { parse_control( arg.substr(10) ); + } else if ( arg == "--disable-auto-coordination" ) { + auto_coordination = FG_AUTO_COORD_DISABLED; + } else if ( arg == "--enable-auto-coordination" ) { + auto_coordination = FG_AUTO_COORD_ENABLED; } else if ( arg == "--disable-hud" ) { hud_status = false; } else if ( arg == "--enable-hud" ) { diff --git a/src/Main/options.hxx b/src/Main/options.hxx index 360a096ef..0253f6d2c 100644 --- a/src/Main/options.hxx +++ b/src/Main/options.hxx @@ -110,6 +110,13 @@ public: FG_VIEW_FOLLOW = 1 }; + enum fgAutoCoordMode + { + FG_AUTO_COORD_NOT_SPECIFIED = 0, + FG_AUTO_COORD_DISABLED = 1, + FG_AUTO_COORD_ENABLED = 2 + }; + private: // The flight gear "root" directory @@ -134,6 +141,7 @@ private: int mouse_pointer; // show mouse pointer bool pause; // pause intially enabled/disabled fgControlMode control_mode; // primary control mode + fgAutoCoordMode auto_coordination; // enable auto coordination // Features bool hud_status; // HUD on/off @@ -221,6 +229,12 @@ public: inline bool get_pause() const { return pause; } inline fgControlMode get_control_mode() const { return control_mode; } inline void set_control_mode( fgControlMode mode ) { control_mode = mode; } + inline fgAutoCoordMode get_auto_coordination() const { + return auto_coordination; + } + inline void set_auto_coordination(fgAutoCoordMode m) { + auto_coordination = m; + } inline bool get_hud_status() const { return hud_status; } inline bool get_panel_status() const { return panel_status; } inline bool get_sound() const { return sound; } -- 2.39.5