]> git.mxchange.org Git - flightgear.git/blob - Main/options.cxx
Contributions from Bernie Bright <bbright@c031.aone.net.au>
[flightgear.git] / Main / options.cxx
1 //
2 // options.cxx -- class to handle command line options
3 //
4 // Written by Curtis Olson, started April 1998.
5 //
6 // Copyright (C) 1998  Curtis L. Olson  - curt@me.umn.edu
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 //
22 // $Id$
23 // (Log is kept at end of this file)
24
25
26 #ifdef HAVE_CONFIG_H
27 #  include <config.h>
28 #endif
29
30 #include <math.h>            // rint()
31 #include <stdio.h>
32 #include <stdlib.h>          // atof(), atoi()
33 #include <string.h>
34 #include <string>
35
36 #include <Debug/fg_debug.h>
37 #include <Flight/flight.h>
38 #include <Include/fg_constants.h>
39 #include <Include/fg_zlib.h>
40
41 #include "options.hxx"
42
43 inline double
44 atof( const string& str )
45 {
46     return ::atof( str.c_str() );
47 }
48
49 inline int
50 atoi( const string& str )
51 {
52     return ::atoi( str.c_str() );
53 }
54
55 // Defined the shared options class here
56 fgOPTIONS current_options;
57
58
59 // Constructor
60 fgOPTIONS::fgOPTIONS() :
61     // starting longitude in degrees (west = -)
62     // starting latitude in degrees (south = -)
63
64     // Default initial position is Globe, AZ (P13)
65     lon(-110.6642444),
66     lat(  33.3528917),
67
68     // North of the city of Globe
69     // lon(-110.7),
70     // lat(  33.4),
71
72     // North of the city of Globe
73     // lon(-110.742578),
74     // lat(  33.507122),
75
76     // Near where I used to live in Globe, AZ
77     // lon(-110.766000),
78     // lat(  33.377778),
79
80     // 10125 Jewell St. NE
81     // lon(-93.15),
82     // lat( 45.15),
83
84     // Near KHSP (Hot Springs, VA)
85     // lon(-79.8338964 + 0.01),
86     // lat( 37.9514564 + 0.008),
87
88     // (SEZ) SEDONA airport
89     // lon(-111.7884614 + 0.01),
90     // lat(  34.8486289 - 0.015),
91
92     // Somewhere near the Grand Canyon
93     // lon(-112.5),
94     // lat(  36.5),
95
96     // Jim Brennon's Kingmont Observatory
97     // lon(-121.1131667),
98     // lat(  38.8293917),
99
100     // Huaras, Peru (S09d 31.871'  W077d 31.498')
101     // lon(-77.5249667),
102     // lat( -9.5311833),
103  
104     // Eclipse Watching w73.5 n10 (approx) 18:00 UT
105     // lon(-73.5),
106     // lat( 10.0),
107
108     // Test Position
109     // lon( 8.5),
110     // lat(47.5),
111
112     // Timms Hill (WI)
113     // lon(-90.1953055556),
114     // lat( 45.4511388889),
115
116     // starting altitude in meters (this will be reset to ground level
117     // if it is lower than the terrain
118     altitude(-9999.0),
119
120     // Initial Orientation
121     heading(270.0),      // heading (yaw) angle in degress (Psi)
122     roll(0.0),           // roll angle in degrees (Phi)
123     pitch(0.424),        // pitch angle in degrees (Theta)
124
125     // Miscellaneous
126     game_mode(0),
127     splash_screen(1),
128     intro_music(1),
129     mouse_pointer(0),
130     pause(0),
131
132     // Features
133     hud_status(1),
134     panel_status(0),
135     sound(1),
136
137     // Flight Model options
138     flight_model(FG_LARCSIM),
139
140     // Rendering options
141     fog(FG_FOG_NICEST),  // nicest
142     fov(55.0),
143     fullscreen(0),
144     shading(1),
145     skyblend(1),
146     textures(1),
147     wireframe(0),
148
149     // Scenery options
150     tile_diameter(5),
151
152     // HUD options
153     tris_or_culled(0),
154         
155     // Time options
156     time_offset(0)
157 {
158     // set initial values/defaults
159     char* envp = ::getenv( "FG_ROOT" );
160
161     if ( envp != NULL ) {
162         // fg_root could be anywhere, so default to environmental
163         // variable $FG_ROOT if it is set.
164         fg_root = envp;
165     } else {
166         // Otherwise, default to a random compiled in location if
167         // $FG_ROOT is not set.  This can still be overridden from the
168         // command line or a config file.
169
170 #if defined(WIN32)
171         fg_root = "\\FlightGear";
172 #else
173         fg_root = "/usr/local/lib/FlightGear";
174 #endif
175     }
176
177     airport_id = "";  // default airport id
178 }
179
180
181 double
182 fgOPTIONS::parse_time(const string& time_in) {
183     char *time_str, num[256];
184     double hours, minutes, seconds;
185     double result = 0.0;
186     int sign = 1;
187     int i;
188
189     time_str = (char *)time_in.c_str();
190
191     // printf("parse_time(): %s\n", time_str);
192
193     // check for sign
194     if ( strlen(time_str) ) {
195         if ( time_str[0] == '+' ) {
196             sign = 1;
197             time_str++;
198         } else if ( time_str[0] == '-' ) {
199             sign = -1;
200             time_str++;
201         }
202     }
203     // printf("sign = %d\n", sign);
204
205     // get hours
206     if ( strlen(time_str) ) {
207         i = 0;
208         while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
209             num[i] = time_str[0];
210             time_str++;
211             i++;
212         }
213         if ( time_str[0] == ':' ) {
214             time_str++;
215         }
216         num[i] = '\0';
217         hours = atof(num);
218         // printf("hours = %.2lf\n", hours);
219
220         result += hours;
221     }
222
223     // get minutes
224     if ( strlen(time_str) ) {
225         i = 0;
226         while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
227             num[i] = time_str[0];
228             time_str++;
229             i++;
230         }
231         if ( time_str[0] == ':' ) {
232             time_str++;
233         }
234         num[i] = '\0';
235         minutes = atof(num);
236         // printf("minutes = %.2lf\n", minutes);
237
238         result += minutes / 60.0;
239     }
240
241     // get seconds
242     if ( strlen(time_str) ) {
243         i = 0;
244         while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
245             num[i] = time_str[0];
246             time_str++;
247             i++;
248         }
249         num[i] = '\0';
250         seconds = atof(num);
251         // printf("seconds = %.2lf\n", seconds);
252
253         result += seconds / 3600.0;
254     }
255
256     return(sign * result);
257 }
258
259
260 // parse degree in the form of [+/-]hhh:mm:ss
261 double
262 fgOPTIONS::parse_degree( const string& degree_str) {
263     double result = parse_time( degree_str );
264
265     // printf("Degree = %.4f\n", result);
266
267     return(result);
268 }
269
270
271 // parse time offset command line option
272 int
273 fgOPTIONS::parse_time_offset( const string& time_str) {
274     int result;
275
276     // printf("time offset = %s\n", time_str);
277
278 #ifdef HAVE_RINT
279     result = (int)rint(parse_time(time_str) * 3600.0);
280 #else
281     result = (int)(parse_time(time_str) * 3600.0);
282 #endif
283
284     // printf("parse_time_offset(): %d\n", result);
285
286     return( result );
287 }
288
289
290 // Parse --tile-diameter=n type option 
291
292 int
293 fgOPTIONS::parse_tile_radius( const string& arg ) {
294     int radius = atoi( arg );
295
296     if ( radius < FG_RADIUS_MIN ) { radius = FG_RADIUS_MIN; }
297     if ( radius > FG_RADIUS_MAX ) { radius = FG_RADIUS_MAX; }
298
299     // printf("parse_tile_radius(): radius = %d\n", radius);
300
301     return(radius);
302 }
303
304
305 // Parse --flightmode=abcdefg type option 
306 int
307 fgOPTIONS::parse_flight_model( const string& fm ) {
308     // printf("flight model = %s\n", fm);
309
310     if ( fm == "slew" ) {
311         return(FG_SLEW);
312     } else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
313         return(FG_LARCSIM);
314     } else {
315         fgPrintf( FG_GENERAL, FG_EXIT, "Unknown flight model = %s\n",
316                   fm.c_str());
317     }
318
319     // we'll never get here, but it makes the compiler happy.
320     return(-1);
321 }
322
323
324 // Parse --fov=x.xx type option 
325 double
326 fgOPTIONS::parse_fov( const string& arg ) {
327     double fov = atof(arg);
328
329     if ( fov < FG_FOV_MIN ) { fov = FG_FOV_MIN; }
330     if ( fov > FG_FOV_MAX ) { fov = FG_FOV_MAX; }
331
332     // printf("parse_fov(): result = %.4f\n", fov);
333
334     return(fov);
335 }
336
337
338 // Parse a single option
339 int fgOPTIONS::parse_option( const string& arg ) {
340     // General Options
341     if ( (arg == "--help") || (arg == "-h") ) {
342         // help/usage request
343         return(FG_OPTIONS_HELP);
344     } else if ( arg == "--disable-game-mode") {
345         game_mode = false;
346     } else if ( arg == "--enable-game-mode" ) {
347         game_mode = true;
348     } else if ( arg == "--disable-splash-screen" ) {
349         splash_screen = false;
350     } else if ( arg == "--enable-splash-screen" ) {
351         splash_screen = true;
352     } else if ( arg == "--disable-intro-music" ) {
353         intro_music = false;
354     } else if ( arg == "--enable-intro-music" ) {
355         intro_music = true;
356     } else if ( arg == "--disable-mouse-pointer" ) {
357         mouse_pointer = 1;
358     } else if ( arg == "--enable-mouse-pointer" ) {
359         mouse_pointer = 2;
360     } else if ( arg == "--disable-pause" ) {
361         pause = false;  
362     } else if ( arg == "--enable-pause" ) {
363         pause = true;   
364     } else if ( arg == "--disable-hud" ) {
365         hud_status = false;     
366     } else if ( arg == "--enable-hud" ) {
367         hud_status = true;      
368     } else if ( arg == "--disable-panel" ) {
369         panel_status = false;
370     } else if ( arg == "--enable-panel" ) {
371         panel_status = true;
372     } else if ( arg == "--disable-sound" ) {
373         sound = false;
374     } else if ( arg == "--enable-sound" ) {
375         sound = true;
376     } else if ( arg.find( "--airport-id=") != string::npos ) {
377         airport_id = arg.substr( 13 );
378     } else if ( arg.find( "--lon=" ) != string::npos ) {
379         lon = parse_degree( arg.substr(6) );
380     } else if ( arg.find( "--lat=" ) != string::npos ) {
381         lat = parse_degree( arg.substr(6) );
382     } else if ( arg.find( "--altitude=" ) != string::npos ) {
383         altitude = atof( arg.substr(11) );
384     } else if ( arg.find( "--heading=" ) != string::npos ) {
385         heading = atof( arg.substr(10) );
386     } else if ( arg.find( "--roll=" ) != string::npos ) {
387         roll = atof( arg.substr(7) );
388     } else if ( arg.find( "--pitch=" ) != string::npos ) {
389         pitch = atof( arg.substr(8) );
390     } else if ( arg.find( "--fg-root=" ) != string::npos ) {
391         fg_root = arg.substr( 10 );
392     } else if ( arg.find( "--flight-model=" ) != string::npos ) {
393         flight_model = parse_flight_model( arg.substr(15) );
394     } else if ( arg == "--fog-disable" ) {
395         fog = FG_FOG_DISABLED;  
396     } else if ( arg == "--fog-fastest" ) {
397         fog = FG_FOG_FASTEST;   
398     } else if ( arg == "--fog-nicest" ) {
399         fog = FG_FOG_NICEST;    
400     } else if ( arg.find( "--fov=" ) != string::npos ) {
401         fov = parse_fov( arg.substr(6) );
402     } else if ( arg == "--disable-fullscreen" ) {
403         fullscreen = false;     
404     } else if ( arg== "--enable-fullscreen") {
405         fullscreen = true;      
406     } else if ( arg == "--shading-flat") {
407         shading = 0;    
408     } else if ( arg == "--shading-smooth") {
409         shading = 1;    
410     } else if ( arg == "--disable-skyblend") {
411         skyblend = false;       
412     } else if ( arg== "--enable-skyblend" ) {
413         skyblend = true;        
414     } else if ( arg == "--disable-textures" ) {
415         textures = false;       
416     } else if ( arg == "--enable-textures" ) {
417         textures = true;        
418     } else if ( arg == "--disable-wireframe" ) {
419         wireframe = false;      
420     } else if ( arg == "--enable-wireframe" ) {
421         wireframe = true;       
422     } else if ( arg.find( "--tile-radius=" ) != string::npos ) {
423         tile_radius = parse_tile_radius( arg.substr(14) );
424         tile_diameter = tile_radius * 2 + 1;
425     } else if ( arg.find( "--time-offset=" ) != string::npos ) {
426         time_offset = parse_time_offset( (arg.substr(14)) );
427     } else if ( arg == "--hud-tris" ) {
428         tris_or_culled = 0;     
429     } else if ( arg == "--hud-culled" ) {
430         tris_or_culled = 1;     
431     } else {
432         fgPrintf( FG_GENERAL, FG_EXIT, "Unknown option '%s'\n",
433                   arg.c_str() );
434         return(FG_OPTIONS_ERROR);
435     }
436     
437     return(FG_OPTIONS_OK);
438 }
439
440
441 // Parse the command line options
442 int fgOPTIONS::parse_command_line( int argc, char **argv ) {
443     int i = 1;
444     int result;
445
446     fgPrintf(FG_GENERAL, FG_INFO, "Processing command line arguments\n");
447
448     while ( i < argc ) {
449         fgPrintf(FG_GENERAL, FG_DEBUG, "argv[%d] = %s\n", i, argv[i]);
450
451         result = parse_option(argv[i]);
452         if ( (result == FG_OPTIONS_HELP) || (result == FG_OPTIONS_ERROR) ) {
453             return(result);
454         }
455
456         i++;
457     }
458     
459     return(FG_OPTIONS_OK);
460 }
461
462
463 // Parse config file options
464 int fgOPTIONS::parse_config_file( const string& path ) {
465     char line[256];
466     fgFile f;
467     int len;
468     string fgpath = path + ".gz";
469
470     // first try "path.gz"
471     if ( (f = fgopen(fgpath.c_str(), "rb")) == NULL ) {
472         // next try "path"
473         if ( (f = fgopen(path.c_str(), "rb")) == NULL ) {
474             return(FG_OPTIONS_ERROR);
475         }
476     }
477
478     fgPrintf( FG_GENERAL, FG_INFO, "Processing config file: %s\n",
479               path.c_str() );
480
481     while ( fggets(f, line, 250) != NULL ) {
482         // strip trailing newline if it exists
483         len = strlen(line);
484         if ( line[len-1] == '\n' ) {
485             line[len-1] = '\0';
486         }
487
488         // strip dos ^M if it exists
489         len = strlen(line);
490         if ( line[len-1] == '\r' ) {
491             line[len-1] = '\0';
492         }
493
494         if (  parse_option( line ) == FG_OPTIONS_ERROR ) {
495             fgPrintf( FG_GENERAL, FG_EXIT, 
496                       "Config file parse error: %s '%s'\n",
497                       path.c_str(), line );
498         }
499     }
500
501     fgclose(f);
502     return FG_OPTIONS_OK;
503 }
504
505
506 // Print usage message
507 void fgOPTIONS::usage ( void ) {
508     printf("Usage: fg [ options ... ]\n");
509     printf("\n");
510
511     printf("General Options:\n");
512     printf("\t--help -h:  print usage\n");
513     printf("\t--fg-root=path:  specify the root path for all the data files\n");
514     printf("\t--disable-gamemode:  disable full-screen game mode\n");
515     printf("\t--enable-gamemode:  enable full-screen game mode\n");
516     printf("\t--disable-splash-screen:  disable splash screen\n");
517     printf("\t--enable-splash-screen:  enable splash screen\n");
518     printf("\t--disable-intro-music:  disable introduction music\n");
519     printf("\t--enable-intro-music:  enable introduction music\n");
520     printf("\t--disable-mouse-pointer:  disable extra mouse pointer\n");
521     printf("\t--enable-mouse-pointer:  enable extra mouse pointer (i.e. for\n");
522     printf("\t\tfull screen voodoo/voodoo-II based cards.)\n");
523     printf("\t--disable-pause:  start out in an active state\n");
524     printf("\t--enable-pause:  start out in a paused state\n");
525     printf("\n");
526
527     printf("Features:\n");
528     printf("\t--disable-hud:  disable heads up display\n");
529     printf("\t--enable-hud:  enable heads up display\n");
530     printf("\t--disable-panel:  disable instrument panel\n");
531     printf("\t--enable-panel:  enable instrumetn panel\n");
532     printf("\t--disable-sound:  disable sound effects\n");
533     printf("\t--enable-sound:  enable sound effects\n");
534     printf("\n");
535  
536     printf("Initial Position and Orientation:\n");
537     printf("\t--airport-id=ABCD:  specify starting postion by airport id\n");
538     printf("\t--lon=degrees:  starting longitude in degrees (west = -)\n");
539     printf("\t--lat=degrees:  starting latitude in degrees (south = -)\n");
540     printf("\t--altitude=meters:  starting altitude in meters\n");
541     printf("\t--heading=degrees:  heading (yaw) angle in degress (Psi)\n");
542     printf("\t--roll=degrees:  roll angle in degrees (Phi)\n");
543     printf("\t--pitch=degrees:  pitch angle in degrees (Theta)\n");
544     printf("\n");
545
546     printf("Rendering Options:\n");
547     printf("\t--fog-disable:  disable fog/haze\n");
548     printf("\t--fog-fastest:  enable fastest fog/haze\n");
549     printf("\t--fog-nicest:  enable nicest fog/haze\n");
550     printf("\t--fov=xx.x:  specify initial field of view angle in degrees\n");
551     printf("\t--disable-fullscreen:  disable fullscreen mode\n");
552     printf("\t--enable-fullscreen:  enable fullscreen mode\n");
553     printf("\t--shading-flat:  enable flat shading\n");
554     printf("\t--shading-smooth:  enable smooth shading\n");
555     printf("\t--disable-skyblend:  disable sky blending\n");
556     printf("\t--enable-skyblend:  enable sky blending\n");
557     printf("\t--disable-textures:  disable textures\n");
558     printf("\t--enable-textures:  enable textures\n");
559     printf("\t--disable-wireframe:  disable wireframe drawing mode\n");
560     printf("\t--enable-wireframe:  enable wireframe drawing mode\n");
561     printf("\n");
562
563     printf("Scenery Options:\n");
564     printf("\t--tile-radius=n:  specify tile radius, must be 1 - 4\n");
565     printf("\n");
566
567     printf("Hud Options:\n");
568     printf("\t--hud-tris:  Hud displays number of triangles rendered\n");
569     printf("\t--hud-culled:  Hud displays percentage of triangles culled\n");
570         
571     printf("Time Options:\n");
572     printf("\t--time-offset=[+-]hh:mm:ss:  offset local time by this amount\n");
573 }
574
575
576 // Destructor
577 fgOPTIONS::~fgOPTIONS( void ) {
578 }
579
580
581 // $Log$
582 // Revision 1.23  1998/08/27 17:02:07  curt
583 // Contributions from Bernie Bright <bbright@c031.aone.net.au>
584 // - use strings for fg_root and airport_id and added methods to return
585 //   them as strings,
586 // - inlined all access methods,
587 // - made the parsing functions private methods,
588 // - deleted some unused functions.
589 // - propogated some of these changes out a bit further.
590 //
591 // Revision 1.22  1998/08/24 20:11:13  curt
592 // Added i/I to toggle full vs. minimal HUD.
593 // Added a --hud-tris vs --hud-culled option.
594 // Moved options accessor funtions to options.hxx.
595 //
596 // Revision 1.21  1998/08/20 15:10:34  curt
597 // Added GameGLUT support.
598 //
599 // Revision 1.20  1998/07/30 23:48:28  curt
600 // Output position & orientation when pausing.
601 // Eliminated libtool use.
602 // Added options to specify initial position and orientation.
603 // Changed default fov to 55 degrees.
604 // Added command line option to start in paused or unpaused state.
605 //
606 // Revision 1.19  1998/07/27 18:41:25  curt
607 // Added a pause command "p"
608 // Fixed some initialization order problems between pui and glut.
609 // Added an --enable/disable-sound option.
610 //
611 // Revision 1.18  1998/07/22 01:27:03  curt
612 // Strip out \r when parsing config file in case we are on a windoze system.
613 //
614 // Revision 1.17  1998/07/16 17:33:38  curt
615 // "H" / "h" now control hud brightness as well with off being one of the
616 //   states.
617 // Better checking for xmesa/fx 3dfx fullscreen/window support for deciding
618 //   whether or not to build in the feature.
619 // Translucent menu support.
620 // HAVE_AUDIO_SUPPORT -> ENABLE_AUDIO_SUPPORT
621 // Use fork() / wait() for playing mp3 init music in background under unix.
622 // Changed default tile diameter to 5.
623 //
624 // Revision 1.16  1998/07/13 21:01:39  curt
625 // Wrote access functions for current fgOPTIONS.
626 //
627 // Revision 1.15  1998/07/06 21:34:19  curt
628 // Added an enable/disable splash screen option.
629 // Added an enable/disable intro music option.
630 // Added an enable/disable instrument panel option.
631 // Added an enable/disable mouse pointer option.
632 // Added using namespace std for compilers that support this.
633 //
634 // Revision 1.14  1998/07/04 00:52:26  curt
635 // Add my own version of gluLookAt() (which is nearly identical to the
636 // Mesa/glu version.)  But, by calculating the Model View matrix our selves
637 // we can save this matrix without having to read it back in from the video
638 // card.  This hopefully allows us to save a few cpu cycles when rendering
639 // out the fragments because we can just use glLoadMatrixd() with the
640 // precalculated matrix for each tile rather than doing a push(), translate(),
641 // pop() for every fragment.
642 //
643 // Panel status defaults to off for now until it gets a bit more developed.
644 //
645 // Extract OpenGL driver info on initialization.
646 //
647 // Revision 1.13  1998/06/27 16:54:34  curt
648 // Replaced "extern displayInstruments" with a entry in fgOPTIONS.
649 // Don't change the view port when displaying the panel.
650 //
651 // Revision 1.12  1998/06/17 21:35:13  curt
652 // Refined conditional audio support compilation.
653 // Moved texture parameter setup calls to ../Scenery/materials.cxx
654 // #include <string.h> before various STL includes.
655 // Make HUD default state be enabled.
656 //
657 // Revision 1.11  1998/06/13 00:40:33  curt
658 // Tweaked fog command line options.
659 //
660 // Revision 1.10  1998/05/16 13:08:36  curt
661 // C++ - ified views.[ch]xx
662 // Shuffled some additional view parameters into the fgVIEW class.
663 // Changed tile-radius to tile-diameter because it is a much better
664 //   name.
665 // Added a WORLD_TO_EYE transformation to views.cxx.  This allows us
666 //  to transform world space to eye space for view frustum culling.
667 //
668 // Revision 1.9  1998/05/13 18:29:59  curt
669 // Added a keyboard binding to dynamically adjust field of view.
670 // Added a command line option to specify fov.
671 // Adjusted terrain color.
672 // Root path info moved to fgOPTIONS.
673 // Added ability to parse options out of a config file.
674 //
675 // Revision 1.8  1998/05/07 23:14:16  curt
676 // Added "D" key binding to set autopilot heading.
677 // Made frame rate calculation average out over last 10 frames.
678 // Borland C++ floating point exception workaround.
679 // Added a --tile-radius=n option.
680 //
681 // Revision 1.7  1998/05/06 03:16:25  curt
682 // Added an averaged global frame rate counter.
683 // Added an option to control tile radius.
684 //
685 // Revision 1.6  1998/05/03 00:47:32  curt
686 // Added an option to enable/disable full-screen mode.
687 //
688 // Revision 1.5  1998/04/30 12:34:19  curt
689 // Added command line rendering options:
690 //   enable/disable fog/haze
691 //   specify smooth/flat shading
692 //   disable sky blending and just use a solid color
693 //   enable wireframe drawing mode
694 //
695 // Revision 1.4  1998/04/28 01:20:22  curt
696 // Type-ified fgTIME and fgVIEW.
697 // Added a command line option to disable textures.
698 //
699 // Revision 1.3  1998/04/26 05:01:19  curt
700 // Added an rint() / HAVE_RINT check.
701 //
702 // Revision 1.2  1998/04/25 15:11:12  curt
703 // Added an command line option to set starting position based on airport ID.
704 //
705 // Revision 1.1  1998/04/24 00:49:21  curt
706 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
707 // Trying out some different option parsing code.
708 // Some code reorganization.
709 //
710 //