Autopilot mods.
This commit is contained in:
parent
1bafaa31f6
commit
a09d8f2d62
3 changed files with 28 additions and 12 deletions
|
@ -38,7 +38,7 @@
|
|||
#include <Aircraft/aircraft.h>
|
||||
#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>
|
||||
|
@ -88,6 +88,12 @@ 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 49: // numeric keypad 1
|
||||
v->goal_view_offset = FG_PI * 0.75;
|
||||
return;
|
||||
|
@ -151,16 +157,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 +196,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 +375,9 @@ void GLUTspecialkey(int k, int x, int y) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// 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.
|
||||
//
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
# include <Audio/src/sm.h>
|
||||
#endif
|
||||
|
||||
#include <Autopilot/autopilot.hxx>
|
||||
#include <Cockpit/cockpit.hxx>
|
||||
#include <Debug/fg_debug.h>
|
||||
#include <GUI/gui.h>
|
||||
|
@ -391,6 +392,9 @@ void fgUpdateTimeDepCalcs(int multi_loop) {
|
|||
}
|
||||
|
||||
if ( !t->pause ) {
|
||||
// run Autopilot system
|
||||
fgAPRun();
|
||||
|
||||
// printf("updating flight model x %d\n", multi_loop);
|
||||
fgFlightModelUpdate(current_options.get_flight_model(), f, multi_loop);
|
||||
} else {
|
||||
|
@ -890,6 +894,9 @@ int main( int argc, char **argv ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.54 1998/09/29 02:03:38 curt
|
||||
// Autopilot mods.
|
||||
//
|
||||
// Revision 1.53 1998/09/26 13:18:35 curt
|
||||
// Check if audio "working()" before doing audio manipulations.
|
||||
//
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include <Astro/stars.hxx>
|
||||
// #include <Astro/sun.hxx>
|
||||
#include <Astro/solarsystem.hxx>
|
||||
#include <Autopilot/autopilot.h>
|
||||
#include <Autopilot/autopilot.hxx>
|
||||
#include <Cockpit/cockpit.hxx>
|
||||
#include <Debug/fg_debug.h>
|
||||
#include <Joystick/joystick.h>
|
||||
|
@ -398,6 +398,9 @@ int fgInitSubsystems( void )
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.39 1998/09/29 02:03:39 curt
|
||||
// Autopilot mods.
|
||||
//
|
||||
// Revision 1.38 1998/09/15 04:27:30 curt
|
||||
// Changes for new Astro code.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue