]> git.mxchange.org Git - flightgear.git/commitdiff
Game mode fixes from Norman Vine.
authorcurt <curt>
Wed, 27 Jan 1999 04:49:17 +0000 (04:49 +0000)
committercurt <curt>
Wed, 27 Jan 1999 04:49:17 +0000 (04:49 +0000)
Initial altitude setting tweaks and fixes (especially for when starting
below sea level.)

Main/GLUTmain.cxx
Main/fg_init.cxx

index c4558cb259ec4552fd6b77515fce186a58b5f002..99f3508f91f86e8c0035e7b88b5018e0976ee8ae 100644 (file)
@@ -839,11 +839,14 @@ int fgGlutInit( int *argc, char **argv ) {
        xglutCreateWindow("Flight Gear");
     } else {
        // Open the cool new 'game mode' window
-       string game_mode_params = "width=" + current_options.get_xsize();
-       game_mode_params += "height=" + current_options.get_ysize();
-       game_mode_params += " bpp=16";
-       cout << "game mode params = " << game_mode_params;
-       glutGameModeString( game_mode_params.c_str() );
+       char game_mode_str[256];
+       sprintf( game_mode_str, "width=%d height=%d bpp=16",
+                current_options.get_xsize(),
+                current_options.get_ysize() );
+
+       FG_LOG( FG_GENERAL, FG_INFO, 
+               "game mode params = " << game_mode_str );
+       glutGameModeString( game_mode_str );
        glutEnterGameMode();
     }
 
@@ -1003,6 +1006,11 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.83  1999/01/27 04:49:17  curt
+// Game mode fixes from Norman Vine.
+// Initial altitude setting tweaks and fixes (especially for when starting
+// below sea level.)
+//
 // Revision 1.82  1999/01/20 13:42:24  curt
 // Tweaked FDM interface.
 // Testing check sum support for NMEA serial output.
index 45f00f274af8d01bf7d3fcd2bfc5dae2392b987a..9bb23d5149d73739c10b35044dcad197f08dc88b 100644 (file)
@@ -189,30 +189,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 +392,11 @@ int fgInitSubsystems( void )
 
 
 // $Log$
+// 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.