]> git.mxchange.org Git - flightgear.git/blobdiff - src/Controls/controls.hxx
Update controls so we can specify each tank on/off individually. Also
[flightgear.git] / src / Controls / controls.hxx
index 208ad8c36e4b2ab2db69c7786490c8bfe4a1126f..51bb4328c88337788b4ff7d3016cd508fa5f0e56 100644 (file)
@@ -41,18 +41,21 @@ class FGControls : public FGSubsystem
 
 public:
 
-    enum
-    {
+    enum {
        ALL_ENGINES = -1,
        MAX_ENGINES = 10
     };
 
-    enum
-    {
+    enum {
        ALL_WHEELS = -1,
        MAX_WHEELS = 3
     };
 
+    enum {
+       ALL_TANKS = -1,
+       MAX_TANKS = 4
+    };
+
 private:
 
     double aileron;
@@ -70,6 +73,7 @@ private:
     int magnetos[MAX_ENGINES];
     bool throttle_idle;
     bool starter[MAX_ENGINES];
+    bool fuel_selector[MAX_TANKS];
     bool gear_down;
 
     SGPropertyNode * auto_coordination;
@@ -83,7 +87,7 @@ public:
     void init ();
     void bind ();
     void unbind ();
-    void update (int dt);
+    void update (double dt);
 
     // Reset function
     void reset_all(void);
@@ -105,6 +109,9 @@ public:
     inline double get_brake(int wheel) const { return brake[wheel]; }
     inline int get_magnetos(int engine) const { return magnetos[engine]; }
     inline bool get_starter(int engine) const { return starter[engine]; }
+    inline bool get_fuel_selector(int tank) const {
+        return fuel_selector[tank];
+    }
     inline bool get_gear_down() const { return gear_down; }
 
     // Update functions
@@ -131,6 +138,7 @@ public:
     void set_magnetos( int engine, int pos );
     void move_magnetos( int engine, int amt );
     void set_starter( int engine, bool flag );
+    void set_fuel_selector( int tank, bool pos );
     void set_parking_brake( double pos );
     void set_brake( int wheel, double pos );
     void move_brake( int wheel, double amt );