]> git.mxchange.org Git - flightgear.git/blobdiff - Main/GLUTkey.cxx
C++ ifying ...
[flightgear.git] / Main / GLUTkey.cxx
index 14659f6983c5b45006c5c6a0300e31d8209e82fe..ebc72535e5ec2770e06f511cf70a70faeed8092e 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 #include <Astro/solarsystem.hxx>
 #include <Astro/sky.hxx>
-#include <Autopilot/autopilot.h> // Added autopilot.h to list, Jeff Goeke-Smith
+#include <Autopilot/autopilot.hxx>
 #include <Cockpit/hud.hxx>
 #include <Debug/fg_debug.h>
 #include <GUI/gui.h>
@@ -46,7 +46,7 @@
 #include <Objects/material.hxx>
 #include <PUI/pu.h>
 #include <Time/light.hxx>
-#include <Weather/weather.h>
+#include <Weather/weather.hxx>
 
 #include "GLUTkey.hxx"
 #include "options.hxx"
@@ -88,6 +88,18 @@ void GLUTkey(unsigned char k, int x, int y) {
     if ( GLUT_ACTIVE_ALT && glutGetModifiers() ) {
        fgPrintf( FG_INPUT, FG_DEBUG, " SHIFTED\n");
        switch (k) {
+       case 1: // Ctrl-A key
+           fgAPToggleAltitude();
+           return;
+       case 8: // Ctrl-H key
+           fgAPToggleHeading();
+           return;
+       case 19: // Ctrl-S key
+           fgAPToggleAutoThrottle();
+           return;
+       case 20: // Ctrl-T key
+           fgAPToggleTerrainFollow();
+           return;
        case 49: // numeric keypad 1
            v->goal_view_offset = FG_PI * 0.75;
            return;
@@ -151,16 +163,6 @@ void GLUTkey(unsigned char k, int x, int y) {
            tmp /= 1.10;
            fgWeatherSetVisibility( tmp );
            return;
-       // autopilot additions
-       case 65: // A key
-               fgAPSetMode(1);
-               return;
-       case 83: // S key
-               fgAPSetMode(0);
-               return;
-       case 68: // D key
-               fgAPSetHeading(AP_CURRENT_HEADING);
-               return;
        }
     } else {
        fgPrintf( FG_INPUT, FG_DEBUG, "\n");
@@ -200,6 +202,13 @@ void GLUTkey(unsigned char k, int x, int y) {
        case 51: // numeric keypad 3 (Pg Dn)
            fgThrottleMove(0, -0.01);
            return;
+       case 98: // b key
+           int b_ret;
+           double b_set;
+           b_ret = int( fgBrakeGet() );
+           b_set = double(!b_ret);
+           fgBrakeSet(b_set);
+           return;
        case 104: // h key
            HUD_brightkey( false );
            return;
@@ -372,6 +381,18 @@ void GLUTspecialkey(int k, int x, int y) {
 
 
 // $Log$
+// Revision 1.28  1998/10/17 01:34:20  curt
+// C++ ifying ...
+//
+// Revision 1.27  1998/10/02 12:46:46  curt
+// Added an "auto throttle"
+//
+// Revision 1.26  1998/10/01 00:38:04  curt
+// More altitude hold tweaks.
+//
+// Revision 1.25  1998/09/29 02:03:36  curt
+// Autopilot mods.
+//
 // Revision 1.24  1998/09/26 13:16:44  curt
 // C++-ified the comments.
 //