]> git.mxchange.org Git - flightgear.git/blobdiff - Main/fg_init.c
Shufflin' stuff.
[flightgear.git] / Main / fg_init.c
index 2fcf9acb7df332282fe179c40c8284c86faa10c7..36f368c2c92e5fe5eb2fa144cc45d552950d9b39 100644 (file)
@@ -28,6 +28,7 @@
 #include <stdlib.h>
 
 #include "fg_init.h"
+#include "views.h"
 
 #include "../constants.h"
 #include "../general.h"
@@ -74,8 +75,11 @@ void fgInitSubsystems( void ) {
     double cur_elev;
 
     struct FLIGHT *f;
+    struct VIEW *v;
 
     f = &current_aircraft.flight;
+    v = &current_view;
+
 
     /****************************************************************
      * The following section sets up the flight model EOM parameters and 
@@ -92,7 +96,8 @@ void fgInitSubsystems( void ) {
     FG_Latitude  = (  120070.41 / 3600.0 ) * DEG_TO_RAD;
     FG_Longitude = ( -398391.28 / 3600.0 ) * DEG_TO_RAD;
     FG_Altitude = FG_Runway_altitude + 3.758099;
-
+    /* FG_Altitude = 20000; */
+    
     /* Initial Position north of the city of Globe */
     /* FG_Latitude  = (  120625.64 / 3600.0 ) * DEG_TO_RAD; */
     /* FG_Longitude = ( -398673.28 / 3600.0 ) * DEG_TO_RAD; */
@@ -138,13 +143,20 @@ void fgInitSubsystems( void ) {
     /* fgSlewInit(-398673.28,120625.64, 53, 4.38); */
 
     /* Initialize shared sun position and sun_vec */
-    fgUpdateSunPos();
+    fgUpdateSunPos(scenery.center);
+
+    /* Initialize view parameters */
+    fgViewInit(v);
 
     /* Initialize the weather modeling subsystem */
     fgWeatherInit();
 
     /* Initialize the Cockpit subsystem */
-    fgCockpitInit( current_aircraft );
+    if( fgCockpitInit( current_aircraft ) == NULL )
+    {
+       printf( "Error in Cockpit initialization!\n" );
+       exit( 1 );
+    }
 
     /* Initialize the Stars subsystem  */
     fgStarsInit();
@@ -188,9 +200,15 @@ void fgInitSubsystems( void ) {
 
 
 /* $Log$
-/* Revision 1.3  1997/08/27 03:30:19  curt
-/* Changed naming scheme of basic shared structures.
+/* Revision 1.5  1997/09/04 02:17:36  curt
+/* Shufflin' stuff.
 /*
+ * Revision 1.4  1997/08/27 21:32:26  curt
+ * Restructured view calculation code.  Added stars.
+ *
+ * Revision 1.3  1997/08/27 03:30:19  curt
+ * Changed naming scheme of basic shared structures.
+ *
  * Revision 1.2  1997/08/25 20:27:23  curt
  * Merged in initial HUD and Joystick code.
  *