#include <sys/stat.h> /* for stat() */
#ifdef HAVE_UNISTD_H
-# include <unistd.h> /* for stat() */
+# include <unistd.h> /* for stat() */
#endif
#include <Include/fg_constants.h> // for VERSION
#include <Astro/stars.hxx>
#include <Astro/sun.hxx>
-#ifdef HAVE_AUDIO_SUPPORT
+#ifdef ENABLE_AUDIO_SUPPORT
# include <Audio/src/sl.h>
# include <Audio/src/sm.h>
#endif
#include <Joystick/joystick.h>
#include <Math/fg_geodesy.h>
#include <Math/mat3.h>
-#include <Math/polar3d.h>
+#include <Math/polar3d.hxx>
#include <PUI/pu.h>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
int use_signals = 0;
// Global structures for the Audio library
-#ifdef HAVE_AUDIO_SUPPORT
-slScheduler audio_sched ( 8000 );
-smMixer audio_mixer;
+#ifdef ENABLE_AUDIO_SUPPORT
+slScheduler *audio_sched;
+smMixer *audio_mixer;
slSample *s1;
slSample *s2;
#endif
// fgInitVisuals() -- Initialize various GL/view parameters
static void fgInitVisuals( void ) {
fgLIGHT *l;
- fgOPTIONS *o;
struct fgWEATHER *w;
l = &cur_light_params;
- o = ¤t_options;
w = ¤t_weather;
// Go full screen if requested ...
- if ( o->fullscreen ) {
+ if ( current_options.get_fullscreen() ) {
glutFullScreen();
}
// If enabled, normal vectors specified with glNormal are scaled
// to unit length after transformation. See glNormal.
- xglEnable( GL_NORMALIZE );
+ // xglEnable( GL_NORMALIZE );
xglEnable( GL_LIGHTING );
xglEnable( GL_LIGHT0 );
xglFogi (GL_FOG_MODE, GL_EXP2);
// Fog density is now set when the weather system is initialized
// xglFogf (GL_FOG_DENSITY, w->fog_density);
- if ( (o->fog == 1) || (o->shading == 0) ) {
+ if ( (current_options.get_fog() == 1) ||
+ (current_options.get_shading() == 0) ) {
// if fastest fog requested, or if flat shading force fastest
- xglHint (GL_FOG_HINT, GL_FASTEST );
- } else if ( o->fog == 2 ) {
- xglHint (GL_FOG_HINT, GL_NICEST );
+ xglHint ( GL_FOG_HINT, GL_FASTEST );
+ } else if ( current_options.get_fog() == 2 ) {
+ xglHint ( GL_FOG_HINT, GL_NICEST );
}
- if ( o->wireframe ) {
+ if ( current_options.get_wireframe() ) {
// draw wire frame
xglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
}
// This is the default anyways, but it can't hurt
xglFrontFace ( GL_CCW );
-}
-
-
-// Update the view volume, position, and orientation
-static void fgUpdateViewParams( void ) {
- fgFLIGHT *f;
- fgLIGHT *l;
- fgOPTIONS *o;
- fgVIEW *v;
-
- f = current_aircraft.flight;
- l = &cur_light_params;
- o = ¤t_options;
- v = ¤t_view;
- v->Update(f);
- v->UpdateWorldToEye(f);
-
- // if (!o->panel_status) {
- // xglViewport( 0, (GLint)((v->winHeight) / 2 ) ,
- // (GLint)(v->winWidth), (GLint)(v->winHeight) / 2 );
- // Tell GL we are about to modify the projection parameters
- // xglMatrixMode(GL_PROJECTION);
- // xglLoadIdentity();
- // gluPerspective(o->fov, v->win_ratio / 2.0, 1.0, 100000.0);
- // } else {
- xglViewport(0, 0 , (GLint)(v->winWidth), (GLint)(v->winHeight) );
- // Tell GL we are about to modify the projection parameters
- xglMatrixMode(GL_PROJECTION);
- xglLoadIdentity();
- gluPerspective(o->fov, v->win_ratio, 10.0, 100000.0);
- // }
-
- xglMatrixMode(GL_MODELVIEW);
- xglLoadIdentity();
-
- // set up our view volume (default)
- fg_gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
- v->view_pos.x + v->view_forward[0],
- v->view_pos.y + v->view_forward[1],
- v->view_pos.z + v->view_forward[2],
- v->view_up[0], v->view_up[1], v->view_up[2]);
-
- // look almost straight up (testing and eclipse watching)
- /* fg_gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
- v->view_pos.x + v->view_up[0] + .001,
- v->view_pos.y + v->view_up[1] + .001,
- v->view_pos.z + v->view_up[2] + .001,
- v->view_up[0], v->view_up[1], v->view_up[2]); */
-
- // lock view horizontally towards sun (testing)
- /* fg_gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
- v->view_pos.x + v->surface_to_sun[0],
- v->view_pos.y + v->surface_to_sun[1],
- v->view_pos.z + v->surface_to_sun[2],
- v->view_up[0], v->view_up[1], v->view_up[2]); */
-
- // lock view horizontally towards south (testing)
- /* fg_gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
- v->view_pos.x + v->surface_south[0],
- v->view_pos.y + v->surface_south[1],
- v->view_pos.z + v->surface_south[2],
- v->view_up[0], v->view_up[1], v->view_up[2]); */
-
- // set the sun position
- xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
+ // Just testing ...
+ // xglEnable(GL_POINT_SMOOTH);
+ // xglEnable(GL_LINE_SMOOTH);
+ // xglEnable(GL_POLYGON_SMOOTH);
}
-#ifdef 0
+#ifdef IS_THIS_BETTER_THAN_A_ZERO_CHARLIE
// Draw a basic instrument panel
static void fgUpdateInstrViewParams( void ) {
// Update all Visuals (redraws anything graphics related)
static void fgRenderFrame( void ) {
+ fgFLIGHT *f;
fgLIGHT *l;
- fgOPTIONS *o;
fgTIME *t;
fgVIEW *v;
double angle;
- GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 };
+ // GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat terrain_color[4] = { 0.54, 0.44, 0.29, 1.0 };
-
+ GLbitfield clear_mask;
+
+ f = current_aircraft.flight;
l = &cur_light_params;
- o = ¤t_options;
t = &cur_time_params;
v = ¤t_view;
if ( idle_state != 1000 ) {
// still initializing, draw the splash screen
- if ( o->splash_screen == 1 ) {
+ if ( current_options.get_splash_screen() == 1 ) {
fgSplashUpdate(0.0);
}
} else {
// initializations and are running the main loop, so this will
// now work without seg faulting the system.
+ // printf("Ground = %.2f Altitude = %.2f\n", scenery.cur_elev,
+ // FG_Altitude * FEET_TO_METER);
+
// this is just a temporary hack, to make me understand Pui
- timerText -> setLabel (ctime (&t->cur_time));
+ // timerText -> setLabel (ctime (&t->cur_time));
// end of hack
// update view volume parameters
- fgUpdateViewParams();
+ v->UpdateViewParams();
- if ( o->skyblend ) {
- glClearColor(black[0], black[1], black[2], black[3]);
- xglClear( GL_DEPTH_BUFFER_BIT );
+ clear_mask = GL_DEPTH_BUFFER_BIT;
+ if ( current_options.get_wireframe() ) {
+ clear_mask |= GL_COLOR_BUFFER_BIT;
+ }
+ if ( current_options.get_skyblend() ) {
+ if ( current_options.get_textures() ) {
+ // glClearColor(black[0], black[1], black[2], black[3]);
+ glClearColor(l->adj_fog_color[0], l->adj_fog_color[1],
+ l->adj_fog_color[2], l->adj_fog_color[3]);
+ clear_mask |= GL_COLOR_BUFFER_BIT;
+ }
} else {
glClearColor(l->sky_color[0], l->sky_color[1],
l->sky_color[2], l->sky_color[3]);
- xglClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
+ clear_mask |= GL_COLOR_BUFFER_BIT;
}
+ xglClear( clear_mask );
// Tell GL we are switching to model view parameters
xglMatrixMode(GL_MODELVIEW);
xglDisable( GL_CULL_FACE );
xglDisable( GL_FOG );
xglShadeModel( GL_SMOOTH );
- if ( o->skyblend ) {
+ if ( current_options.get_skyblend() ) {
fgSkyRender();
}
// render the moon
xglEnable( GL_LIGHTING );
+ xglEnable( GL_LIGHT0 );
// set lighting parameters
xglLightfv(GL_LIGHT0, GL_AMBIENT, white );
xglLightfv(GL_LIGHT0, GL_DIFFUSE, white );
xglPopMatrix();
// draw scenery
- if ( o->shading ) {
+ if ( current_options.get_shading() ) {
xglShadeModel( GL_SMOOTH );
} else {
xglShadeModel( GL_FLAT );
}
xglEnable( GL_DEPTH_TEST );
- if ( o->fog > 0 ) {
+ if ( current_options.get_fog() > 0 ) {
xglEnable( GL_FOG );
- xglFogfv (GL_FOG_COLOR, l->fog_color);
+ xglFogfv (GL_FOG_COLOR, l->adj_fog_color);
}
// set lighting parameters
xglLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_ambient );
xglLightfv(GL_LIGHT0, GL_DIFFUSE, l->scene_diffuse );
- if ( o->textures ) {
+ if ( current_options.get_textures() ) {
// texture parameters
xglEnable( GL_TEXTURE_2D );
+ xglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ) ;
+ xglHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ) ;
// set base color (I don't think this is doing anything here)
xglMaterialfv (GL_FRONT, GL_AMBIENT, white);
xglMaterialfv (GL_FRONT, GL_DIFFUSE, white);
// if (!o->panel_status) {
// fgUpdateInstrViewParams();
// }
+
+ // We can do translucent menus, so why not. :-)
+ xglEnable ( GL_BLEND ) ;
+ xglBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
puDisplay();
+ xglDisable ( GL_BLEND ) ;
}
xglutSwapBuffers();
// Update internal time dependent calculations (i.e. flight model)
void fgUpdateTimeDepCalcs(int multi_loop) {
fgFLIGHT *f;
+ fgLIGHT *l;
fgTIME *t;
fgVIEW *v;
int i;
f = current_aircraft.flight;
+ l = &cur_light_params;
t = &cur_time_params;
v = ¤t_view;
multi_loop = DEFAULT_MULTILOOP;
}
- // printf("updating flight model x %d\n", multi_loop);
- fgFlightModelUpdate(FG_LARCSIM, f, multi_loop);
+ if ( !t->pause ) {
+ // printf("updating flight model x %d\n", multi_loop);
+ fgFlightModelUpdate(current_options.get_flight_model(), f, multi_loop);
+ } else {
+ fgFlightModelUpdate(current_options.get_flight_model(), f, 0);
+ }
// update the view angle
for ( i = 0; i < multi_loop; i++ ) {
}
}
}
+
+ double tmp = -(l->sun_rotation + FG_PI) - (FG_Psi - v->view_offset);
+ while ( tmp < 0.0 ) {
+ tmp += FG_2PI;
+ }
+ while ( tmp > FG_2PI ) {
+ tmp -= FG_2PI;
+ }
+ /* printf("Psi = %.2f, viewoffset = %.2f sunrot = %.2f rottosun = %.2f\n",
+ FG_Psi * RAD_TO_DEG, v->view_offset * RAD_TO_DEG,
+ -(l->sun_rotation+FG_PI) * RAD_TO_DEG, tmp * RAD_TO_DEG); */
+ l->UpdateAdjFog();
}
// 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 ) {
- fgAIRCRAFT *a;
fgFLIGHT *f;
fgGENERAL *g;
fgTIME *t;
static int remainder = 0;
int elapsed, multi_loop;
- double cur_elev;
int i;
double accum;
// double joy_x, joy_y;
// int joy_b1, joy_b2;
- a = ¤t_aircraft;
- f = a->flight;
+ f = current_aircraft.flight;
g = &general;
t = &cur_time_params;
fgPrintf( FG_ALL, FG_DEBUG, "Running Main Loop\n");
fgPrintf( FG_ALL, FG_DEBUG, "======= ==== ====\n");
+ // Fix elevation. I'm just sticking this here for now, it should
+ // probably move eventually
+
+ /* printf("Before - ground = %.2f runway = %.2f alt = %.2f\n",
+ scenery.cur_elev,
+ FG_Runway_altitude * FEET_TO_METER,
+ FG_Altitude * FEET_TO_METER); */
+
+ if ( scenery.cur_elev > -9990 ) {
+ if ( FG_Altitude * FEET_TO_METER <
+ (scenery.cur_elev + 3.758099 * FEET_TO_METER - 3.0) ) {
+ // now set aircraft altitude above ground
+ printf("Current Altitude = %.2f < %.2f forcing to %.2f\n",
+ FG_Altitude * FEET_TO_METER,
+ scenery.cur_elev + 3.758099 * FEET_TO_METER - 3.0,
+ scenery.cur_elev + 3.758099 * FEET_TO_METER);
+ fgFlightModelSetAltitude( current_options.get_flight_model(), f,
+ scenery.cur_elev +
+ 3.758099 * FEET_TO_METER);
+
+ fgPrintf( FG_ALL, FG_BULK,
+ "<*> resetting altitude to %.0f meters\n",
+ FG_Altitude * FEET_TO_METER);
+ }
+ FG_Runway_altitude = scenery.cur_elev * METER_TO_FEET;
+ }
+
+ /* printf("Adjustment - ground = %.2f runway = %.2f alt = %.2f\n",
+ scenery.cur_elev,
+ FG_Runway_altitude * FEET_TO_METER,
+ FG_Altitude * FEET_TO_METER); */
+
// update "time"
fgTimeUpdate(f, t);
"Model iterations needed = %d, new remainder = %d\n",
multi_loop, remainder);
+ /* printf("right before fm - ground = %.2f runway = %.2f alt = %.2f\n",
+ scenery.cur_elev,
+ FG_Runway_altitude * FEET_TO_METER,
+ FG_Altitude * FEET_TO_METER); */
+
// Run flight model
if ( ! use_signals ) {
// flight model
fgUpdateTimeDepCalcs(multi_loop);
}
- // I'm just sticking this here for now, it should probably move
- // eventually
- /* cur_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC,
- FG_Latitude * RAD_TO_ARCSEC); */
- // there is no ground collision detection really, so for now I
- // just hard code the ground elevation to be 0 */
- cur_elev = 0;
-
- // printf("Ground elevation is %.2f meters here.\n", cur_elev);
- // FG_Runway_altitude = cur_elev * METER_TO_FEET;
-
- if ( FG_Altitude * FEET_TO_METER < cur_elev + 3.758099) {
- // set this here, otherwise if we set runway height above our
- // current height we get a really nasty bounce.
- FG_Runway_altitude = FG_Altitude - 3.758099;
-
- // now set aircraft altitude above ground
- FG_Altitude = cur_elev * METER_TO_FEET + 3.758099;
- fgPrintf( FG_ALL, FG_BULK, "<*> resetting altitude to %.0f meters\n",
- FG_Altitude * FEET_TO_METER);
- }
+ /* printf("After fm - ground = %.2f runway = %.2f alt = %.2f\n",
+ scenery.cur_elev,
+ FG_Runway_altitude * FEET_TO_METER,
+ FG_Altitude * FEET_TO_METER); */
- fgAircraftOutputCurrent(a);
+ // fgAircraftOutputCurrent(a);
// see if we need to load any new scenery tiles
fgTileMgrUpdate();
global_events.Process();
// Run audio scheduler
-#ifdef HAVE_AUDIO_SUPPORT
- audio_sched . update();
+#ifdef ENABLE_AUDIO_SUPPORT
+ if ( current_options.get_sound() ) {
+ audio_sched -> update();
+ }
#endif
// redraw display
static void fgIdleFunction ( void ) {
fgGENERAL *g;
- fgOPTIONS *o;
char path[256], mp3file[256], command[256], slfile[256];
static char *lockfile = "/tmp/mpg123.running";
g = &general;
- o = ¤t_options;
// printf("idle state == %d\n", idle_state);
if ( idle_state == 0 ) {
// Initialize the splash screen right away
- if ( o->splash_screen ) {
+ if ( current_options.get_splash_screen() ) {
fgSplashInit();
}
} else if ( idle_state == 1 ) {
// Start the intro music
#if !defined(WIN32)
- if ( o->intro_music ) {
- strcpy(mp3file, o->fg_root);
+ if ( current_options.get_intro_music() ) {
+ current_options.get_fg_root(mp3file);
strcat(mp3file, "/Sounds/");
strcat(mp3file, "intro.mp3");
+
sprintf(command,
- "(touch %s; ampg123 %s > /dev/null 2>&1; /bin/rm %s) &",
+ "(touch %s; mpg123 %s > /dev/null 2>&1; /bin/rm %s) &",
lockfile, mp3file, lockfile );
fgPrintf( FG_GENERAL, FG_INFO,
"Starting intro music: %s\n", mp3file);
- system(command);
+ system ( command );
}
#endif
} else if ( idle_state == 2 ) {
// These are a few miscellaneous things that aren't really
// "subsystems" but still need to be initialized.
- if( !fgInitGeneral()) {
- fgPrintf( FG_GENERAL, FG_EXIT,
- "General initializations failed ...\n" );
- }
+
#ifdef USE_GLIDE
if ( strstr ( g->glRenderer, "Glide" ) ) {
grTexLodBiasValue ( GR_TMU0, 1.0 ) ;
idle_state++;
} else if ( idle_state == 5 ) {
- //Init the user interface
- guiInit();
idle_state++;
} else if ( idle_state == 6 ) {
// Initialize audio support
-#ifdef HAVE_AUDIO_SUPPORT
+#ifdef ENABLE_AUDIO_SUPPORT
#if !defined(WIN32)
- if ( o->intro_music ) {
+ if ( current_options.get_intro_music() ) {
// Let's wait for mpg123 to finish
struct stat stat_buf;
fgPrintf( FG_GENERAL, FG_INFO,
- "Waiting for mpg123 player to finish " );
+ "Waiting for mpg123 player to finish ...\n" );
while ( stat(lockfile, &stat_buf) == 0 ) {
// file exist, wait ...
sleep(1);
}
#endif // WIN32
- // audio_sched = new slScheduler ( 8000 );
- // audio_mixer = new smMixer;
- audio_mixer . setMasterVolume ( 30 ) ; /* 50% of max volume. */
- audio_sched . setSafetyMargin ( 1.0 ) ;
- strcpy(path, o->fg_root);
+ audio_sched = new slScheduler ( 8000 );
+ audio_mixer = new smMixer;
+ audio_mixer -> setMasterVolume ( 80 ) ; /* 80% of max volume. */
+ audio_sched -> setSafetyMargin ( 1.0 ) ;
+ current_options.get_fg_root(path);
strcat(path, "/Sounds/");
-
strcpy(slfile, path);
- strcat(slfile, "prpidle.wav");
- // s1 = new slSample ( slfile );
- s1 = new slSample ( "/dos/X-System-HSR/sounds/xp_recip.wav",
- &audio_sched );
+ strcat(slfile, "wasp.wav");
+
+ s1 = new slSample ( slfile );
printf("Rate = %d Bps = %d Stereo = %d\n",
s1 -> getRate(), s1 -> getBps(), s1 -> getStereo());
- audio_sched . loopSample ( s1 );
+ audio_sched -> loopSample ( s1 );
// strcpy(slfile, path);
// strcat(slfile, "thunder.wav");
// audio_sched -> playSample ( s2 );
#endif
- sleep(1);
+ // sleep(1);
idle_state = 1000;
}
fgMainLoop();
} else {
- if ( o->splash_screen == 1 ) {
+ if ( current_options.get_splash_screen() == 1 ) {
fgSplashUpdate(0.0);
}
}
// yes we've finished all our initializations and are running
// the main loop, so this will now work without seg faulting
// the system.
- fgUpdateViewParams();
+ v->UpdateViewParams();
}
// xglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
xglutInitWindowSize(640, 480);
// Initialize windows
- xglutCreateWindow("Flight Gear");
+ if ( current_options.get_game_mode() == 0 ) {
+ // Open the regular window
+ xglutCreateWindow("Flight Gear");
+ } else {
+ // Open the cool new 'game mode' window
+ glutGameModeString("width=640 height=480 bpp=16");
+ glutEnterGameMode();
+ }
return(1);
}
// Main ...
int main( int argc, char **argv ) {
fgFLIGHT *f;
- fgOPTIONS *o;
char config[256];
int result; // Used in command line argument.
f = current_aircraft.flight;
- o = ¤t_options;
#ifdef HAVE_BC5PLUS
_control87(MCW_EM, MCW_EM); /* defined in float.h */
fgPrintf(FG_GENERAL, FG_INFO, "Flight Gear: Version %s\n\n", VERSION);
- // Initialize the Window/Graphics environment.
- if( !fgGlutInit(&argc, argv) ) {
- fgPrintf( FG_GENERAL, FG_EXIT, "GLUT initialization failed ...\n" );
- }
-
- // Initialize the various GLUT Event Handlers.
- if( !fgGlutInitEvents() ) {
- fgPrintf( FG_GENERAL, FG_EXIT,
- "GLUT event handler initialization failed ...\n" );
- }
-
// Attempt to locate and parse a config file
// First check fg_root
- strcpy(config, o->fg_root);
+ current_options.get_fg_root(config);
strcat(config, "/system.fgfsrc");
- result = o->parse_config_file(config);
+ result = current_options.parse_config_file(config);
// Next check home directory
if ( getenv("HOME") != NULL ) {
strcpy(config, getenv("HOME"));
strcat(config, "/.fgfsrc");
- result = o->parse_config_file(config);
+ result = current_options.parse_config_file(config);
}
// Parse remaining command line options
// These will override anything specified in a config file
- result = o->parse_command_line(argc, argv);
+ result = current_options.parse_command_line(argc, argv);
if ( result != FG_OPTIONS_OK ) {
// Something must have gone horribly wrong with the command
// line parsing or maybe the user just requested help ... :-)
- o->usage();
+ current_options.usage();
fgPrintf( FG_GENERAL, FG_EXIT, "\nExiting ...\n");
}
+
+ // Initialize the Window/Graphics environment.
+ if( !fgGlutInit(&argc, argv) ) {
+ fgPrintf( FG_GENERAL, FG_EXIT, "GLUT initialization failed ...\n" );
+ }
+
+ // Initialize the various GLUT Event Handlers.
+ if( !fgGlutInitEvents() ) {
+ fgPrintf( FG_GENERAL, FG_EXIT,
+ "GLUT event handler initialization failed ...\n" );
+ }
+
+ // First do some quick general initializations
+ if( !fgInitGeneral()) {
+ fgPrintf( FG_GENERAL, FG_EXIT,
+ "General initializations failed ...\n" );
+ }
+
+ // Init the user interface (we need to do this before passing off
+ // control to glut
+ guiInit();
// pass control off to the master GLUT event handler
glutMainLoop();
// $Log$
+// Revision 1.46 1998/08/22 14:49:56 curt
+// Attempting to iron out seg faults and crashes.
+// Did some shuffling to fix a initialization order problem between view
+// position, scenery elevation.
+//
+// Revision 1.45 1998/08/20 20:32:31 curt
+// Reshuffled some of the code in and around views.[ch]xx
+//
+// Revision 1.44 1998/08/20 15:10:33 curt
+// Added GameGLUT support.
+//
+// Revision 1.43 1998/08/12 21:01:47 curt
+// Master volume from 30% -> 80%
+//
+// Revision 1.42 1998/07/30 23:48:25 curt
+// Output position & orientation when pausing.
+// Eliminated libtool use.
+// Added options to specify initial position and orientation.
+// Changed default fov to 55 degrees.
+// Added command line option to start in paused or unpaused state.
+//
+// Revision 1.41 1998/07/27 18:41:24 curt
+// Added a pause command "p"
+// Fixed some initialization order problems between pui and glut.
+// Added an --enable/disable-sound option.
+//
+// Revision 1.40 1998/07/24 21:56:59 curt
+// Set near clip plane to 0.5 meters when close to the ground. Also, let the view get a bit closer to the ground before hitting the hard limit.
+//
+// Revision 1.39 1998/07/24 21:39:08 curt
+// Debugging output tweaks.
+// Cast glGetString to (char *) to avoid compiler errors.
+// Optimizations to fgGluLookAt() by Norman Vine.
+//
+// Revision 1.38 1998/07/22 21:40:43 curt
+// Clear to adjusted fog color (for sunrise/sunset effects)
+// Make call to fog sunrise/sunset adjustment method.
+// Add a stdc++ library bug work around to fg_init.cxx
+//
+// Revision 1.37 1998/07/20 12:49:44 curt
+// Tweaked color buffer clearing defaults. We clear the color buffer if we
+// are doing textures. Assumptions: If we are doing textures we have hardware
+// support that can clear the color buffer for "free." If we are doing software
+// rendering with textures, then the extra clear time gets lost in the noise.
+//
+// Revision 1.36 1998/07/16 17:33:35 curt
+// "H" / "h" now control hud brightness as well with off being one of the
+// states.
+// Better checking for xmesa/fx 3dfx fullscreen/window support for deciding
+// whether or not to build in the feature.
+// Translucent menu support.
+// HAVE_AUDIO_SUPPORT -> ENABLE_AUDIO_SUPPORT
+// Use fork() / wait() for playing mp3 init music in background under unix.
+// Changed default tile diameter to 5.
+//
+// Revision 1.35 1998/07/13 21:01:36 curt
+// Wrote access functions for current fgOPTIONS.
+//
+// Revision 1.34 1998/07/13 15:32:37 curt
+// Clear color buffer if drawing wireframe.
+// When specifying and airport, start elevation at -1000 and let the system
+// position you at ground level.
+//
+// Revision 1.33 1998/07/12 03:14:42 curt
+// Added ground collision detection.
+// Did some serious horsing around to be able to "hug" the ground properly
+// and still be able to take off.
+// Set the near clip plane to 1.0 meters when less than 10 meters above the
+// ground.
+// Did some serious horsing around getting the initial airplane position to be
+// correct based on rendered terrain elevation.
+// Added a little cheat/hack that will prevent the view position from ever
+// dropping below the terrain, even when the flight model doesn't quite
+// put you as high as you'd like.
+//
+// Revision 1.32 1998/07/08 14:45:07 curt
+// polar3d.h renamed to polar3d.hxx
+// vector.h renamed to vector.hxx
+// updated audio support so it waits to create audio classes (and tie up
+// /dev/dsp) until the mpg123 player is finished.
+//
// Revision 1.31 1998/07/06 21:34:17 curt
// Added an enable/disable splash screen option.
// Added an enable/disable intro music option.