]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/options.hxx
Renamed fg_types.hxx -> sg_types.hxx
[flightgear.git] / src / Main / options.hxx
index dd32db18115389ff8b388a3264c88e6326516876..569a1f231245e77c01ffc5d0cf161a844194ef03 100644 (file)
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
 #endif
 
 #include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl/xgl.h>
 
 #if defined(FX) && defined(XMESA)
 extern bool global_fullscreen;
 #endif
 
-#include <Include/fg_types.hxx>
+#include <simgear/math/sg_types.hxx>
+#include <simgear/timing/sg_time.hxx>
 
 #include STL_STRING
 #include <vector>
@@ -54,6 +55,9 @@ extern bool global_fullscreen;
 FG_USING_STD(vector);
 FG_USING_STD(string);
 
+#define NEW_DEFAULT_MODEL_HZ 120
+
+
 class fgOPTIONS {
 
 public:
@@ -84,16 +88,6 @@ public:
        FG_RADIUS_MAX = 4
     };
 
-    enum
-    {
-      FG_TIME_SYS_OFFSET   = 1,
-      FG_TIME_GMT_OFFSET   = 2,
-      FG_TIME_LAT_OFFSET   = 3,
-      FG_TIME_SYS_ABSOLUTE = 4,
-      FG_TIME_GMT_ABSOLUTE = 5,
-      FG_TIME_LAT_ABSOLUTE = 6
-    };
-
     enum fgControlMode
     {
        FG_JOYSTICK = 0,
@@ -120,11 +114,23 @@ public:
        FG_AUTO_COORD_ENABLED = 2
     };
 
+    enum fgTimingOffsetType {
+       FG_TIME_SYS_OFFSET   = 0,
+       FG_TIME_GMT_OFFSET   = 1,
+       FG_TIME_LAT_OFFSET   = 2,
+       FG_TIME_SYS_ABSOLUTE = 3,
+       FG_TIME_GMT_ABSOLUTE = 4,
+       FG_TIME_LAT_ABSOLUTE = 5
+    };
+
 private:
 
     // The flight gear "root" directory
     string fg_root;
 
+    // The scenery "root" directory
+    string fg_scenery;
+
     // Starting position and orientation
     string airport_id;  // ID of initial starting airport
     double lon;         // starting longitude in degrees (west = -)
@@ -136,13 +142,14 @@ private:
     double uBody;       // Body axis X velocity (U)
     double vBody;       // Body axis Y velocity (V)
     double wBody;       // Body axis Z velocity (W)
+    double vkcas;       // Calibrated airspeed, knots
+    double mach;        // Mach number
 
     // Miscellaneous
     bool game_mode;     // Game mode enabled/disabled
     bool splash_screen; // show splash screen
     bool intro_music;   // play introductory music
     int mouse_pointer;  // show mouse pointer
-    bool pause;         // pause intially enabled/disabled
     fgControlMode control_mode; // primary control mode
     fgAutoCoordMode auto_coordination; // enable auto coordination
 
@@ -150,12 +157,17 @@ private:
     bool hud_status;    // HUD on/off
     bool panel_status;  // Panel on/off
     bool sound;         // play sound effects
+    bool anti_alias_hud;
 
     // Flight Model options
     int flight_model;   // Core flight model code:  jsb, larcsim, magic, etc.
     string aircraft;    // Aircraft to model
     int model_hz;       // number of FDM iterations per second
     int speed_up;       // Sim mechanics run this much faster than normal speed
+    int trim;           // use the FDM trimming routine during init
+                        // <0 --notrim set, 0 no trim, >0 trim
+                        // default behavior is to enable trimming for jsbsim
+                        // disable for all other fdm's
 
     // Rendering options
     fgFogKind fog;      // Fog nicest/fastest/disabled
@@ -168,6 +180,7 @@ private:
     bool textures;      // Textures enabled/disabled
     bool wireframe;     // Wireframe mode enabled/disabled
     int xsize, ysize;   // window size derived from geometry string
+    int bpp;            // bits per pixel
     fgViewMode view_mode; // view mode
 
     // Scenery options
@@ -184,13 +197,15 @@ private:
 
     // Time options
     int time_offset;           // Use this value to change time.
-    int time_offset_type;      // Will be set to one of the FG_TIME_* enums,
-                               // To deterine how time_offset should be used 
+    fgTimingOffsetType time_offset_type; // Will be set to one of the
+                               // FG_TIME_* enums, to deterine how
+                               // time_offset should be used 
 
     // Serial port configuration strings
     string_list channel_options_list;
 
     // Network options
+    bool network_olk;
     string net_id;
     
 public:
@@ -212,6 +227,7 @@ public:
 
     // Query functions
     inline string get_fg_root() const { return fg_root; }
+    inline string get_fg_scenery() const { return fg_scenery; }
     inline string get_airport_id() const { return airport_id; }
     inline double get_lon() const { return lon; }
     inline double get_lat() const { return lat; }
@@ -222,11 +238,14 @@ public:
     inline double get_uBody() const {return uBody;}
     inline double get_vBody() const {return vBody;}
     inline double get_wBody() const {return wBody;}
