]> git.mxchange.org Git - flightgear.git/blob - Main/fg_init.cxx
Wrote access functions for current fgOPTIONS.
[flightgear.git] / Main / fg_init.cxx
1 //
2 // fg_init.cxx -- Flight Gear top level initialization routines
3 //
4 // Written by Curtis Olson, started August 1997.
5 //
6 // Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
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 //
23 // $Id$
24 // (Log is kept at end of this file)
25
26
27 #ifdef HAVE_CONFIG_H
28 #  include <config.h>
29 #endif
30
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <string.h>
34
35 #include <Include/fg_constants.h>
36 #include <Include/general.h>
37
38 #include <Aircraft/aircraft.h>
39 #include <Astro/moon.hxx>
40 #include <Astro/planets.hxx>
41 #include <Astro/sky.hxx>
42 #include <Astro/stars.hxx>
43 #include <Astro/sun.hxx>
44 #include <Autopilot/autopilot.h>
45 #include <Cockpit/cockpit.hxx>
46 #include <Debug/fg_debug.h>
47 #include <Joystick/joystick.h>
48 #include <Math/fg_random.h>
49 #include <Scenery/scenery.hxx>
50 #include <Scenery/tilemgr.hxx>
51 #include <Time/event.hxx>
52 #include <Time/fg_time.hxx>
53 #include <Time/light.hxx>
54 #include <Time/sunpos.hxx>
55 #include <Weather/weather.h>
56
57 #include "airports.hxx"
58 #include "fg_init.hxx"
59 #include "options.hxx"
60 #include "views.hxx"
61
62
63 extern const char *default_root;
64
65
66 // Set initial position
67 int fgInitPosition( void ) {
68     char id[5];
69     fgFLIGHT *f;
70
71     f = current_aircraft.flight;
72
73     // If nothing else is specified, default initial position is
74     // Globe, AZ (P13)
75     FG_Longitude = ( -110.6642444 ) * DEG_TO_RAD;
76     FG_Latitude  = (  33.3528917 ) * DEG_TO_RAD;
77     FG_Runway_altitude = (3234.5);
78     FG_Altitude = -1000 /* FG_Runway_altitude + 3.758099 */;
79
80     // Initial Position north of the city of Globe
81     // FG_Longitude = ( -398673.28 / 3600.0 ) * DEG_TO_RAD;
82     // FG_Latitude  = (  120625.64 / 3600.0 ) * DEG_TO_RAD;
83     // FG_Longitude = ( -397867.44 / 3600.0 ) * DEG_TO_RAD;
84     // FG_Latitude  = (  119548.21 / 3600.0 ) * DEG_TO_RAD;
85     // FG_Altitude = 0.0 + 3.758099;
86
87     // Initial Position near where I used to live in Globe, AZ
88     // FG_Longitude = ( -398757.6 / 3600.0 ) * DEG_TO_RAD;
89     // FG_Latitude  = (  120160.0 / 3600.0 ) * DEG_TO_RAD;
90     // FG_Runway_altitude = 4000.0;
91     // FG_Altitude = FG_Runway_altitude + 3.758099;
92
93     // Initial Position: 10125 Jewell St. NE
94     // FG_Longitude = ( -93.15 ) * DEG_TO_RAD;
95     // FG_Latitude  = (  45.15 ) * DEG_TO_RAD;
96     // FG_Runway_altitude = 950.0;
97     // FG_Altitude = FG_Runway_altitude + 3.758099;
98
99     // Initial Position near KHSP (Hot Springs, VA)
100     // FG_Longitude = (-79.8338964 + 0.01) * DEG_TO_RAD;
101     // FG_Latitude  = ( 37.9514564 + 0.008) * DEG_TO_RAD;
102     // FG_Runway_altitude = (3792 + 2800);
103     // FG_Altitude = FG_Runway_altitude + 3.758099;
104
105     // Initial Position at (SEZ) SEDONA airport
106     // FG_Longitude = (-111.7884614 + 0.01) * DEG_TO_RAD;
107     // FG_Latitude  = (  34.8486289 - 0.015) * DEG_TO_RAD;
108     // FG_Runway_altitude = (4827 + 450);
109     // FG_Altitude = FG_Runway_altitude + 3.758099;
110
111     // Initial Position: Somewhere near the Grand Canyon
112     // FG_Longitude = ( -112.5 ) * DEG_TO_RAD;
113     // FG_Latitude  = (  36.5 ) * DEG_TO_RAD;
114     // FG_Runway_altitude = 8000.0;
115     // FG_Altitude = FG_Runway_altitude + 3.758099;
116
117     // Initial Position: Jim Brennon's Kingmont Observatory
118     // FG_Longitude = ( -121.1131667 ) * DEG_TO_RAD;
119     // FG_Latitude  = (   38.8293917 ) * DEG_TO_RAD;
120     // FG_Runway_altitude = 920.0;
121     // FG_Altitude = FG_Runway_altitude + 3.758099;
122
123     // probably interesting for european team members
124     // That is: If I can get the scenery to work -;) (Durk)
125  
126     // Eclipse Watching w73.5 n10 (approx) 18:00 UT
127     // FG_Longitude = ( -73.5 ) * DEG_TO_RAD;
128     // FG_Latitude  = (  10.0 ) * DEG_TO_RAD;
129     // FG_Runway_altitude = 0.0;
130     // FG_Altitude = FG_Runway_altitude + 3.758099;
131
132     // Test Position
133     // FG_Longitude = (  8.5 ) * DEG_TO_RAD;
134     // FG_Latitude  = ( 47.5 ) * DEG_TO_RAD;
135     // FG_Runway_altitude = ( 6000 );
136     // FG_Altitude = FG_Runway_altitude + 3.758099;
137
138     current_options.get_airport_id(id);
139     if ( strlen(id) ) {
140         fgAIRPORTS airports;
141         fgAIRPORT a;
142
143         fgPrintf( FG_GENERAL, FG_INFO, 
144                   "Attempting to set starting position from airport code %s.\n",
145                   id);
146
147         airports.load("Airports");
148         a = airports.search(id);
149         if ( (fabs(a.longitude) < FG_EPSILON) &&
150              (fabs(a.latitude) < FG_EPSILON) &&
151              (fabs(a.elevation) < FG_EPSILON) ) {
152             fgPrintf( FG_GENERAL, FG_EXIT, 
153                       "Failed to find %s in database.\n", id);
154         } else {
155             FG_Longitude = ( a.longitude ) * DEG_TO_RAD;
156             FG_Latitude  = ( a.latitude ) * DEG_TO_RAD;
157             FG_Runway_altitude = ( -1000 /* a.elevation */ );
158             FG_Altitude = FG_Runway_altitude + 3.758099;
159         }
160     }
161     
162     fgPrintf( FG_GENERAL, FG_INFO, 
163               "Initial position is: (%.4f, %.4f, %.2f)\n", 
164               FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG, 
165               FG_Altitude * FEET_TO_METER);
166
167     return(1);
168 }
169
170
171 // General house keeping initializations
172 int fgInitGeneral( void ) {
173     fgGENERAL *g;
174     char root[256];
175     int i;
176
177     g = &general;
178
179     fgPrintf( FG_GENERAL, FG_INFO, "General Initialization\n" );
180     fgPrintf( FG_GENERAL, FG_INFO, "======= ==============\n" );
181
182     g->glVendor = glGetString ( GL_VENDOR );
183     g->glRenderer = glGetString ( GL_RENDERER );
184     g->glVersion = glGetString ( GL_VERSION );
185
186     current_options.get_fg_root(root);
187     if ( !strlen(root) ) { 
188         // No root path set? Then bail ...
189         fgPrintf( FG_GENERAL, FG_EXIT, "%s %s\n",
190                   "Cannot continue without environment variable FG_ROOT",
191                   "being defined.");
192     }
193     fgPrintf( FG_GENERAL, FG_INFO, "FG_ROOT = %s\n\n", root);
194
195     // prime the frame rate counter pump
196     for ( i = 0; i < FG_FRAME_RATE_HISTORY; i++ ) {
197         g->frames[i] = 0.0;
198     }
199
200     return ( 1 ); 
201 }
202
203
204 // This is the top level init routine which calls all the other
205 // initialization routines.  If you are adding a subsystem to flight
206 // gear, its initialization call should located in this routine.
207 // Returns non-zero if a problem encountered.
208 int fgInitSubsystems( void ) {
209     fgFLIGHT *f;
210     fgLIGHT *l;
211     fgTIME *t;
212     fgVIEW *v;
213
214     l = &cur_light_params;
215     t = &cur_time_params;
216     v = &current_view;
217
218     fgPrintf( FG_GENERAL, FG_INFO, "Initialize Subsystems\n");
219     fgPrintf( FG_GENERAL, FG_INFO, "========== ==========\n");
220
221     // seed the random number generater
222     fg_srandom();
223
224     // The following section sets up the flight model EOM parameters
225     // and should really be read in from one or more files.
226
227     // Must happen before any of the flight model or control
228     // parameters are set
229
230     fgAircraftInit();   // In the future this might not be the case.
231     f = current_aircraft.flight;
232
233     // set the initial position
234     fgInitPosition();
235
236     // Initial Velocity
237     FG_V_north = 0.0;   //  7.287719E+00
238     FG_V_east  = 0.0;   //  1.521770E+03
239     FG_V_down  = 0.0;   // -1.265722E-05
240
241     // Initial Orientation
242     FG_Phi   = -2.658474E-06;
243     FG_Theta =  7.401790E-03;
244     FG_Psi   =  270.0 * DEG_TO_RAD;
245
246     // Initial Angular B rates
247     FG_P_body = 7.206685E-05;
248     FG_Q_body = 0.000000E+00;
249     FG_R_body = 9.492658E-05;
250
251     FG_Earth_position_angle = 0.000000E+00;
252
253     // Mass properties and geometry values
254     FG_Mass = 8.547270E+01;
255     FG_I_xx = 1.048000E+03;
256     FG_I_yy = 3.000000E+03;
257     FG_I_zz = 3.530000E+03;
258     FG_I_xz = 0.000000E+00;
259
260     // CG position w.r.t. ref. point
261     FG_Dx_cg = 0.000000E+00;
262     FG_Dy_cg = 0.000000E+00;
263     FG_Dz_cg = 0.000000E+00;
264
265     // Initialize the event manager
266     global_events.Init();
267
268     // Output event stats every 60 seconds
269     global_events.Register( "fgEventPrintStats()", fgEventPrintStats,
270                             FG_EVENT_READY, 60000 );
271
272     // Initialize the time dependent variables
273     fgTimeInit(t);
274     fgTimeUpdate(f, t);
275
276     // Initialize view parameters
277     v->Init();
278     v->Update(f);
279     v->UpdateWorldToEye(f);
280
281     // Initialize the orbital elements of sun, moon and mayor planets
282     fgSolarSystemInit(*t);
283
284     // Initialize the Stars subsystem
285     if( fgStarsInit() ) {
286         // Stars initialized ok.
287     } else {
288         fgPrintf( FG_GENERAL, FG_EXIT, "Error in Stars initialization!\n" );
289     }
290
291     // Initialize the planetary subsystem
292     global_events.Register( "fgPlanetsInit()", fgPlanetsInit, 
293                             FG_EVENT_READY, 600000);
294
295     // Initialize the sun's position 
296     global_events.Register( "fgSunInit()", fgSunInit, 
297                             FG_EVENT_READY, 30000 );
298
299     // Intialize the moon's position
300     global_events.Register( "fgMoonInit()", fgMoonInit, 
301                             FG_EVENT_READY, 600000 );
302
303     // fgUpdateSunPos() needs a few position and view parameters set
304     // so it can calculate local relative sun angle and a few other
305     // things for correctly orienting the sky.
306     fgUpdateSunPos();
307
308     // Initialize Lighting interpolation tables
309     l->Init();
310
311     // update the lighting parameters (based on sun angle)
312     global_events.Register( "fgLightUpdate()", fgLightUpdate,
313                             FG_EVENT_READY, 30000 );
314
315     // Initialize the weather modeling subsystem
316     fgWeatherInit();
317
318     // update the weather for our current position
319     global_events.Register( "fgWeatherUpdate()", fgWeatherUpdate,
320                             FG_EVENT_READY, 120000 );
321
322     // Initialize the Cockpit subsystem
323     if( fgCockpitInit( &current_aircraft )) {
324         // Cockpit initialized ok.
325     } else {
326         fgPrintf( FG_GENERAL, FG_EXIT, "Error in Cockpit initialization!\n" );
327     }
328
329     // Initialize the "sky"
330     fgSkyInit();
331
332     // Initialize the Scenery Management subsystem
333     if ( fgSceneryInit() ) {
334         // Scenery initialized ok.
335     } else {
336         fgPrintf( FG_GENERAL, FG_EXIT, "Error in Scenery initialization!\n" );
337     }
338
339     if( fgTileMgrInit() ) {
340         // Load the local scenery data
341         fgTileMgrUpdate();
342     } else {
343         fgPrintf( FG_GENERAL, FG_EXIT, 
344                   "Error in Tile Manager initialization!\n" );
345     }
346
347     // I'm just sticking this here for now, it should probably move
348     // eventually
349     scenery.cur_elev = FG_Runway_altitude * FEET_TO_METER;
350
351     if ( FG_Altitude < FG_Runway_altitude + 3.758099) {
352         FG_Altitude = FG_Runway_altitude + 3.758099;
353     }
354
355     fgPrintf( FG_GENERAL, FG_INFO,
356               "Updated position (after elevation adj): (%.4f, %.4f, %.2f)\n",
357               FG_Latitude * RAD_TO_DEG, FG_Longitude * RAD_TO_DEG,
358               FG_Altitude * FEET_TO_METER);
359     // end of thing that I just stuck in that I should probably move
360                 
361     // Initialize the flight model subsystem data structures base on
362     // above values
363
364     fgFlightModelInit( FG_LARCSIM, f, 1.0 / DEFAULT_MODEL_HZ );
365
366     // I'm just sticking this here for now, it should probably move
367     // eventually
368     scenery.cur_elev = FG_Runway_altitude * FEET_TO_METER;
369
370     if ( FG_Altitude < FG_Runway_altitude + 3.758099) {
371         FG_Altitude = FG_Runway_altitude + 3.758099;
372     }
373
374     fgPrintf( FG_GENERAL, FG_INFO,
375               "Updated position (after elevation adj): (%.4f, %.4f, %.2f)\n",
376               FG_Latitude * RAD_TO_DEG, FG_Longitude * RAD_TO_DEG,
377               FG_Altitude * FEET_TO_METER);
378     // end of thing that I just stuck in that I should probably move
379
380     // Joystick support
381     if (fgJoystickInit(0) ) {
382         // Joystick initialized ok.
383     } else {
384         fgPrintf( FG_GENERAL, FG_EXIT, "Error in Joystick initialization!\n" );
385     }
386
387     // Autopilot init added here, by Jeff Goeke-Smith
388     fgAPInit(&current_aircraft);
389     
390     fgPrintf(FG_GENERAL, FG_INFO,"\n");
391
392     return(1);
393 }
394
395
396 // $Log$
397 // Revision 1.25  1998/07/13 21:01:38  curt
398 // Wrote access functions for current fgOPTIONS.
399 //
400 // Revision 1.24  1998/07/13 15:32:39  curt
401 // Clear color buffer if drawing wireframe.
402 // When specifying and airport, start elevation at -1000 and let the system
403 // position you at ground level.
404 //
405 // Revision 1.23  1998/07/12 03:14:43  curt
406 // Added ground collision detection.
407 // Did some serious horsing around to be able to "hug" the ground properly
408 //   and still be able to take off.
409 // Set the near clip plane to 1.0 meters when less than 10 meters above the
410 //   ground.
411 // Did some serious horsing around getting the initial airplane position to be
412 //   correct based on rendered terrain elevation.
413 // Added a little cheat/hack that will prevent the view position from ever
414 //   dropping below the terrain, even when the flight model doesn't quite
415 //   put you as high as you'd like.
416 //
417 // Revision 1.22  1998/07/04 00:52:25  curt
418 // Add my own version of gluLookAt() (which is nearly identical to the
419 // Mesa/glu version.)  But, by calculating the Model View matrix our selves
420 // we can save this matrix without having to read it back in from the video
421 // card.  This hopefully allows us to save a few cpu cycles when rendering
422 // out the fragments because we can just use glLoadMatrixd() with the
423 // precalculated matrix for each tile rather than doing a push(), translate(),
424 // pop() for every fragment.
425 //
426 // Panel status defaults to off for now until it gets a bit more developed.
427 //
428 // Extract OpenGL driver info on initialization.
429 //
430 // Revision 1.21  1998/06/27 16:54:33  curt
431 // Replaced "extern displayInstruments" with a entry in fgOPTIONS.
432 // Don't change the view port when displaying the panel.
433 //
434 // Revision 1.20  1998/06/17 21:35:12  curt
435 // Refined conditional audio support compilation.
436 // Moved texture parameter setup calls to ../Scenery/materials.cxx
437 // #include <string.h> before various STL includes.
438 // Make HUD default state be enabled.
439 //
440 // Revision 1.19  1998/06/08 17:57:05  curt
441 // Minor sound/startup position tweaks.
442 //
443 // Revision 1.18  1998/06/03 00:47:14  curt
444 // Updated to compile in audio support if OSS available.
445 // Updated for new version of Steve's audio library.
446 // STL includes don't use .h
447 // Small view optimizations.
448 //
449 // Revision 1.17  1998/06/01 17:54:42  curt
450 // Added Linux audio support.
451 // avoid glClear( COLOR_BUFFER_BIT ) when not using it to set the sky color.
452 // map stl tweaks.
453 //
454 // Revision 1.16  1998/05/29 20:37:24  curt
455 // Tweaked material properties & lighting a bit in GLUTmain.cxx.
456 // Read airport list into a "map" STL for dynamic list sizing and fast tree
457 // based lookups.
458 //
459 // Revision 1.15  1998/05/22 21:28:53  curt
460 // Modifications to use the new fgEVENT_MGR class.
461 //
462 // Revision 1.14  1998/05/20 20:51:35  curt
463 // Tweaked smooth shaded texture lighting properties.
464 // Converted fgLIGHT to a C++ class.
465 //
466 // Revision 1.13  1998/05/16 13:08:35  curt
467 // C++ - ified views.[ch]xx
468 // Shuffled some additional view parameters into the fgVIEW class.
469 // Changed tile-radius to tile-diameter because it is a much better
470 //   name.
471 // Added a WORLD_TO_EYE transformation to views.cxx.  This allows us
472 //  to transform world space to eye space for view frustum culling.
473 //
474 // Revision 1.12  1998/05/13 18:29:58  curt
475 // Added a keyboard binding to dynamically adjust field of view.
476 // Added a command line option to specify fov.
477 // Adjusted terrain color.
478 // Root path info moved to fgOPTIONS.
479 // Added ability to parse options out of a config file.
480 //
481 // Revision 1.11  1998/05/07 23:14:15  curt
482 // Added "D" key binding to set autopilot heading.
483 // Made frame rate calculation average out over last 10 frames.
484 // Borland C++ floating point exception workaround.
485 // Added a --tile-radius=n option.
486 //
487 // Revision 1.10  1998/05/06 03:16:24  curt
488 // Added an averaged global frame rate counter.
489 // Added an option to control tile radius.
490 //
491 // Revision 1.9  1998/05/03 00:47:31  curt
492 // Added an option to enable/disable full-screen mode.
493 //
494 // Revision 1.8  1998/04/30 12:34:18  curt
495 // Added command line rendering options:
496 //   enable/disable fog/haze
497 //   specify smooth/flat shading
498 //   disable sky blending and just use a solid color
499 //   enable wireframe drawing mode
500 //
501 // Revision 1.7  1998/04/28 01:20:22  curt
502 // Type-ified fgTIME and fgVIEW.
503 // Added a command line option to disable textures.
504 //
505 // Revision 1.6  1998/04/26 05:10:03  curt
506 // "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
507 //
508 // Revision 1.5  1998/04/25 22:06:30  curt
509 // Edited cvs log messages in source files ... bad bad bad!
510 //
511 // Revision 1.4  1998/04/25 20:24:01  curt
512 // Cleaned up initialization sequence to eliminate interdependencies
513 // between sun position, lighting, and view position.  This creates a
514 // valid single pass initialization path.
515 //
516 // Revision 1.3  1998/04/25 15:11:11  curt
517 // Added an command line option to set starting position based on airport ID.
518 //
519 // Revision 1.2  1998/04/24 00:49:20  curt
520 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
521 // Trying out some different option parsing code.
522 // Some code reorganization.
523 //
524 // Revision 1.1  1998/04/22 13:25:44  curt
525 // C++ - ifing the code.
526 // Starting a bit of reorganization of lighting code.
527 //
528 // Revision 1.56  1998/04/18 04:11:28  curt
529 // Moved fg_debug to it's own library, added zlib support.
530 //
531 // Revision 1.55  1998/04/14 02:21:03  curt
532 // Incorporated autopilot heading hold contributed by:  Jeff Goeke-Smith
533 // <jgoeke@voyager.net>
534 //
535 // Revision 1.54  1998/04/08 23:35:36  curt
536 // Tweaks to Gnu automake/autoconf system.
537 //
538 // Revision 1.53  1998/04/03 22:09:06  curt
539 // Converting to Gnu autoconf system.
540 //
541 // Revision 1.52  1998/03/23 21:24:38  curt
542 // Source code formating tweaks.
543 //
544 // Revision 1.51  1998/03/14 00:31:22  curt
545 // Beginning initial terrain texturing experiments.
546 //
547 // Revision 1.50  1998/03/09 22:46:19  curt
548 // Minor tweaks.
549 //
550 // Revision 1.49  1998/02/23 19:07:59  curt
551 // Incorporated Durk's Astro/ tweaks.  Includes unifying the sun position
552 // calculation code between sun display, and other FG sections that use this
553 // for things like lighting.
554 //
555 // Revision 1.48  1998/02/21 14:53:15  curt
556 // Added Charlie's HUD changes.
557 //
558 // Revision 1.47  1998/02/19 13:05:53  curt
559 // Incorporated some HUD tweaks from Michelle America.
560 // Tweaked the sky's sunset/rise colors.
561 // Other misc. tweaks.
562 //
563 // Revision 1.46  1998/02/18 15:07:06  curt
564 // Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated
565 // drivers will work.)
566 //
567 // Revision 1.45  1998/02/16 13:39:43  curt
568 // Miscellaneous weekend tweaks.  Fixed? a cache problem that caused whole
569 // tiles to occasionally be missing.
570 //
571 // Revision 1.44  1998/02/12 21:59:50  curt
572 // Incorporated code changes contributed by Charlie Hotchkiss
573 // <chotchkiss@namg.us.anritsu.com>
574 //
575 // Revision 1.43  1998/02/11 02:50:40  curt
576 // Minor changes.
577 //
578 // Revision 1.42  1998/02/09 22:56:58  curt
579 // Removed "depend" files from cvs control.  Other minor make tweaks.
580 //
581 // Revision 1.41  1998/02/09 15:07:50  curt
582 // Minor tweaks.
583 //
584 // Revision 1.40  1998/02/07 15:29:44  curt
585 // Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
586 // <chotchkiss@namg.us.anritsu.com>
587 //
588 // Revision 1.39  1998/02/03 23:20:25  curt
589 // Lots of little tweaks to fix various consistency problems discovered by
590 // Solaris' CC.  Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
591 // passed arguments along to the real printf().  Also incorporated HUD changes
592 // by Michele America.
593 //
594 // Revision 1.38  1998/02/02 20:53:58  curt
595 // Incorporated Durk's changes.
596 //
597 // Revision 1.37  1998/02/01 03:39:54  curt
598 // Minor tweaks.
599 //
600 // Revision 1.36  1998/01/31 00:43:13  curt
601 // Added MetroWorks patches from Carmen Volpe.
602 //
603 // Revision 1.35  1998/01/27 00:47:57  curt
604 // Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
605 // system and commandline/config file processing code.
606 //
607 // Revision 1.34  1998/01/22 02:59:37  curt
608 // Changed #ifdef FILE_H to #ifdef _FILE_H
609 //
610 // Revision 1.33  1998/01/21 21:11:34  curt
611 // Misc. tweaks.
612 //
613 // Revision 1.32  1998/01/19 19:27:08  curt
614 // Merged in make system changes from Bob Kuehne <rpk@sgi.com>
615 // This should simplify things tremendously.
616 //
617 // Revision 1.31  1998/01/19 18:40:32  curt
618 // Tons of little changes to clean up the code and to remove fatal errors
619 // when building with the c++ compiler.
620 //
621 // Revision 1.30  1998/01/13 00:23:09  curt
622 // Initial changes to support loading and management of scenery tiles.  Note,
623 // there's still a fair amount of work left to be done.
624 //
625 // Revision 1.29  1998/01/08 02:22:08  curt
626 // Beginning to integrate Tile management subsystem.
627 //
628 // Revision 1.28  1998/01/07 03:18:58  curt
629 // Moved astronomical stuff from .../Src/Scenery to .../Src/Astro/
630 //
631 // Revision 1.27  1998/01/05 18:44:35  curt
632 // Add an option to advance/decrease time from keyboard.
633 //
634 // Revision 1.26  1997/12/30 23:09:04  curt
635 // Tweaking initialization sequences.
636 //
637 // Revision 1.25  1997/12/30 22:22:33  curt
638 // Further integration of event manager.
639 //
640 // Revision 1.24  1997/12/30 20:47:44  curt
641 // Integrated new event manager with subsystem initializations.
642 //
643 // Revision 1.23  1997/12/30 16:36:50  curt
644 // Merged in Durk's changes ...
645 //
646 // Revision 1.22  1997/12/19 23:34:05  curt
647 // Lot's of tweaking with sky rendering and lighting.
648 //
649 // Revision 1.21  1997/12/19 16:45:00  curt
650 // Working on scene rendering order and options.
651 //
652 // Revision 1.20  1997/12/18 23:32:33  curt
653 // First stab at sky dome actually starting to look reasonable. :-)
654 //
655 // Revision 1.19  1997/12/17 23:13:36  curt
656 // Began working on rendering a sky.
657 //
658 // Revision 1.18  1997/12/15 23:54:49  curt
659 // Add xgl wrappers for debugging.
660 // Generate terrain normals on the fly.
661 //
662 // Revision 1.17  1997/12/15 20:59:09  curt
663 // Misc. tweaks.
664 //
665 // Revision 1.16  1997/12/12 19:52:48  curt
666 // Working on lightling and material properties.
667 //
668 // Revision 1.15  1997/12/11 04:43:55  curt
669 // Fixed sun vector and lighting problems.  I thing the moon is now lit
670 // correctly.
671 //
672 // Revision 1.14  1997/12/10 22:37:47  curt
673 // Prepended "fg" on the name of all global structures that didn't have it yet.
674 // i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
675 //
676 // Revision 1.13  1997/11/25 19:25:32  curt
677 // Changes to integrate Durk's moon/sun code updates + clean up.
678 //
679 // Revision 1.12  1997/11/15 18:16:35  curt
680 // minor tweaks.
681 //
682 // Revision 1.11  1997/10/30 12:38:42  curt
683 // Working on new scenery subsystem.
684 //
685 // Revision 1.10  1997/10/25 03:24:23  curt
686 // Incorporated sun, moon, and star positioning code contributed by Durk Talsma.
687 //
688 // Revision 1.9  1997/09/23 00:29:39  curt
689 // Tweaks to get things to compile with gcc-win32.
690 //
691 // Revision 1.8  1997/09/22 14:44:20  curt
692 // Continuing to try to align stars correctly.
693 //
694 // Revision 1.7  1997/09/16 15:50:30  curt
695 // Working on star alignment and time issues.
696 //
697 // Revision 1.6  1997/09/05 14:17:30  curt
698 // More tweaking with stars.
699 //
700 // Revision 1.5  1997/09/04 02:17:36  curt
701 // Shufflin' stuff.
702 //
703 // Revision 1.4  1997/08/27 21:32:26  curt
704 // Restructured view calculation code.  Added stars.
705 //
706 // Revision 1.3  1997/08/27 03:30:19  curt
707 // Changed naming scheme of basic shared structures.
708 //
709 // Revision 1.2  1997/08/25 20:27:23  curt
710 // Merged in initial HUD and Joystick code.
711 //
712 // Revision 1.1  1997/08/23 01:46:20  curt
713 // Initial revision.
714 //
715