]> git.mxchange.org Git - flightgear.git/blobdiff - Cockpit/cockpit.cxx
Turned "struct fgCONTROLS" into a class, with inlined accessor functions.
[flightgear.git] / Cockpit / cockpit.cxx
index 01d83fe73cf9066d1564386b3d4b7154c0ef32a5..827202e8cd359ff29535a243db5289fa65200670 100644 (file)
@@ -39,7 +39,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include <Aircraft/aircraft.h>
+#include <Aircraft/aircraft.hxx>
 #include <Debug/fg_debug.h>
 #include <Include/fg_constants.h>
 #include <Include/general.h>
@@ -50,7 +50,6 @@
 #include <Math/polar3d.hxx>
 #include <Scenery/scenery.hxx>
 #include <Time/fg_timer.hxx>
-#include <Weather/weather.h>
 
 #include "cockpit.hxx"
 
@@ -114,42 +113,27 @@ double get_long_min( void )
 
 double get_throttleval( void )
 {
-       fgCONTROLS *pcontrols;
-
-  pcontrols = current_aircraft.controls;
-  return pcontrols->throttle[0];     // Hack limiting to one engine
+    return controls.get_throttle( 0 );     // Hack limiting to one engine
 }
 
 double get_aileronval( void )
 {
-       fgCONTROLS *pcontrols;
-
-  pcontrols = current_aircraft.controls;
-  return pcontrols->aileron;
+    return controls.get_aileron();
 }
 
 double get_elevatorval( void )
 {
-       fgCONTROLS *pcontrols;
-
-  pcontrols = current_aircraft.controls;
-  return pcontrols->elevator;
+    return controls.get_elevator();
 }
 
 double get_elev_trimval( void )
 {
-       fgCONTROLS *pcontrols;
-
-  pcontrols = current_aircraft.controls;
-  return pcontrols->elevator_trim;
+    return controls.get_elevator_trim();
 }
 
 double get_rudderval( void )
 {
-       fgCONTROLS *pcontrols;
-
-  pcontrols = current_aircraft.controls;
-  return pcontrols->rudder;
+    return controls.get_rudder();
 }
 
 double get_speed( void )
@@ -316,6 +300,15 @@ void fgCockpitUpdate( void ) {
 
 
 // $Log$
+// Revision 1.20  1998/10/25 14:08:40  curt
+// Turned "struct fgCONTROLS" into a class, with inlined accessor functions.
+//
+// Revision 1.19  1998/10/17 01:33:56  curt
+// C++ ifying ...
+//
+// Revision 1.18  1998/10/16 23:27:23  curt
+// C++-ifying.
+//
 // Revision 1.17  1998/09/29 14:56:30  curt
 // c++-ified comments.
 //