Added a simple auto-coordination capability.
Can be enabled/disabled from the command line.
This commit is contained in:
parent
6f079dcf2e
commit
f8df262633
2 changed files with 19 additions and 0 deletions
|
@ -153,6 +153,7 @@ fgOPTIONS::fgOPTIONS() :
|
||||||
mouse_pointer(0),
|
mouse_pointer(0),
|
||||||
pause(0),
|
pause(0),
|
||||||
control_mode(FG_JOYSTICK),
|
control_mode(FG_JOYSTICK),
|
||||||
|
auto_coordination(FG_AUTO_COORD_NOT_SPECIFIED),
|
||||||
|
|
||||||
// Features
|
// Features
|
||||||
hud_status(1),
|
hud_status(1),
|
||||||
|
@ -586,6 +587,10 @@ int fgOPTIONS::parse_option( const string& arg ) {
|
||||||
pause = true;
|
pause = true;
|
||||||
} else if ( arg.find( "--control=") != string::npos ) {
|
} else if ( arg.find( "--control=") != string::npos ) {
|
||||||
parse_control( arg.substr(10) );
|
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" ) {
|
} else if ( arg == "--disable-hud" ) {
|
||||||
hud_status = false;
|
hud_status = false;
|
||||||
} else if ( arg == "--enable-hud" ) {
|
} else if ( arg == "--enable-hud" ) {
|
||||||
|
|
|
@ -110,6 +110,13 @@ public:
|
||||||
FG_VIEW_FOLLOW = 1
|
FG_VIEW_FOLLOW = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum fgAutoCoordMode
|
||||||
|
{
|
||||||
|
FG_AUTO_COORD_NOT_SPECIFIED = 0,
|
||||||
|
FG_AUTO_COORD_DISABLED = 1,
|
||||||
|
FG_AUTO_COORD_ENABLED = 2
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// The flight gear "root" directory
|
// The flight gear "root" directory
|
||||||
|
@ -134,6 +141,7 @@ private:
|
||||||
int mouse_pointer; // show mouse pointer
|
int mouse_pointer; // show mouse pointer
|
||||||
bool pause; // pause intially enabled/disabled
|
bool pause; // pause intially enabled/disabled
|
||||||
fgControlMode control_mode; // primary control mode
|
fgControlMode control_mode; // primary control mode
|
||||||
|
fgAutoCoordMode auto_coordination; // enable auto coordination
|
||||||
|
|
||||||
// Features
|
// Features
|
||||||
bool hud_status; // HUD on/off
|
bool hud_status; // HUD on/off
|
||||||
|
@ -221,6 +229,12 @@ public:
|
||||||
inline bool get_pause() const { return pause; }
|
inline bool get_pause() const { return pause; }
|
||||||
inline fgControlMode get_control_mode() const { return control_mode; }
|
inline fgControlMode get_control_mode() const { return control_mode; }
|
||||||
inline void set_control_mode( fgControlMode mode ) { control_mode = 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_hud_status() const { return hud_status; }
|
||||||
inline bool get_panel_status() const { return panel_status; }
|
inline bool get_panel_status() const { return panel_status; }
|
||||||
inline bool get_sound() const { return sound; }
|
inline bool get_sound() const { return sound; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue