]> git.mxchange.org Git - flightgear.git/blob - Simulator/Main/GLUTkey.cxx
Merge Tests as subdirectory
[flightgear.git] / Simulator / Main / GLUTkey.cxx
1 // GLUTkey.cxx -- handle GLUT keyboard events
2 //
3 // Written by Curtis Olson, started May 1997.
4 //
5 // Copyright (C) 1997  Curtis L. Olson  - curt@me.umn.edu
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 //
21 // $Id$
22 // (Log is kept at end of this file)
23
24
25 #ifdef HAVE_CONFIG_H
26 #  include <config.h>
27 #endif
28
29 #ifdef HAVE_WINDOWS_H
30 #  include <windows.h>                     
31 #endif
32
33 #include <GL/glut.h>
34 #include <XGL/xgl.h>
35
36 #if defined(FX) && defined(XMESA)
37 #include <GL/xmesa.h>
38 #endif
39
40 #include <stdio.h>
41 #include <stdlib.h>
42
43 #include <Debug/logstream.hxx>
44 #include <Aircraft/aircraft.hxx>
45 #include <Astro/solarsystem.hxx>
46 #include <Astro/sky.hxx>
47 #include <Autopilot/autopilot.hxx>
48 #include <Cockpit/hud.hxx>
49 #include <GUI/gui.h>
50 #include <Include/fg_constants.h>
51 #include <Objects/material.hxx>
52 #include <pu.h>
53 #include <Time/light.hxx>
54 #include <Weather/weather.hxx>
55
56 #include "GLUTkey.hxx"
57 #include "options.hxx"
58 #include "views.hxx"
59
60
61 // Force an update of the sky and lighting parameters
62 static void local_update_sky_and_lighting_params( void ) {
63     // fgSunInit();
64     SolarSystem::theSolarSystem->rebuild();
65     cur_light_params.Update();
66     fgSkyColorsInit();
67 }
68
69
70 // Handle keyboard events
71 void GLUTkey(unsigned char k, int x, int y) {
72     FGInterface *f;
73     fgTIME *t;
74     FGView *v;
75     FGWeather *w;
76     float fov, tmp;
77     static bool winding_ccw = true;
78
79     f = current_aircraft.fdm_state;
80     t = &cur_time_params;
81     v = &current_view;
82     w = &current_weather;
83
84     FG_LOG( FG_INPUT, FG_DEBUG, "Key hit = " << k );
85     puKeyboard(k, PU_DOWN );
86
87     if ( GLUT_ACTIVE_ALT && glutGetModifiers() ) {
88         FG_LOG( FG_INPUT, FG_DEBUG, " SHIFTED" );
89         switch (k) {
90         case 1: // Ctrl-A key
91             fgAPToggleAltitude();
92             return;
93         case 8: // Ctrl-H key
94             fgAPToggleHeading();
95             return;
96         case 18: // Ctrl-R key
97             // temporary
98             winding_ccw = !winding_ccw;
99             if ( winding_ccw ) {
100                 glFrontFace ( GL_CCW );
101             } else {
102                 glFrontFace ( GL_CW );
103             }
104             return;
105         case 19: // Ctrl-S key
106             fgAPToggleAutoThrottle();
107             return;
108         case 20: // Ctrl-T key
109             fgAPToggleTerrainFollow();
110             return;
111         case 49: // numeric keypad 1
112             v->set_goal_view_offset( FG_PI * 0.75 );
113             return;
114         case 50: // numeric keypad 2
115             v->set_goal_view_offset( FG_PI );
116             return;
117         case 51: // numeric keypad 3
118             v->set_goal_view_offset( FG_PI * 1.25 );
119             return;
120         case 52: // numeric keypad 4
121             v->set_goal_view_offset( FG_PI * 0.50 );
122             return;
123         case 54: // numeric keypad 6
124             v->set_goal_view_offset( FG_PI * 1.50 );
125             return;
126         case 55: // numeric keypad 7
127             v->set_goal_view_offset( FG_PI * 0.25 );
128             return;
129         case 56: // numeric keypad 8
130             v->set_goal_view_offset( 0.00 );
131             return;
132         case 57: // numeric keypad 9
133             v->set_goal_view_offset( FG_PI * 1.75 );
134             return;
135         case 72: // H key
136             // status = current_options.get_hud_status();
137             // current_options.set_hud_status(!status);
138             HUD_brightkey( true );
139             return;
140         case 73: // i key
141             // Minimal Hud
142             fgHUDInit2(&current_aircraft);
143             return;
144         case 77: // M key
145             t->warp -= 60;
146             local_update_sky_and_lighting_params();
147             return;
148         case 84: // T key
149             t->warp_delta -= 30;
150             local_update_sky_and_lighting_params();
151             return;
152         case 87: // W key
153 #if defined(FX) && !defined(WIN32)
154             global_fullscreen = ( !global_fullscreen );
155 #  if defined(XMESA_FX_FULLSCREEN) && defined(XMESA_FX_WINDOW)
156             XMesaSetFXmode( global_fullscreen ? 
157                             XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW );
158 #  endif
159 #endif
160             return;
161         case 88: // X key
162             fov = current_options.get_fov();
163             fov *= 1.05;
164             if ( fov > FG_FOV_MAX ) {
165                 fov = FG_FOV_MAX;
166             }
167             current_options.set_fov(fov);
168             v->force_update_fov_math();
169             return;
170         case 90: // Z key
171             tmp = w->get_visibility();   // in meters
172             tmp /= 1.10;
173             w->set_visibility( tmp );
174             return;
175         }
176     } else {
177         FG_LOG( FG_INPUT, FG_DEBUG, "" );
178         switch (k) {
179         case 50: // numeric keypad 2
180             if( fgAPAltitudeEnabled() ) {
181                 fgAPAltitudeAdjust( 100 );
182             } else {
183                 controls.move_elevator(-0.05);
184             }
185             return;
186         case 56: // numeric keypad 8
187             if( fgAPAltitudeEnabled() ) {
188                 fgAPAltitudeAdjust( -100 );
189             } else {
190                 controls.move_elevator(0.05);
191             }
192             return;
193         case 49: // numeric keypad 1
194             controls.move_elevator_trim(-0.001);
195             return;
196         case 55: // numeric keypad 7
197             controls.move_elevator_trim(0.001);
198             return;
199         case 52: // numeric keypad 4
200             controls.move_aileron(-0.05);
201             return;
202         case 54: // numeric keypad 6
203             controls.move_aileron(0.05);
204             return;
205         case 48: // numeric keypad Ins
206             if( fgAPHeadingEnabled() ) {
207                 fgAPHeadingAdjust( -1 );
208             } else {
209                 controls.move_rudder(-0.05);
210             }
211             return;
212         case 13: // numeric keypad Enter
213             if( fgAPHeadingEnabled() ) {
214                 fgAPHeadingAdjust( 1 );
215             } else {
216                 controls.move_rudder(0.05);
217             }
218             return;
219         case 53: // numeric keypad 5
220             controls.set_aileron(0.0);
221             controls.set_elevator(0.0);
222             controls.set_rudder(0.0);
223             return;
224         case 57: // numeric keypad 9 (Pg Up)
225             if( fgAPAutoThrottleEnabled() ) {
226                 fgAPAutoThrottleAdjust( 5 );
227             } else {
228                 controls.move_throttle( FGControls::ALL_ENGINES, 0.01 );
229             }
230             return;
231         case 51: // numeric keypad 3 (Pg Dn)
232             if( fgAPAutoThrottleEnabled() ) {
233                 fgAPAutoThrottleAdjust( -5 );
234             } else {
235                 controls.move_throttle( FGControls::ALL_ENGINES, -0.01 );
236             }
237             return;
238         case 98: // b key
239             int b_ret;
240             double b_set;
241             b_ret = int( controls.get_brake( 0 ) );
242             b_set = double(!b_ret);
243             controls.set_brake( FGControls::ALL_WHEELS, b_set);
244             return;
245         case 104: // h key
246             HUD_brightkey( false );
247             return;
248         case 105: // i key
249             fgHUDInit(&current_aircraft);  // normal HUD
250             return;
251         case 109: // m key
252             t->warp += 60;
253             local_update_sky_and_lighting_params();
254             return;
255         case 112: // p key
256             t->pause = !t->pause;
257             // printf position and attitude information
258             FG_LOG( FG_INPUT, FG_INFO,
259                     "Lon = " << f->get_Longitude() * RAD_TO_DEG
260                     << "  Lat = " << f->get_Latitude() * RAD_TO_DEG
261                     << "  Altitude = " << f->get_Altitude() * FEET_TO_METER );
262             FG_LOG( FG_INPUT, FG_INFO,
263                     "Heading = " << f->get_Psi() * RAD_TO_DEG 
264                     << "  Roll = " << f->get_Phi() * RAD_TO_DEG
265                     << "  Pitch = " << f->get_Theta() * RAD_TO_DEG );
266             return;
267         case 116: // t key
268             t->warp_delta += 30;
269             local_update_sky_and_lighting_params();
270             return;
271         case 120: // X key
272             fov = current_options.get_fov();
273             fov /= 1.05;
274             if ( fov < FG_FOV_MIN ) {
275                 fov = FG_FOV_MIN;
276             }
277             current_options.set_fov(fov);
278             v->force_update_fov_math();
279             return;
280         case 122: // z key
281             tmp = w->get_visibility();   // in meters
282             tmp *= 1.10;
283             w->set_visibility( tmp );
284             return;
285         case 27: // ESC
286             // if( fg_DebugOutput ) {
287             //   fclose( fg_DebugOutput );
288             // }
289             FG_LOG( FG_INPUT, FG_ALERT, 
290                     "Program exiting normally at user request." );
291             exit(-1);
292         }
293     }
294 }
295
296
297 // Handle "special" keyboard events
298 void GLUTspecialkey(int k, int x, int y) {
299     FGView *v;
300
301     v = &current_view;
302
303     FG_LOG( FG_INPUT, FG_DEBUG, "Special key hit = " << k );
304     puKeyboard(k + PU_KEY_GLUT_SPECIAL_OFFSET, PU_DOWN);
305
306     if ( GLUT_ACTIVE_SHIFT && glutGetModifiers() ) {
307         FG_LOG( FG_INPUT, FG_DEBUG, " SHIFTED" );
308         switch (k) {
309         case GLUT_KEY_END: // numeric keypad 1
310             v->set_goal_view_offset( FG_PI * 0.75 );
311             return;
312         case GLUT_KEY_DOWN: // numeric keypad 2
313             v->set_goal_view_offset( FG_PI );
314             return;
315         case GLUT_KEY_PAGE_DOWN: // numeric keypad 3
316             v->set_goal_view_offset( FG_PI * 1.25 );
317             return;
318         case GLUT_KEY_LEFT: // numeric keypad 4
319             v->set_goal_view_offset( FG_PI * 0.50 );
320             return;
321         case GLUT_KEY_RIGHT: // numeric keypad 6
322             v->set_goal_view_offset( FG_PI * 1.50 );
323             return;
324         case GLUT_KEY_HOME: // numeric keypad 7
325             v->set_goal_view_offset( FG_PI * 0.25 );
326             return;
327         case GLUT_KEY_UP: // numeric keypad 8
328             v->set_goal_view_offset( 0.00 );
329             return;
330         case GLUT_KEY_PAGE_UP: // numeric keypad 9
331             v->set_goal_view_offset( FG_PI * 1.75 );
332             return;
333         }
334     } else {
335         FG_LOG( FG_INPUT, FG_DEBUG, "" );
336         switch (k) {
337         case GLUT_KEY_F8: // F8 toggles fog ... off fastest nicest...
338             current_options.cycle_fog();
339         
340             if ( current_options.get_fog() == fgOPTIONS::FG_FOG_DISABLED ) {
341                 FG_LOG( FG_INPUT, FG_INFO, "Fog disabled" );
342             } else if ( current_options.get_fog() == 
343                         fgOPTIONS::FG_FOG_FASTEST )
344             {
345                 FG_LOG( FG_INPUT, FG_INFO, 
346                         "Fog enabled, hint set to fastest" );
347             } else if ( current_options.get_fog() ==
348                         fgOPTIONS::FG_FOG_NICEST )
349             {
350                 FG_LOG( FG_INPUT, FG_INFO,
351                         "Fog enabled, hint set to nicest" );
352             }
353
354             return;
355         case GLUT_KEY_F9: // F9 toggles textures on and off...
356             if ( material_mgr.get_textures_loaded() ) {
357                 current_options.get_textures() ?
358                     current_options.set_textures(false) :
359                     current_options.set_textures(true);
360                 FG_LOG( FG_INPUT, FG_INFO, "Toggling texture" );
361             } else {
362                 FG_LOG( FG_INPUT, FG_INFO, 
363                         "No textures loaded, cannot toggle" );
364             }
365             return;
366         case GLUT_KEY_F10: // F10 toggles menu on and off...
367             FG_LOG(FG_INPUT, FG_INFO, "Invoking call back function");
368             hideMenuButton -> 
369                 setValue ((int) !(hideMenuButton -> getValue() ) );
370             hideMenuButton -> invokeCallback();
371             //exit(1);
372             return;
373         case GLUT_KEY_UP:
374             if( fgAPAltitudeEnabled() ) {
375                 fgAPAltitudeAdjust( -100 );
376             } else {
377                 controls.move_elevator(0.05);
378             }
379             return;
380         case GLUT_KEY_DOWN:
381             if( fgAPAltitudeEnabled() ) {
382                 fgAPAltitudeAdjust( 100 );
383             } else {
384                 controls.move_elevator(-0.05);
385             }
386             return;
387         case GLUT_KEY_LEFT:
388             controls.move_aileron(-0.05);
389             return;
390         case GLUT_KEY_RIGHT:
391             controls.move_aileron(0.05);
392             return;
393         case GLUT_KEY_HOME: // numeric keypad 1
394             controls.move_elevator_trim(0.001);
395             return;
396         case GLUT_KEY_END: // numeric keypad 7
397             controls.move_elevator_trim(-0.001);
398             return;
399         case GLUT_KEY_INSERT: // numeric keypad Ins
400             if( fgAPHeadingEnabled() ) {
401                 fgAPHeadingAdjust( -1 );
402             } else {
403                 controls.move_rudder(-0.05);
404             }
405             return;
406         case 13: // numeric keypad Enter
407             if( fgAPHeadingEnabled() ) {
408                 fgAPHeadingAdjust( 1 );
409             } else {
410                 controls.move_rudder(0.05);
411             }
412             return;
413         case 53: // numeric keypad 5
414             controls.set_aileron(0.0);
415             controls.set_elevator(0.0);
416             controls.set_rudder(0.0);
417             return;
418         case GLUT_KEY_PAGE_UP: // numeric keypad 9 (Pg Up)
419             if( fgAPAutoThrottleEnabled() ) {
420                 fgAPAutoThrottleAdjust( 5 );
421             } else {
422                 controls.move_throttle( FGControls::ALL_ENGINES, 0.01 );
423             }
424             return;
425         case GLUT_KEY_PAGE_DOWN: // numeric keypad 3 (Pg Dn)
426             if( fgAPAutoThrottleEnabled() ) {
427                 fgAPAutoThrottleAdjust( -5 );
428             } else {
429                 controls.move_throttle( FGControls::ALL_ENGINES, -0.01 );
430             }
431             return;
432         }
433     }
434 }
435
436
437 // $Log$
438 // Revision 1.44  1999/04/03 04:21:01  curt
439 // Integration of Steve's plib conglomeration.
440 // Optimizations (tm) by Norman Vine.
441 //
442 // Revision 1.43  1999/03/11 23:09:46  curt
443 // When "Help" is selected from the menu check to see if netscape is running.
444 // If so, command it to go to the flight gear user guide url.  Otherwise
445 // start a new version of netscape with this url.
446 //
447 // Revision 1.42  1999/02/26 22:09:46  curt
448 // Added initial support for native SGI compilers.
449 //
450 // Revision 1.41  1999/02/12 23:22:43  curt
451 // Allow auto-throttle adjustment while active.
452 //
453 // Revision 1.40  1999/02/12 22:17:59  curt
454 // Changes to allow adjustment of the autopilot settings while it is activated.
455 //
456 // Revision 1.39  1999/02/05 21:29:07  curt
457 // Modifications to incorporate Jon S. Berndts flight model code.
458 //
459 // Revision 1.38  1998/12/11 20:26:25  curt
460 // Fixed view frustum culling accuracy bug so we can look out the sides and
461 // back without tri-stripes dropping out.
462 //
463 // Revision 1.37  1998/12/09 18:50:22  curt
464 // Converted "class fgVIEW" to "class FGView" and updated to make data
465 // members private and make required accessor functions.
466 //
467 // Revision 1.36  1998/12/06 13:51:20  curt
468 // Turned "struct fgWEATHER" into "class FGWeather".
469 //
470 // Revision 1.35  1998/12/05 16:13:17  curt
471 // Renamed class fgCONTROLS to class FGControls.
472 //
473 // Revision 1.34  1998/12/05 15:54:17  curt
474 // Renamed class fgFLIGHT to class FGState as per request by JSB.
475 //
476 // Revision 1.33  1998/12/03 01:17:12  curt
477 // Converted fgFLIGHT to a class.
478 //
479 // Revision 1.32  1998/11/06 21:18:06  curt
480 // Converted to new logstream debugging facility.  This allows release
481 // builds with no messages at all (and no performance impact) by using
482 // the -DFG_NDEBUG flag.
483 //
484 // Revision 1.31  1998/11/02 18:25:37  curt
485 // Check for __CYGWIN__ (b20) as well as __CYGWIN32__ (pre b20 compilers)
486 // Other misc. tweaks.
487 //
488 // Revision 1.30  1998/10/25 14:08:46  curt
489 // Turned "struct fgCONTROLS" into a class, with inlined accessor functions.
490 //
491 // Revision 1.29  1998/10/20 14:58:57  curt
492 // Ctrl-R now reverses default polygon winding so I can see if a hole in the
493 // terrain is a result of improper winding, or if it is just an empty hole.
494 //
495 // Revision 1.28  1998/10/17 01:34:20  curt
496 // C++ ifying ...
497 //
498 // Revision 1.27  1998/10/02 12:46:46  curt
499 // Added an "auto throttle"
500 //
501 // Revision 1.26  1998/10/01 00:38:04  curt
502 // More altitude hold tweaks.
503 //
504 // Revision 1.25  1998/09/29 02:03:36  curt
505 // Autopilot mods.
506 //
507 // Revision 1.24  1998/09/26 13:16:44  curt
508 // C++-ified the comments.
509 //
510 // Revision 1.23  1998/09/17 18:35:30  curt
511 // Added F8 to toggle fog and F9 to toggle texturing.
512 //
513 // Revision 1.22  1998/09/15 04:27:27  curt
514 // Changes for new Astro code.
515 //
516 // Revision 1.21  1998/08/29 13:09:25  curt
517 // Changes to event manager from Bernie Bright.
518 //
519 // Revision 1.20  1998/08/24 20:11:12  curt
520 // Added i/I to toggle full vs. minimal HUD.
521 // Added a --hud-tris vs --hud-culled option.
522 // Moved options accessor funtions to options.hxx.
523 //
524 // Revision 1.19  1998/08/05 00:19:33  curt
525 // Added a local routine to update lighting params every frame when time is
526 // accelerated.
527 //
528 // Revision 1.18  1998/07/30 23:48:24  curt
529 // Output position & orientation when pausing.
530 // Eliminated libtool use.
531 // Added options to specify initial position and orientation.
532 // Changed default fov to 55 degrees.
533 // Added command line option to start in paused or unpaused state.
534 //
535 // Revision 1.17  1998/07/27 18:41:23  curt
536 // Added a pause command "p"
537 // Fixed some initialization order problems between pui and glut.
538 // Added an --enable/disable-sound option.
539 //
540 // Revision 1.16  1998/07/16 17:33:34  curt
541 // "H" / "h" now control hud brightness as well with off being one of the
542 //   states.
543 // Better checking for xmesa/fx 3dfx fullscreen/window support for deciding
544 //   whether or not to build in the feature.
545 // Translucent menu support.
546 // HAVE_AUDIO_SUPPORT -> ENABLE_AUDIO_SUPPORT
547 // Use fork() / wait() for playing mp3 init music in background under unix.
548 // Changed default tile diameter to 5.
549 //
550 // Revision 1.15  1998/07/13 21:01:34  curt
551 // Wrote access functions for current fgOPTIONS.
552 //
553 // Revision 1.14  1998/07/06 02:42:02  curt
554 // Added support for switching between fullscreen and window mode for
555 // Mesa/3dfx/glide.
556 //
557 // Added a basic splash screen.  Restructured the main loop and top level
558 // initialization routines to do this.
559 //
560 // Hacked in some support for playing a startup mp3 sound file while rest
561 // of sim initializes.  Currently only works in Unix using the mpg123 player.
562 // Waits for the mpg123 player to finish before initializing internal
563 // sound drivers.
564 //
565 // Revision 1.13  1998/06/27 16:54:32  curt
566 // Replaced "extern displayInstruments" with a entry in fgOPTIONS.
567 // Don't change the view port when displaying the panel.
568 //
569 // Revision 1.12  1998/06/12 14:27:26  curt
570 // Pui -> PUI, Gui -> GUI.
571 //
572 // Revision 1.11  1998/06/12 00:57:38  curt
573 // Added support for Pui/Gui.
574 // Converted fog to GL_FOG_EXP2.
575 // Link to static simulator parts.
576 // Update runfg.bat to try to be a little smarter.
577 //
578 // Revision 1.10  1998/05/27 02:24:05  curt
579 // View optimizations by Norman Vine.
580 //
581 // Revision 1.9  1998/05/16 13:05:21  curt
582 // Added limits to fov.
583 //
584 // Revision 1.8  1998/05/13 18:29:56  curt
585 // Added a keyboard binding to dynamically adjust field of view.
586 // Added a command line option to specify fov.
587 // Adjusted terrain color.
588 // Root path info moved to fgOPTIONS.
589 // Added ability to parse options out of a config file.
590 //
591 // Revision 1.7  1998/05/07 23:14:14  curt
592 // Added "D" key binding to set autopilot heading.
593 // Made frame rate calculation average out over last 10 frames.
594 // Borland C++ floating point exception workaround.
595 // Added a --tile-radius=n option.
596 //
597 // Revision 1.6  1998/04/28 01:20:20  curt
598 // Type-ified fgTIME and fgVIEW.
599 // Added a command line option to disable textures.
600 //
601 // Revision 1.5  1998/04/25 22:06:29  curt
602 // Edited cvs log messages in source files ... bad bad bad!
603 //
604 // Revision 1.4  1998/04/25 20:24:00  curt
605 // Cleaned up initialization sequence to eliminate interdependencies
606 // between sun position, lighting, and view position.  This creates a
607 // valid single pass initialization path.
608 //
609 // Revision 1.3  1998/04/24 14:19:29  curt
610 // Fog tweaks.
611 //
612 // Revision 1.2  1998/04/24 00:49:17  curt
613 // Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
614 // Trying out some different option parsing code.
615 // Some code reorganization.
616 //
617 // Revision 1.1  1998/04/22 13:25:40  curt
618 // C++ - ifing the code.
619 // Starting a bit of reorganization of lighting code.
620 //
621 // Revision 1.33  1998/04/18 04:11:25  curt
622 // Moved fg_debug to it's own library, added zlib support.
623 //
624 // Revision 1.32  1998/04/14 02:21:01  curt
625 // Incorporated autopilot heading hold contributed by:  Jeff Goeke-Smith
626 // <jgoeke@voyager.net>
627 //
628 // Revision 1.31  1998/04/08 23:34:05  curt
629 // Patch from Durk to fix trim reversal with numlock key active.
630 //
631 // Revision 1.30  1998/04/03 22:09:02  curt
632 // Converting to Gnu autoconf system.
633 //
634 // Revision 1.29  1998/02/07 15:29:40  curt
635 // Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
636 // <chotchkiss@namg.us.anritsu.com>
637 //
638 // Revision 1.28  1998/02/03 23:20:23  curt
639 // Lots of little tweaks to fix various consistency problems discovered by
640 // Solaris' CC.  Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
641 // passed arguments along to the real printf().  Also incorporated HUD changes
642 // by Michele America.
643 //
644 // Revision 1.27  1998/01/27 00:47:55  curt
645 // Incorporated Paul Bleisch's <pbleisch@acm.org> new debug message
646 // system and commandline/config file processing code.
647 //
648 // Revision 1.26  1998/01/19 19:27:07  curt
649 // Merged in make system changes from Bob Kuehne <rpk@sgi.com>
650 // This should simplify things tremendously.
651 //
652 // Revision 1.25  1998/01/05 18:44:34  curt
653 // Add an option to advance/decrease time from keyboard.
654 //
655 // Revision 1.24  1997/12/30 16:36:46  curt
656 // Merged in Durk's changes ...
657 //
658 // Revision 1.23  1997/12/15 23:54:44  curt
659 // Add xgl wrappers for debugging.
660 // Generate terrain normals on the fly.
661 //
662 // Revision 1.22  1997/12/10 22:37:45  curt
663 // Prepended "fg" on the name of all global structures that didn't have it yet.
664 // i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
665 //
666 // Revision 1.21  1997/08/27 21:32:23  curt
667 // Restructured view calculation code.  Added stars.
668 //
669 // Revision 1.20  1997/08/27 03:30:13  curt
670 // Changed naming scheme of basic shared structures.
671 //
672 // Revision 1.19  1997/08/25 20:27:21  curt
673 // Merged in initial HUD and Joystick code.
674 //
675 // Revision 1.18  1997/08/22 21:34:38  curt
676 // Doing a bit of reorganizing and house cleaning.
677 //
678 // Revision 1.17  1997/07/19 22:34:02  curt
679 // Moved PI definitions to ../constants.h
680 // Moved random() stuff to ../Utils/ and renamed fg_random()
681 //
682 // Revision 1.16  1997/07/18 23:41:24  curt
683 // Tweaks for building with Cygnus Win32 compiler.
684 //
685 // Revision 1.15  1997/07/16 20:04:47  curt
686 // Minor tweaks to aid Win32 port.
687 //
688 // Revision 1.14  1997/07/12 03:50:20  curt
689 // Added an #include <Windows32/Base.h> to help compiling for Win32
690 //
691 // Revision 1.13  1997/06/25 15:39:46  curt
692 // Minor changes to compile with rsxnt/win32.
693 //
694 // Revision 1.12  1997/06/21 17:12:52  curt
695 // Capitalized subdirectory names.
696 //
697 // Revision 1.11  1997/06/18 04:10:31  curt
698 // A couple more runway tweaks ...
699 //
700 // Revision 1.10  1997/06/18 02:21:23  curt
701 // Hacked in a runway
702 //
703 // Revision 1.9  1997/06/02 03:40:06  curt
704 // A tiny bit more view tweaking.
705 //
706 // Revision 1.8  1997/06/02 03:01:38  curt
707 // Working on views (side, front, back, transitions, etc.)
708 //
709 // Revision 1.7  1997/05/31 19:16:25  curt
710 // Elevator trim added.
711 //
712 // Revision 1.6  1997/05/31 04:13:52  curt
713 // WE CAN NOW FLY!!!
714 //
715 // Continuing work on the LaRCsim flight model integration.
716 // Added some MSFS-like keyboard input handling.
717 //
718 // Revision 1.5  1997/05/30 23:26:19  curt
719 // Added elevator/aileron controls.
720 //
721 // Revision 1.4  1997/05/27 17:44:31  curt
722 // Renamed & rearranged variables and routines.   Added some initial simple
723 // timer/alarm routines so the flight model can be updated on a regular 
724 // interval.
725 //
726 // Revision 1.3  1997/05/23 15:40:25  curt
727 // Added GNU copyright headers.
728 // Fog now works!
729 //
730 // Revision 1.2  1997/05/23 00:35:12  curt
731 // Trying to get fog to work ...
732 //
733 // Revision 1.1  1997/05/21 15:57:50  curt
734 // Renamed due to added GLUT support.
735 //
736 // Revision 1.2  1997/05/19 18:22:41  curt
737 // Parameter tweaking ... starting to stub in fog support.
738 //
739 // Revision 1.1  1997/05/16 16:05:51  curt
740 // Initial revision.
741