Added an enable/disable intro music option.
Added an enable/disable instrument panel option.
Added an enable/disable mouse pointer option.
Added using namespace std for compilers that support this.
if ( idle_state != 1000 ) {
// still initializing, draw the splash screen
- fgSplashUpdate(0.0);
+ if ( o->splash_screen == 1 ) {
+ fgSplashUpdate(0.0);
+ }
} else {
// idle_state is now 1000 meaning we've finished all our
// initializations and are running the main loop, so this will
if ( idle_state == 0 ) {
// Initialize the splash screen right away
- fgSplashInit();
+ if ( o->splash_screen ) {
+ fgSplashInit();
+ }
idle_state++;
} else if ( idle_state == 1 ) {
// Start the intro music
-#ifndef WIN32
- strcpy(mp3file, o->fg_root);
- strcat(mp3file, "/Sounds/");
- strcat(mp3file, "intro.mp3");
- sprintf(command,
- "(touch %s; ampg123 %s > /dev/null 2>&1; /bin/rm %s) &",
- lockfile, mp3file, lockfile );
- fgPrintf( FG_GENERAL, FG_INFO,
- "Starting intro music: %s\n", mp3file);
- system(command);
+#if !defined(WIN32)
+ if ( o->intro_music ) {
+ strcpy(mp3file, o->fg_root);
+ strcat(mp3file, "/Sounds/");
+ strcat(mp3file, "intro.mp3");
+ sprintf(command,
+ "(touch %s; ampg123 %s > /dev/null 2>&1; /bin/rm %s) &",
+ lockfile, mp3file, lockfile );
+ fgPrintf( FG_GENERAL, FG_INFO,
+ "Starting intro music: %s\n", mp3file);
+ system(command);
+ }
#endif
idle_state++;
// Initialize audio support
#ifdef HAVE_AUDIO_SUPPORT
-#ifndef WIN32
- // Let's wait for mpg123 to finish
- struct stat stat_buf;
-
- fgPrintf( FG_GENERAL, FG_INFO,
- "Waiting for mpg123 player to finish " );
- while ( stat(lockfile, &stat_buf) == 0 ) {
- // file exist, wait ...
- sleep(1);
- fgPrintf( FG_GENERAL, FG_INFO, ".");
+#if !defined(WIN32)
+ if ( o->intro_music ) {
+ // Let's wait for mpg123 to finish
+ struct stat stat_buf;
+
+ fgPrintf( FG_GENERAL, FG_INFO,
+ "Waiting for mpg123 player to finish " );
+ while ( stat(lockfile, &stat_buf) == 0 ) {
+ // file exist, wait ...
+ sleep(1);
+ fgPrintf( FG_GENERAL, FG_INFO, ".");
+ }
+ fgPrintf( FG_GENERAL, FG_INFO, "\n");
}
- fgPrintf( FG_GENERAL, FG_INFO, "\n");
#endif // WIN32
// audio_sched = new slScheduler ( 8000 );
fgMainLoop();
} else {
- fgSplashUpdate(0.0);
+ if ( o->splash_screen == 1 ) {
+ fgSplashUpdate(0.0);
+ }
}
}
// $Log$
+// Revision 1.31 1998/07/06 21:34:17 curt
+// Added an enable/disable splash screen option.
+// Added an enable/disable intro music option.
+// Added an enable/disable instrument panel option.
+// Added an enable/disable mouse pointer option.
+// Added using namespace std for compilers that support this.
+//
// Revision 1.30 1998/07/06 02:42:03 curt
// Added support for switching between fullscreen and window mode for
// Mesa/3dfx/glide.
#include <string> // Standard C++ string library
#include <map> // STL associative "array"
+#ifdef NEEDNAMESPACESTD
+using namespace std;
+#endif
typedef struct {
// $Log$
+// Revision 1.6 1998/07/06 21:34:19 curt
+// Added an enable/disable splash screen option.
+// Added an enable/disable intro music option.
+// Added an enable/disable instrument panel option.
+// Added an enable/disable mouse pointer option.
+// Added using namespace std for compilers that support this.
+//
// Revision 1.5 1998/06/17 21:35:11 curt
// Refined conditional audio support compilation.
// Moved texture parameter setup calls to ../Scenery/materials.cxx
// default airport id
strcpy(airport_id, "");
+ // Miscellaneous
+ splash_screen = 1;
+ intro_music = 1;
+ mouse_pointer = 0;
+
// Features
hud_status = 1;
panel_status = 0;
arg++;
}
- printf("parse_int(): arg = %s\n", arg);
+ // printf("parse_int(): arg = %s\n", arg);
result = atoi(arg);
- printf("parse_int(): result = %d\n", result);
+ // printf("parse_int(): result = %d\n", result);
return(result);
}
if ( radius < FG_RADIUS_MIN ) { radius = FG_RADIUS_MIN; }
if ( radius > FG_RADIUS_MAX ) { radius = FG_RADIUS_MAX; }
- printf("parse_tile_radius(): radius = %d\n", radius);
+ // printf("parse_tile_radius(): radius = %d\n", radius);
return(radius);
}
(strcmp(arg, "-h") == 0) ) {
// help/usage request
return(FG_OPTIONS_HELP);
+ } else if ( strcmp(arg, "--disable-splash-screen") == 0 ) {
+ splash_screen = 0;
+ } else if ( strcmp(arg, "--enable-splash-screen") == 0 ) {
+ splash_screen = 1;
+ } else if ( strcmp(arg, "--disable-intro-music") == 0 ) {
+ intro_music = 0;
+ } else if ( strcmp(arg, "--enable-intro-music") == 0 ) {
+ intro_music = 1;
+ } else if ( strcmp(arg, "--disable-mouse-pointer") == 0 ) {
+ mouse_pointer = 1;
+ } else if ( strcmp(arg, "--enable-mouse-pointer") == 0 ) {
+ mouse_pointer = 2;
} else if ( strcmp(arg, "--disable-hud") == 0 ) {
hud_status = 0;
} else if ( strcmp(arg, "--enable-hud") == 0 ) {
hud_status = 1;
+ } else if ( strcmp(arg, "--disable-panel") == 0 ) {
+ panel_status = 0;
+ } else if ( strcmp(arg, "--enable-panel") == 0 ) {
+ panel_status = 1;
} else if ( strncmp(arg, "--airport-id=", 13) == 0 ) {
arg += 13;
strncpy(airport_id, arg, 4);
fgPrintf(FG_GENERAL, FG_INFO, "Processing command line arguments\n");
while ( i < argc ) {
- fgPrintf(FG_GENERAL, FG_INFO, "argv[%d] = %s\n", i, argv[i]);
+ fgPrintf(FG_GENERAL, FG_DEBUG, "argv[%d] = %s\n", i, argv[i]);
result = parse_option(argv[i]);
if ( (result == FG_OPTIONS_HELP) || (result == FG_OPTIONS_ERROR) ) {
printf("General Options:\n");
printf("\t--help -h: print usage\n");
printf("\t--fg-root=path: specify the root path for all the data files\n");
+ printf("\t--disable-splash-screen: disable splash screen\n");
+ printf("\t--enable-splash-screen: enable splash screen\n");
+ printf("\t--disable-intro-music: disable introduction music\n");
+ printf("\t--enable-intro-music: enable introduction music\n");
+ printf("\t--disable-mouse-pointer: disable extra mouse pointer\n");
+ printf("\t--enable-mouse-pointer: enable extra mouse pointer (i.e. for\n");
+ printf("\t\tfull screen voodoo/voodoo-II based cards.\n");
printf("\n");
printf("Features:\n");
printf("\t--disable-hud: disable heads up display\n");
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("\n");
printf("Initial Position:\n");
// $Log$
+// Revision 1.15 1998/07/06 21:34:19 curt
+// Added an enable/disable splash screen option.
+// Added an enable/disable intro music option.
+// Added an enable/disable instrument panel option.
+// Added an enable/disable mouse pointer option.
+// Added using namespace std for compilers that support this.
+//
// Revision 1.14 1998/07/04 00:52:26 curt
// Add my own version of gluLookAt() (which is nearly identical to the
// Mesa/glu version.) But, by calculating the Model View matrix our selves
// ID of initial starting airport
char airport_id[5];
+ // Miscellaneous
+ int splash_screen; // show splash screen
+ int intro_music; // play introductory music
+ int mouse_pointer; // show mouse pointer
+
// Features
int hud_status; // HUD on/off
int panel_status; // Panel on/off
// $Log$
+// Revision 1.10 1998/07/06 21:34:20 curt
+// Added an enable/disable splash screen option.
+// Added an enable/disable intro music option.
+// Added an enable/disable instrument panel option.
+// Added an enable/disable mouse pointer option.
+// Added using namespace std for compilers that support this.
+//
// Revision 1.9 1998/06/27 16:54:34 curt
// Replaced "extern displayInstruments" with a entry in fgOPTIONS.
// Don't change the view port when displaying the panel.