1
0
Fork 0

Added a simple auto-coordination capability.

Can be enabled/disabled from the command line.
This commit is contained in:
curt 1999-10-06 20:58:57 +00:00
parent 6f079dcf2e
commit f8df262633
2 changed files with 19 additions and 0 deletions

View file

@ -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" ) {

View file

@ -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; }