Fixed some initialization order problems between pui and glut.
Added an --enable/disable-sound option.
case 109: /* m key */
t->warp += 60;
return;
+ case 112: /* p key */
+ t->pause = !t->pause;
+ return;
case 116: /* t key */
t->warp_delta += 30;
return;
/* $Log$
-/* Revision 1.16 1998/07/16 17:33:34 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.17 1998/07/27 18:41:23 curt
+/* Added a pause command "p"
+/* Fixed some initialization order problems between pui and glut.
+/* Added an --enable/disable-sound option.
/*
+ * Revision 1.16 1998/07/16 17:33:34 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.15 1998/07/13 21:01:34 curt
* Wrote access functions for current fgOPTIONS.
*
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(FG_LARCSIM, f, multi_loop);
+ } else {
+ fgFlightModelUpdate(FG_LARCSIM, f, 0);
+ }
// update the view angle
for ( i = 0; i < multi_loop; i++ ) {
// Run audio scheduler
#ifdef ENABLE_AUDIO_SUPPORT
- audio_sched -> update();
+ if ( current_options.get_sound() ) {
+ audio_sched -> update();
+ }
#endif
// redraw display
} 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 ) {
strcat(slfile, "wasp.wav");
s1 = new slSample ( slfile );
- // s1 = new slSample ( "/dos/X-System-HSR/sounds/xp_recip.wav",
- // audio_sched );
printf("Rate = %d Bps = %d Stereo = %d\n",
s1 -> getRate(), s1 -> getBps(), s1 -> getStereo());
audio_sched -> loopSample ( s1 );
// audio_sched -> playSample ( s2 );
#endif
- sleep(1);
+ // sleep(1);
idle_state = 1000;
}
current_options.usage();
fgPrintf( FG_GENERAL, FG_EXIT, "\nExiting ...\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.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.
//
// FG_Runway_altitude = 920.0;
// FG_Altitude = FG_Runway_altitude + 3.758099;
- // probably interesting for european team members
- // That is: If I can get the scenery to work -;) (Durk)
+ // Initial Position: Huaras, Peru (S09d 31.871' W077d 31.498')
+ // FG_Longitude = ( -77.5249667 ) * DEG_TO_RAD;
+ // FG_Latitude = ( -9.5311833 ) * DEG_TO_RAD;
+ // FG_Runway_altitude = 0.0;
+ // FG_Altitude = FG_Runway_altitude + 3.758099;
// Eclipse Watching w73.5 n10 (approx) 18:00 UT
// FG_Longitude = ( -73.5 ) * DEG_TO_RAD;
// $Log$
+// Revision 1.28 1998/07/27 18:41:25 curt
+// Added a pause command "p"
+// Fixed some initialization order problems between pui and glut.
+// Added an --enable/disable-sound option.
+//
// Revision 1.27 1998/07/24 21:39:10 curt
// Debugging output tweaks.
// Cast glGetString to (char *) to avoid compiler errors.
panel_status = 0;
} else if ( strcmp(arg, "--enable-panel") == 0 ) {
panel_status = 1;
+ } else if ( strcmp(arg, "--disable-sound") == 0 ) {
+ sound = 0;
+ } else if ( strcmp(arg, "--enable-sound") == 0 ) {
+ sound = 1;
} else if ( strncmp(arg, "--airport-id=", 13) == 0 ) {
arg += 13;
strncpy(airport_id, arg, 4);
printf("\t--enable-hud: enable heads up display\n");
printf("\t--disable-panel: disable instrument panel\n");
printf("\t--enable-panel: enable instrumetn panel\n");
+ printf("\t--disable-sound: disable sound effects\n");
+ printf("\t--enable-sound: enable sound effects\n");
printf("\n");
printf("Initial Position:\n");
int fgOPTIONS::get_mouse_pointer( void ) { return(mouse_pointer); }
int fgOPTIONS::get_hud_status( void ) { return(hud_status); }
int fgOPTIONS::get_panel_status( void ) { return(panel_status); }
+int fgOPTIONS::get_sound( void ) { return(sound); }
int fgOPTIONS::get_fog( void ) { return(fog); }
double fgOPTIONS::get_fov( void ) { return(fov); }
int fgOPTIONS::get_fullscreen( void ) { return(fullscreen); }
// $Log$
+// Revision 1.19 1998/07/27 18:41:25 curt
+// Added a pause command "p"
+// Fixed some initialization order problems between pui and glut.
+// Added an --enable/disable-sound option.
+//
// Revision 1.18 1998/07/22 01:27:03 curt
// Strip out \r when parsing config file in case we are on a windoze system.
//
// Features
int hud_status; // HUD on/off
int panel_status; // Panel on/off
+ int sound; // play sound effects
// Rendering options
int fog; // Fog enabled/disabled
int get_mouse_pointer( void );
int get_hud_status( void );
int get_panel_status( void );
+ int get_sound( void );
int get_fog( void );
double get_fov( void );
int get_fullscreen( void );
// $Log$
+// Revision 1.12 1998/07/27 18:41:26 curt
+// Added a pause command "p"
+// Fixed some initialization order problems between pui and glut.
+// Added an --enable/disable-sound option.
+//
// Revision 1.11 1998/07/13 21:01:39 curt
// Wrote access functions for current fgOPTIONS.
//