]> git.mxchange.org Git - flightgear.git/blobdiff - Main/fg_init.cxx
Tweaks for building with native SGI compilers.
[flightgear.git] / Main / fg_init.cxx
index 45f00f274af8d01bf7d3fcd2bfc5dae2392b987a..a731711f6b2423bb992f4aa6b710faa3f4977a7b 100644 (file)
 #  define _G_NO_EXTERN_TEMPLATES
 #endif
 
-#include <string>
+#include <Include/compiler.h>
+
+#include STL_STRING
 
 #include <Include/fg_constants.h>
 
+#include <Debug/logstream.hxx>
 #include <Aircraft/aircraft.hxx>
 #include <Airports/simple.hxx>
 #include <Astro/sky.hxx>
@@ -48,7 +51,6 @@
 #include <Astro/solarsystem.hxx>
 #include <Autopilot/autopilot.hxx>
 #include <Cockpit/cockpit.hxx>
-#include <Debug/logstream.hxx>
 #include <Joystick/joystick.hxx>
 #include <Math/fg_geodesy.hxx>
 #include <Math/fg_random.h>
@@ -65,7 +67,9 @@
 #include "fg_init.hxx"
 #include "options.hxx"
 #include "views.hxx"
+#include "fg_serial.hxx"
 
+FG_USING_STD(string);
 
 extern const char *default_root;
 
@@ -73,7 +77,7 @@ extern const char *default_root;
 // Set initial position and orientation
 int fgInitPosition( void ) {
     string id;
-    FGState *f;
+    FGInterface *f;
 
     f = current_aircraft.fdm_state;
 
@@ -153,11 +157,10 @@ int fgInitGeneral( void ) {
 // Returns non-zero if a problem encountered.
 int fgInitSubsystems( void )
 {
-    FGState *f; // assigned later
+    FGInterface *f; // assigned later
     fgLIGHT *l = &cur_light_params;
     fgTIME *t = &cur_time_params;
     FGView *v = &current_view;
-    Point3D geod_pos, tmp_abs_view_pos;
 
     FG_LOG( FG_GENERAL, FG_INFO, "Initialize Subsystems");
     FG_LOG( FG_GENERAL, FG_INFO, "========== ==========");
@@ -189,30 +192,41 @@ int fgInitSubsystems( void )
        exit(-1);
     }
 
+    FG_LOG( FG_GENERAL, FG_DEBUG, 
+           "Current terrain elevation after tile mgr init " << 
+           scenery.cur_elev );
+
     // Calculate ground elevation at starting point (we didn't have
     // tmp_abs_view_pos calculated when fgTileMgrUpdate() was called above
-
+    //
     // calculalate a cartesian point somewhere along the line between
     // the center of the earth and our view position.  Doesn't have to
     // be the exact elevation (this is good because we don't know it
     // yet :-)
+
+    // now handled inside of the fgTileMgrUpdate()
+
+    /*
     geod_pos = Point3D( f->get_Longitude(), f->get_Latitude(), 0.0);
     tmp_abs_view_pos = fgGeodToCart(geod_pos);
 
-    FG_LOG( FG_GENERAL, FG_DEBUG, 
-           "Altitude before update " << scenery.cur_elev );
     FG_LOG( FG_GENERAL, FG_DEBUG, 
            "Initial abs_view_pos = " << tmp_abs_view_pos );
     scenery.cur_elev = 
-       fgTileMgrCurElevOLD( f->get_Longitude(), 
-                            f->get_Latitude(),
-                            tmp_abs_view_pos );
+       fgTileMgrCurElev( f->get_Longitude(), f->get_Latitude(), 
+                         tmp_abs_view_pos );
     FG_LOG( FG_GENERAL, FG_DEBUG, 
            "Altitude after update " << scenery.cur_elev );
+    */
+
     fgFDMSetGroundElevation( current_options.get_flight_model(), 
                             scenery.cur_elev );
 
     // Reset our altitude if we are below ground
+    FG_LOG( FG_GENERAL, FG_DEBUG, "Current altitude = " << f->get_Altitude() );
+    FG_LOG( FG_GENERAL, FG_DEBUG, "Current runway altitude = " << 
+           f->get_Runway_altitude() );
+
     if ( f->get_Altitude() < f->get_Runway_altitude() + 3.758099) {
        f->set_Altitude( f->get_Runway_altitude() + 3.758099 );
     }
@@ -381,6 +395,39 @@ int fgInitSubsystems( void )
 
 
 // $Log$
+// Revision 1.68  1999/03/02 01:03:15  curt
+// Tweaks for building with native SGI compilers.
+//
+// Revision 1.67  1999/02/26 22:09:48  curt
+// Added initial support for native SGI compilers.
+//
+// Revision 1.66  1999/02/05 21:29:10  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
+// Revision 1.65  1999/02/02 20:13:36  curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG.  Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
+// Revision 1.64  1999/02/01 21:15:43  curt
+// Removed unused variables.
+//
+// Revision 1.63  1999/01/27 04:49:19  curt
+// Game mode fixes from Norman Vine.
+// Initial altitude setting tweaks and fixes (especially for when starting
+// below sea level.)
+//
 // Revision 1.62  1999/01/20 13:42:25  curt
 // Tweaked FDM interface.
 // Testing check sum support for NMEA serial output.