]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_init.cxx
- adjusted for no-value constructor for FGPanel
[flightgear.git] / src / Main / fg_init.cxx
index 801ce3be41b6b5d7bdc3e090f70f2ed343d5aa2c..5df6730f5df38d6e9e61fe32e42c41db93b7b5f4 100644 (file)
 #  include <math.h>
 #endif
 
+#ifdef HAVE_WINDOWS_H
+#  include <windows.h>
+#endif
+
 #include <GL/glut.h>
-#include <simgear/xgl/xgl.h>
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -77,7 +80,8 @@
 #include <FDM/LaRCsim.hxx>
 #include <FDM/MagicCarpet.hxx>
 #include <Include/general.hxx>
-#include <Joystick/joystick.hxx>
+#include <Input/input.hxx>
+// #include <Joystick/joystick.hxx>
 #include <Objects/matlib.hxx>
 #include <Navaids/fixlist.hxx>
 #include <Navaids/ilslist.hxx>
 
 #include "fg_init.hxx"
 #include "fg_io.hxx"
+#include "fg_commands.hxx"
+#include "fg_props.hxx"
 #include "options.hxx"
 #include "globals.hxx"
-#include "bfi.hxx"
 
 #if defined(FX) && defined(XMESA)
 #include <GL/xmesa.h>
@@ -668,6 +673,12 @@ bool fgInitSubsystems( void ) {
     current_fixlist->init( p_fix );
 
 
+    ////////////////////////////////////////////////////////////////////
+    // Initialize the built-in commands.
+    ////////////////////////////////////////////////////////////////////
+    fgInitCommands();
+
+
     ////////////////////////////////////////////////////////////////////
     // Initialize the radio stack subsystem.
     ////////////////////////////////////////////////////////////////////
@@ -695,9 +706,9 @@ bool fgInitSubsystems( void ) {
     // Initialize the joystick subsystem.
     ////////////////////////////////////////////////////////////////////
 
-    if ( ! fgJoystickInit() ) {
-       SG_LOG( SG_GENERAL, SG_ALERT, "Error in Joystick initialization!" );
-    }
+    // if ( ! fgJoystickInit() ) {
+    //   SG_LOG( SG_GENERAL, SG_ALERT, "Error in Joystick initialization!" );
+    // }
 
 
     ////////////////////////////////////////////////////////////////////
@@ -737,10 +748,10 @@ bool fgInitSubsystems( void ) {
 
     
     ////////////////////////////////////////////////////////////////////
-    // Initialize the BFI.
+    // Initialize the default (kludged) properties.
     ////////////////////////////////////////////////////////////////////
 
-    FGBFI::init();
+    fgInitProps();
 
 
     ////////////////////////////////////////////////////////////////////
@@ -751,6 +762,14 @@ bool fgInitSubsystems( void ) {
     controls.bind();
 
 
+    ////////////////////////////////////////////////////////////////////
+    // Initialize the input subsystem.
+    ////////////////////////////////////////////////////////////////////
+
+    current_input.init();
+    current_input.bind();
+
+
     ////////////////////////////////////////////////////////////////////////
     // End of subsystem initialization.
     ////////////////////////////////////////////////////////////////////
@@ -817,6 +836,11 @@ void fgReInitSubsystems( void )
     controls.reset_all();
     current_autopilot->reset();
 
+    fgUpdateSunPos();
+    fgUpdateMoonPos();
+    cur_light_params.Update();
+    fgUpdateLocalTime();
+
     if( !freeze )
         globals->set_freeze( false );
 }