]> git.mxchange.org Git - flightgear.git/blobdiff - Main/GLUTmain.cxx
Modifications to incorporate Jon S. Berndts flight model code.
[flightgear.git] / Main / GLUTmain.cxx
index c4558cb259ec4552fd6b77515fce186a58b5f002..d8d24ac9b2c3036b40798832f3595c4d310aa8da 100644 (file)
@@ -85,6 +85,7 @@
 #include "options.hxx"
 #include "splash.hxx"
 #include "views.hxx"
+#include "fg_serial.hxx"
 
 
 // This is a record containing a bit of global housekeeping information
@@ -370,7 +371,7 @@ static void fgRenderFrame( void ) {
 
 // Update internal time dependent calculations (i.e. flight model)
 void fgUpdateTimeDepCalcs(int multi_loop, int remainder) {
-    FGState *f = current_aircraft.fdm_state;
+    FGInterface *f = current_aircraft.fdm_state;
     fgLIGHT *l = &cur_light_params;
     fgTIME *t = &cur_time_params;
     FGView *v = &current_view;
@@ -450,7 +451,7 @@ static const double alt_adjust_m = alt_adjust_ft * FEET_TO_METER;
 // What should we do when we have nothing else to do?  Let's get ready
 // for the next move and update the display?
 static void fgMainLoop( void ) {
-    FGState *f;
+    FGInterface *f;
     fgTIME *t;
     static long remainder = 0;
     long elapsed, multi_loop;
@@ -739,7 +740,7 @@ static void fgIdleFunction ( void ) {
 
        audio_sched = new slScheduler ( 8000 );
        audio_mixer = new smMixer;
-       audio_mixer -> setMasterVolume ( 50 ) ;  /* 80% of max volume. */
+       audio_mixer -> setMasterVolume ( 80 ) ;  /* 80% of max volume. */
        audio_sched -> setSafetyMargin ( 1.0 ) ;
        string slfile = current_options.get_fg_root() + "/Sounds/wasp.wav";
 
@@ -839,11 +840,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();
     }
 
@@ -923,7 +927,7 @@ int fgGlutInitEvents( void ) {
 
 // Main ...
 int main( int argc, char **argv ) {
-    FGState *f;
+    FGInterface *f;
 
     f = current_aircraft.fdm_state;
 
@@ -965,8 +969,8 @@ int main( int argc, char **argv ) {
        // Something must have gone horribly wrong with the command
        // line parsing or maybe the user just requested help ... :-)
        current_options.usage();
-       // FG_LOG( FG_GENERAL, FG_ALERT, "\nExiting ...");
-       cout << endl << "Exiting ..." << endl;
+       FG_LOG( FG_GENERAL, FG_ALERT, "\nExiting ...");
+       // cout << endl << "Exiting ..." << endl;
        exit(-1);
     }
     
@@ -1003,6 +1007,30 @@ int main( int argc, char **argv ) {
 
 
 // $Log$
+// Revision 1.85  1999/02/05 21:29:08  curt
+// Modifications to incorporate Jon S. Berndts flight model code.
+//
+// Revision 1.84  1999/02/02 20:13:34  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.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.