+    inline double get_vc() const {return vkcas;}
+    inline double get_mach() const {return mach;}
+       
     inline bool get_game_mode() const { return game_mode; }
     inline bool get_splash_screen() const { return splash_screen; }
     inline bool get_intro_music() const { return intro_music; }
     inline int get_mouse_pointer() const { return mouse_pointer; }
-    inline bool get_pause() const { return pause; }
+    inline bool get_anti_alias_hud() const { return anti_alias_hud; }
     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 { 
@@ -243,6 +262,8 @@ public:
     inline int get_model_hz() const { return model_hz; }
     inline int get_speed_up() const { return speed_up; }
     inline void set_speed_up( int speed ) { speed_up = speed; }
+    inline int get_trim_mode(void) { return trim; }
+       
     inline bool fog_enabled() const { return fog != FG_FOG_DISABLED; }
     inline fgFogKind get_fog() const { return fog; }
     inline bool get_clouds() const { return clouds; }
@@ -255,6 +276,7 @@ public:
     inline bool get_wireframe() const { return wireframe; }
     inline int get_xsize() const { return xsize; }
     inline int get_ysize() const { return ysize; }
+    inline int get_bpp() const { return bpp; }
     inline fgViewMode get_view_mode() const { return view_mode; }
     inline int get_tile_radius() const { return tile_radius; }
     inline int get_tile_diameter() const { return tile_diameter; }
@@ -263,20 +285,52 @@ public:
     inline int get_tris_or_culled() const { return tris_or_culled; }
 
     inline int get_time_offset() const { return time_offset; }
-    inline int get_time_offset_type() const { return time_offset_type; };
+    inline fgTimingOffsetType  get_time_offset_type() const {
+       return time_offset_type;
+    };
 
     inline string_list get_channel_options_list() const { 
        return channel_options_list;
     }
+
+    inline bool get_network_olk() const { return network_olk; }
     inline string get_net_id() const { return net_id; }
 
     // Update functions
+    inline void set_fg_root (const string value) { fg_root = value; }
+    inline void set_fg_scenery (const string value) { fg_scenery = value; }
     inline void set_airport_id( const string id ) { airport_id = id; }
+    inline void set_lon (double value) { lon = value; }
+    inline void set_lat (double value) { lat = value; }
+    inline void set_altitude (double value) { altitude = value; }
+    inline void set_heading (double value) { heading = value; }
+    inline void set_roll (double value) { roll = value; }
+    inline void set_pitch (double value) { pitch = value; }
+    inline void set_uBody (double value) { uBody = value; }
+    inline void set_vBody (double value) { vBody = value; }
+    inline void set_wBody (double value) { wBody = value; }
+    inline void set_vc (double value) { vkcas = value; }
+    inline void set_mach(double value) { mach = value; }
+    inline void set_game_mode (bool value) { game_mode = value; }
+    inline void set_splash_screen (bool value) { splash_screen = value; }
+    inline void set_intro_music (bool value) { intro_music = value; }
+    inline void set_mouse_pointer (int value) { mouse_pointer = value; }
+    inline void set_anti_alias_hud (bool value) { anti_alias_hud = value; }
     inline void set_hud_status( bool status ) { hud_status = status; }
+    inline void set_sound (bool value) { sound = value; }
+    inline void set_flight_model (int value) { flight_model = value; }
+    inline void set_aircraft (const string &ac) { aircraft = ac; }
+    inline void set_model_hz (int value) { model_hz = value; }
+    inline void set_trim_mode(int value) { trim = value; }
+    inline void set_fog (fgFogKind value) { fog = value; }
     inline void set_clouds( bool value ) { clouds = value; }
     inline void set_clouds_asl( double value ) { clouds_asl = value; }
     inline void set_fov( double amount ) { fov = amount; }
+    inline void set_fullscreen (bool value) { fullscreen = value; }
+    inline void set_shading (int value) { shading = value; }
+    inline void set_skyblend (bool value) { skyblend = value; }
     inline void set_textures( bool status ) { textures = status; }
+    inline void set_wireframe (bool status) { wireframe = status; }
     inline void cycle_fog( void ) { 
        if ( fog == FG_FOG_DISABLED ) {
            fog = FG_FOG_FASTEST;
@@ -291,6 +345,15 @@ public:
     void toggle_panel();
     inline void set_xsize( int x ) { xsize = x; }
     inline void set_ysize( int y ) { ysize = y; }
+    inline void set_view_mode (fgViewMode value) { view_mode = value; }
+    inline void set_tile_radius (int value) { tile_radius = value; }
+    inline void set_tile_diameter (int value) { tile_diameter = value; }
+    inline void set_units (int value) { units = value; }
+    inline void set_tris_or_culled (int value) { tris_or_culled = value; }
+    inline void set_time_offset (int value) { time_offset = value; }
+    inline void set_time_offset_type (fgTimingOffsetType value) {
+       time_offset_type = value;
+    }
     inline void cycle_view_mode() { 
        if ( view_mode == FG_VIEW_PILOT ) {
            view_mode = FG_VIEW_FOLLOW;
@@ -299,6 +362,7 @@ public:
        }
     }
 
+    inline void set_network_olk( bool net ) { network_olk = net; }
     inline void set_net_id( const string id ) { net_id = id; }
 
 private: