]> git.mxchange.org Git - flightgear.git/blob - Simulator/Cockpit/hud.cxx
Merge Include as subdirectory
[flightgear.git] / Simulator / Cockpit / hud.cxx
1 // hud.cxx -- hud defines and prototypes
2 //
3 // Written by Michele America, started September 1997.
4 //
5 // Copyright (C) 1997  Michele F. America  - micheleamerica@geocities.com
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 #ifdef __BORLANDC__
34 #  define exception c_exception
35 #endif
36 #include <math.h>
37
38 #include <GL/glut.h>
39 #include <stdlib.h>
40 #include <string.h>
41
42 #include <Aircraft/aircraft.hxx>
43 #include <Debug/logstream.hxx>
44 #include <Include/fg_constants.h>
45 #include <Main/options.hxx>
46 #include <Math/fg_random.h>
47 #include <Math/mat3.h>
48 #include <Math/polar3d.hxx>
49 #include <Scenery/scenery.hxx>
50 #include <Time/fg_timer.hxx>
51
52 #if defined ( __sun__ ) || defined ( __sgi )
53 extern "C" {
54   extern void *memmove(void *, const void *, size_t);
55 }
56 #endif
57
58 #include "hud.hxx"
59
60
61 static char units[5];
62
63 // The following routines obtain information concerntin the aircraft's
64 // current state and return it to calling instrument display routines.
65 // They should eventually be member functions of the aircraft.
66 //
67
68 HudContainerType HUD_deque;
69
70 class locRECT {
71   public:
72     RECT rect;
73
74     locRECT( UINT left, UINT top, UINT right, UINT bottom);
75     RECT get_rect(void) { return rect;}
76 };
77
78 locRECT :: locRECT( UINT left, UINT top, UINT right, UINT bottom)
79 {
80   rect.left   =  left;
81   rect.top    =  top;
82   rect.right  =  right;
83   rect.bottom =  bottom;
84
85 }
86 // #define DEBUG
87
88 void drawOneLine( UINT x1, UINT y1, UINT x2, UINT y2)
89 {
90   glBegin(GL_LINES);
91   glVertex2f(x1, y1);
92   glVertex2f(x2, y2);
93   glEnd();
94 }
95
96 void drawOneLine( RECT &rect)
97 {
98   glBegin(GL_LINES);
99   glVertex2f(rect.left, rect.top);
100   glVertex2f(rect.right, rect.bottom);
101   glEnd();
102 }
103
104 //
105 // The following code deals with painting the "instrument" on the display
106 //
107    /* textString - Bitmap font string */
108
109 void textString( int x, int y, char *msg, void *font ){
110         glRasterPos2f(x, y);
111         while (*msg) {
112                 glutBitmapCharacter(font, *msg);
113                 msg++;
114     }
115 }
116
117 /* strokeString - Stroke font string */
118
119 void strokeString(int x, int y, char *msg, void *font, float theta)
120 {
121 int xx;
122 int yy;
123
124         glPushMatrix();
125   glRotatef(theta * RAD_TO_DEG, 0.0, 0.0, 1.0);
126   xx = (int)(x * cos(theta) + y * sin( theta ));
127   yy = (int)(y * cos(theta) - x * sin( theta ));
128         glTranslatef( xx, yy, 0);
129         glScalef(.1, .1, 0.0);
130         while (*msg) {
131                 glutStrokeCharacter(font, *msg);
132                 msg++;
133         }
134         glPopMatrix();
135 }
136
137 //========================= End of Class Implementations===================
138 // fgHUDInit
139 //
140 // Constructs a HUD object and then adds in instruments. At the present
141 // the instruments are hard coded into the routine. Ultimately these need
142 // to be defined by the aircraft's instrumentation records so that the
143 // display for a Piper Cub doesn't show the speed range of a North American
144 // mustange and the engine readouts of a B36!
145 //
146
147 #define INSTRDEFS 21
148
149 int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
150 {
151   instr_item *HIptr;
152   int index;
153
154   FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
155
156   HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());  // empty the HUD deque
157
158 //  hud->code = 1;
159 //  hud->status = 0;
160
161   // For now lets just hardcode the hud here.
162   // In the future, hud information has to come from the same place
163   // aircraft information came from.
164
165 //  fgHUDSetTimeMode( hud, NIGHT );
166 //  fgHUDSetBrightness( hud, BRT_LIGHT );
167
168   index = 0;
169
170   do {
171     switch ( index ) {
172       case 0:     // TBI
173         HIptr = (instr_item *) new fgTBI_instr( 270, 100, 60, 10 );
174         break;
175
176       case 1:     // Artificial Horizon
177         HIptr = (instr_item *) new HudLadder( 240, 195, 120, 180 );
178         break;
179
180       case 2:    // KIAS
181         HIptr = (instr_item *) new hud_card( 130,
182                                              170,
183                                               28,
184                                              200,
185                                              get_speed,
186                                              HUDS_LEFT | HUDS_VERT,
187                                              200.0, 0.0,
188                                              1.0,
189                                              10,  5,
190                                              0,
191                                              0,
192                                              50.0,
193                                              true);
194
195         break;
196
197       case 3:    // Radio Altimeter
198         HIptr = (instr_item *) new hud_card( 420,
199                                              195,
200                                               25,
201                                              150,
202                                              get_agl,
203                                              HUDS_LEFT | HUDS_VERT,
204                                              1000, 0,
205                                              1.0,
206                                              25,    5,
207                                              0,
208                                              0,
209                                              200.0,
210                                              true);
211         break;
212
213       case 4:    // GYRO COMPASS
214         HIptr = (instr_item *) new hud_card( 200,
215                                              375,
216                                              200,
217                                               28,
218                                              get_heading,
219                                              HUDS_TOP,
220                                              360, 0,
221                                                1.0,
222                                                5,   1,
223                                              360,
224                                                0,
225                                               25,
226                                              true);
227         break;
228
229       case 5:    // AMSL
230         HIptr = (instr_item *) new hud_card( 460,
231                                              170,
232                                               35,
233                                              200,
234                                              get_altitude,
235                                              HUDS_RIGHT | HUDS_VERT,
236                                              15000, -500,
237                                              1.0,
238                                              100,  25,
239                                              0,
240                                              0,
241                                              250,
242                                              true);
243         break;
244
245       case 6:
246         HIptr = (instr_item *) new  guage_instr( 250,            // x
247                                                  350,            // y
248                                                  100,            // width
249                                                   20,            // height
250                                                  get_aileronval, // data source
251                                                  HUDS_BOTTOM | HUDS_NOTEXT,
252                                                  100.0,
253                                                  +1.0,
254                                                  -1.0);
255         break;
256
257       case 7:
258         HIptr = (instr_item *) new  guage_instr( 170,             // x
259                                                  225,             // y
260                                                   20,             // width
261                                                  100,             // height
262                                                  get_elevatorval, // data source
263                                                  HUDS_RIGHT | HUDS_VERT | HUDS_NOTEXT,
264                                                 -100.0,           // Scale data
265                                                   +1.0,           // Data Range
266                                                   -1.0);
267         break;
268
269       case 8:
270         HIptr = (instr_item *) new  guage_instr( 250,             // x
271                                                  200,             // y
272                                                  100,             // width
273                                                   20,             // height
274                                                  get_rudderval,   // data source
275                                                  HUDS_TOP | HUDS_NOTEXT,
276                                                  100.0,
277                                                  +1.0,
278                                                  -1.0);
279         break;
280
281       case 9:
282         HIptr = (instr_item *) new  guage_instr( 100,             // x
283                                                  190,
284                                                   20,
285                                                  160,             // height
286                                                  get_throttleval, // data source
287                                                  HUDS_VERT | HUDS_RIGHT | HUDS_NOTEXT,
288                                                  100.0,
289                                                    1.0,
290                                                    0.0);
291         break;
292
293       case 10:    // Digital KIAS
294         HIptr = (instr_item *) new instr_label ( 110,
295                                                  150,
296                                                   40,
297                                                   30,
298                                                  get_speed,
299                                                  "%5.0f",
300                                                  NULL,
301                                                  " Kts",
302                                                  1.0,
303                                                  HUDS_TOP,
304                                                  RIGHT_JUST,
305                                                  SMALL,
306                                                  0,
307                                                  TRUE );
308         break;
309
310       case 11:    // Digital Rate of Climb
311         HIptr = (instr_item *) new instr_label ( 110,
312                                                  135,
313                                                   40,
314                                                   10,
315                                                  get_climb_rate,
316                                                  "%5.0f",
317                                                  " Climb",
318                                                  NULL,
319                                                  1.0,
320                                                  HUDS_TOP,
321                                                  RIGHT_JUST,
322                                                  SMALL,
323                                                  0,
324                                                  TRUE );
325         break;
326
327       case 12:    // Roll indication diagnostic
328         HIptr = (instr_item *) new instr_label ( 110,
329                                                  120,
330                                                   40,
331                                                   10,
332                                                  get_roll,
333                                                  "%5.2f",
334                                                  " Roll",
335                                                  " Deg",
336                                                  1.0,
337                                                  HUDS_TOP,
338                                                  RIGHT_JUST,
339                                                  SMALL,
340                                                  0,
341                                                  TRUE );
342         break;
343
344       case 13:    // Angle of attack diagnostic
345         HIptr = (instr_item *) new instr_label ( 440,
346                                                  150,
347                                                   60,
348                                                   10,
349                                                  get_aoa,
350                                                  "      %5.2f",
351                                                  "AOA",
352                                                  " Deg",
353                                                  1.0,
354                                                  HUDS_TOP,
355                                                  RIGHT_JUST,
356                                                  SMALL,
357                                                  0,
358                                                  TRUE );
359         break;
360
361       case 14:
362         HIptr = (instr_item *) new instr_label ( 440,
363                                                  135,
364                                                   60,
365                                                   10,
366                                                  get_heading,
367                                                  " %5.1f",
368                                                  "Heading ",
369                                                  " Deg",
370                                                  1.0,
371                                                  HUDS_TOP,
372                                                  RIGHT_JUST,
373                                                  SMALL,
374                                                  0,
375                                                  TRUE );
376         break;
377
378       case 15:
379         HIptr = (instr_item *) new instr_label ( 440,
380                                                  120,
381                                                   60,
382                                                   10,
383                                                  get_sideslip,
384                                                  "%5.2f",
385                                                  "Sideslip ",
386                                                  NULL,
387                                                  1.0,
388                                                  HUDS_TOP,
389                                                  RIGHT_JUST,
390                                                  SMALL,
391                                                  0,
392                                                  TRUE );
393         break;
394
395       case 16:
396         HIptr = (instr_item *) new instr_label( 440,
397                                                 100,
398                                                  60,
399                                                  10,
400                                                 get_throttleval,
401                                                 "%5.2f",
402                                                 "Throttle ",
403                                                 NULL,
404                                                  1.0,
405                                                 HUDS_TOP,
406                                                 RIGHT_JUST,
407                                                 SMALL,
408                                                 0,
409                                                 TRUE );
410         break;
411
412       case 17:
413         HIptr = (instr_item *) new instr_label( 440,
414                                                  85,
415                                                  60,
416                                                  10,
417                                                 get_elevatorval,
418                                                 "%5.2f",
419                                                 "Elevator ",
420                                                 NULL,
421                                                  1.0,
422                                                 HUDS_TOP,
423                                                 RIGHT_JUST,
424                                                 SMALL,
425                                                 0,
426                                                 TRUE );
427         break;
428
429       case 18:
430         HIptr = (instr_item *) new instr_label( 440,
431                                                  60,
432                                                  60,
433                                                  10,
434                                                 get_aileronval,
435                                                 "%5.2f",
436                                                 "Aileron  ",
437                                                 NULL,
438                                                  1.0,
439                                                 HUDS_TOP,
440                                                 RIGHT_JUST,
441                                                 SMALL,
442                                                 0,
443                                                 TRUE );
444         break;
445
446
447       case 19:
448         HIptr = (instr_item *) new instr_label( 10,
449                                                 10,
450                                                 60,
451                                                 10,
452                                                  get_frame_rate,
453                                                 "%.0f",
454                                                 "Frame rate = ",
455                                                 NULL,
456                                                  1.0,
457                                                 HUDS_TOP,
458                                                 RIGHT_JUST,
459                                                 SMALL,
460                                                 0,
461                                                 TRUE );
462         break;
463
464       case 20:
465           switch( current_options.get_tris_or_culled() ) {
466           case 0:
467               HIptr = (instr_item *) new instr_label( 10,
468                                                       25,
469                                                       90,
470                                                       10,
471                                                       get_vfc_tris_drawn,
472                                                       "%.0f",
473                                                       "Tris Rendered = ",
474                                                       NULL,
475                                                       1.0,
476                                                       HUDS_TOP,
477                                                       RIGHT_JUST,
478                                                       SMALL,
479                                                       0,
480                                                       TRUE );
481               break;
482           case 1:
483               HIptr = (instr_item *) new instr_label( 10,
484                                                       25,
485                                                       90,
486                                                       10,
487                                                       get_vfc_ratio,
488                                                       "%.2f",
489                                                       "VFC Ratio = ",
490                                                       NULL,
491                                                       1.0,
492                                                       HUDS_TOP,
493                                                       RIGHT_JUST,
494                                                       SMALL,
495                                                       0,
496                                                       TRUE );
497               break;
498           }
499           break;
500
501       case 21:
502         HIptr = (instr_item *) new instr_label( 10,
503                                                 40,
504                                                 90,
505                                                 10,
506                                                 get_fov,
507                                                 "%.1f",
508                                                 "FOV = ",
509                                                 NULL,
510                                                 1.0,
511                                                 HUDS_TOP,
512                                                 RIGHT_JUST,
513                                                 SMALL,
514                                                 0,
515                                                 TRUE );
516         break;
517
518       default:
519         HIptr = 0;;
520       }
521     if( HIptr ) {                   // Anything to install?
522       HUD_deque.insert( HUD_deque.begin(), HIptr);
523       }
524     index++;
525     }
526   while( HIptr );
527
528   return 0;  // For now. Later we may use this for an error code.
529 }
530
531 int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
532 {
533     int index;
534
535     FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
536
537     HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());
538
539     //  hud->code = 1;
540     //  hud->status = 0;
541
542     // For now lets just hardcode the hud here.
543     // In the future, hud information has to come from the same place
544     // aircraft information came from.
545
546     //  fgHUDSetTimeMode( hud, NIGHT );
547     //  fgHUDSetBrightness( hud, BRT_LIGHT );
548
549     //  index = 0;
550     index = 19;  
551
552     instr_item* p;
553
554     p = new instr_label( 10, 10, 60, 10,
555                          get_frame_rate,
556                          "%.0f",
557                          "Frame rate = ",
558                          NULL,
559                          1.0,
560                          HUDS_TOP,
561                          RIGHT_JUST,
562                          SMALL,
563                          0,
564                          TRUE );
565     HUD_deque.push_front( p );
566
567     if ( current_options.get_tris_or_culled() == 0 )
568         p = new instr_label( 10, 25, 90, 10,
569                              get_vfc_tris_drawn,
570                              "%.0f",
571                              "Tris Rendered = ",
572                              NULL,
573                              1.0,
574                              HUDS_TOP,
575                              RIGHT_JUST,
576                              SMALL,
577                              0,
578                              TRUE );
579     else
580         p = new instr_label( 10, 25, 90, 10,
581                              get_vfc_ratio,
582                              "%.2f",
583                              "VFC Ratio = ",
584                              NULL,
585                              1.0,
586                              HUDS_TOP,
587                              RIGHT_JUST,
588                              SMALL,
589                              0,
590                              TRUE );
591     HUD_deque.push_front( p );
592
593     p = new instr_label( 10, 40, 90, 10,
594                          get_fov,
595                          "%.1f",
596                          "FOV = ",
597                          NULL,
598                          1.0,
599                          HUDS_TOP,
600                          RIGHT_JUST,
601                          SMALL,
602                          0,
603                          TRUE );
604     HUD_deque.push_front( p );
605
606     const int x_pos = 480;
607     p = new instr_label( x_pos, 40, 40, 30,
608                          get_speed,
609                          "%5.0f",
610                          "Airspeed ",
611                          " Kts",
612                          1.0,
613                          HUDS_TOP,
614                          RIGHT_JUST,
615                          SMALL,
616                          0,
617                          TRUE );
618     HUD_deque.push_front( p );
619
620     if ( current_options.get_units() == fgOPTIONS::FG_UNITS_FEET ) {
621         strcpy(units, " ft");
622     } else {
623         strcpy(units, " m");
624     }
625     p = new instr_label( x_pos, 25, 40, 10,
626                          get_altitude,
627                          "%5.0f",
628                          "Altitude ",
629                          units,
630                          1.0,
631                          HUDS_TOP,
632                          RIGHT_JUST,
633                          SMALL,
634                          0,
635                          TRUE );
636     HUD_deque.push_front( p );
637
638     p = new instr_label( x_pos, 10, 60, 10,
639                          get_heading,
640                          "%5.1f",
641                          "Heading  ",
642                          " Deg",
643                          1.0,
644                          HUDS_TOP,
645                          RIGHT_JUST,
646                          SMALL,
647                          0,
648                          TRUE );
649     HUD_deque.push_front( p );
650
651     return 0;  // For now. Later we may use this for an error code.
652 }
653
654 int global_day_night_switch = DAY;
655
656 void HUD_brightkey( bool incr_bright )
657 {
658 instr_item *pHUDInstr = HUD_deque[0];
659 int brightness        = pHUDInstr->get_brightness();
660
661   if( current_options.get_hud_status() ) {
662     if( incr_bright ) {
663       switch (brightness) {
664         case BRT_LIGHT:
665               current_options.set_hud_status(0);
666           break;
667
668         case BRT_MEDIUM:
669           brightness = BRT_LIGHT;
670           break;
671
672         case BRT_DARK:
673           brightness = BRT_MEDIUM;
674           break;
675
676         case BRT_BLACK:
677           brightness = BRT_DARK;
678           break;
679
680         default:
681           brightness = BRT_BLACK;
682         }
683       }
684     else {
685       switch (brightness) {
686         case BRT_LIGHT:
687           brightness = BRT_MEDIUM;
688           break;
689
690         case BRT_MEDIUM:
691           brightness = BRT_DARK;
692           break;
693
694         case BRT_DARK:
695           brightness = BRT_BLACK;
696           break;
697
698         case BRT_BLACK:
699         default:
700               current_options.set_hud_status(0);
701         }
702       }
703     }
704   else {
705     current_options.set_hud_status(1);
706     if( incr_bright ) {
707       if( DAY == global_day_night_switch ) {
708         brightness = BRT_BLACK;
709         }
710       else {
711         brightness = BRT_DARK;
712         global_day_night_switch = DAY;
713         }
714       }
715     else {
716       if( NIGHT == global_day_night_switch ) {
717         brightness = BRT_DARK;
718         }
719       else {
720         brightness = BRT_MEDIUM;
721         global_day_night_switch = NIGHT;
722         }
723       }
724     }
725   pHUDInstr->SetBrightness( brightness );
726 }
727
728 // fgUpdateHUD
729 //
730 // Performs a once around the list of calls to instruments installed in
731 // the HUD object with requests for redraw. Kinda. It will when this is
732 // all C++.
733 //
734 void fgUpdateHUD( void ) {
735   int i;
736   int brightness;
737 //  int day_night_sw = current_aircraft.controls->day_night_switch;
738   int day_night_sw = global_day_night_switch;
739   int hud_displays = HUD_deque.size();
740   instr_item *pHUDInstr;
741
742   if( !hud_displays ) {  // Trust everyone, but ALWAYS cut the cards!
743     return;
744     }
745
746   pHUDInstr = HUD_deque[0];
747   brightness = pHUDInstr->get_brightness();
748 //  brightness = HUD_deque.at(0)->get_brightness();
749
750   glMatrixMode(GL_PROJECTION);
751   glPushMatrix();
752
753   glLoadIdentity();
754   gluOrtho2D(0, 640, 0, 480);
755   glMatrixMode(GL_MODELVIEW);
756   glPushMatrix();
757   glLoadIdentity();
758
759   glColor3f(1.0, 1.0, 1.0);
760   glIndexi(7);
761
762   glDisable(GL_DEPTH_TEST);
763   glDisable(GL_LIGHTING);
764
765   glLineWidth(1);
766
767   HudIterator current = HUD_deque.begin();
768   HudIterator last = HUD_deque.end();
769
770   for ( ; current != last; ++current ) {
771     pHUDInstr = *current;
772
773     // for( i = hud_displays; i; --i) { // Draw everything
774     // if( HUD_deque.at(i)->enabled()) {
775     // pHUDInstr = HUD_deque[i - 1];
776     if( pHUDInstr->enabled()) {
777                                    // We should to respond to a dial instead
778                                    // or as well to the of time of day. Of
779                                    // course, we have no dial!
780       if( day_night_sw == DAY) {
781         switch (brightness) {
782           case BRT_LIGHT:
783             glColor3f (0.1, 0.9, 0.1);
784             break;
785
786           case BRT_MEDIUM:
787             glColor3f (0.1, 0.7, 0.0);
788             break;
789
790           case BRT_DARK:
791             glColor3f (0.0, 0.5, 0.0);
792             break;
793
794           case BRT_BLACK:
795             glColor3f( 0.0, 0.0, 0.0);
796             break;
797
798           default:;
799             }
800           }
801         else {
802           if( day_night_sw == NIGHT) {
803             switch (brightness) {
804               case BRT_LIGHT:
805                 glColor3f (0.9, 0.1, 0.1);
806                 break;
807
808               case BRT_MEDIUM:
809                 glColor3f (0.7, 0.0, 0.1);
810                 break;
811
812               case BRT_DARK:
813               default:
814                 glColor3f (0.5, 0.0, 0.0);
815               }
816             }
817           else {     // Just in case default
818             glColor3f (0.1, 0.9, 0.1);
819             }
820           }
821     //  fgPrintf( FG_COCKPIT, FG_DEBUG, "HUD Code %d  Status %d\n",
822     //            hud->code, hud->status );
823       pHUDInstr->draw();
824 //      HUD_deque.at(i)->draw(); // Responsible for broken or fixed variants.
825                               // No broken displays honored just now.
826       }
827     }
828
829   glEnable(GL_DEPTH_TEST);
830   glEnable(GL_LIGHTING);
831   glMatrixMode(GL_PROJECTION);
832   glPopMatrix();
833   glMatrixMode(GL_MODELVIEW);
834   glPopMatrix();
835 }
836
837 // $Log$
838 // Revision 1.32  1999/03/02 01:02:37  curt
839 // Tweaks for building with native SGI compilers.
840 //
841 // Revision 1.31  1999/02/02 20:13:31  curt
842 // MSVC++ portability changes by Bernie Bright:
843 //
844 // Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
845 // Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
846 // Simulator/Cockpit/hud.cxx: Added Standard headers
847 // Simulator/Cockpit/panel.cxx: Redefinition of default parameter
848 // Simulator/Flight/flight.cxx: Replaced cout with FG_LOG.  Deleted <stdio.h>
849 // Simulator/Main/fg_init.cxx:
850 // Simulator/Main/GLUTmain.cxx:
851 // Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
852 // Simulator/Objects/material.hxx:
853 // Simulator/Time/timestamp.hxx: VC++ friend kludge
854 // Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
855 // Simulator/Main/views.hxx: Added a constant
856 //
857 // Revision 1.30  1999/01/27 04:47:52  curt
858 // Make lower end of altitude = -500 so the altimeter is guaged below zero (such
859 // as in death valley.)
860 //
861 // Revision 1.29  1998/12/18 23:35:10  curt
862 // Converted to a simpler frame rate counting method.
863 //
864 // Revision 1.28  1998/11/23 21:48:59  curt
865 // Borland portability tweaks.
866 //
867 // Revision 1.27  1998/11/06 21:17:47  curt
868 // Converted to new logstream debugging facility.  This allows release
869 // builds with no messages at all (and no performance impact) by using
870 // the -DFG_NDEBUG flag.
871 //
872 // Revision 1.26  1998/11/03 12:33:11  curt
873 // Display ft or m in mini-hud next to altitude.
874 //
875 // Revision 1.25  1998/10/17 01:33:57  curt
876 // C++ ifying ...
877 //
878 // Revision 1.24  1998/10/16 23:27:25  curt
879 // C++-ifying.
880 //
881 // Revision 1.23  1998/10/16 00:53:00  curt
882 // Mods to display a bit more info when mini-hud is active.
883 //
884 // Revision 1.22  1998/09/29 14:56:31  curt
885 // c++-ified comments.
886 //
887 // Revision 1.21  1998/09/29 02:01:07  curt
888 // Added a "rate of climb" indicator.
889 //
890 // Revision 1.20  1998/08/24 20:05:16  curt
891 // Added a second minimalistic HUD.
892 // Added code to display the number of triangles rendered.
893 //
894 // Revision 1.19  1998/07/30 23:44:05  curt
895 // Tweaks for sgi building.
896 //
897 // Revision 1.18  1998/07/20 12:47:55  curt
898 // Replace the hud rendering for loop (which linearly searches the the hud
899 // list to find the entry with the proper position) with a simple linear
900 // traversal using an "iterator."
901 //
902 // Revision 1.17  1998/07/13 21:28:02  curt
903 // Converted the aoa scale to a radio altimeter.
904 //
905 // Revision 1.16  1998/07/13 21:00:47  curt
906 // Integrated Charlies latest HUD updates.
907 // Wrote access functions for current fgOPTIONS.
908 //
909 // Revision 1.15  1998/07/08 14:41:08  curt
910 // Renamed polar3d.h to polar3d.hxx
911 //
912 // Revision 1.14  1998/07/06 21:31:20  curt
913 // Removed an extraneous ^M.
914 //
915 // Revision 1.13  1998/07/03 13:16:28  curt
916 // Added Charlie Hotchkiss's HUD updates and improvementes.
917 //
918 // Revision 1.11  1998/06/05 18:17:10  curt
919 // Added the declaration of memmove needed by the stl which apparently
920 // solaris only defines for cc compilations and not for c++ (__STDC__)
921 //
922 // Revision 1.10  1998/05/17 16:58:12  curt
923 // Added a View Frustum Culling ratio display to the hud.
924 //
925 // Revision 1.9  1998/05/16 13:04:14  curt
926 // New updates from Charlie Hotchkiss.
927 //
928 // Revision 1.8  1998/05/13 18:27:54  curt
929 // Added an fov to hud display.
930 //
931 // Revision 1.7  1998/05/11 18:13:11  curt
932 // Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
933 //
934 // Revision 1.22  1998/04/18 04:14:02  curt
935 // Moved fg_debug.c to it's own library.
936 //
937 // Revision 1.21  1998/04/03 21:55:28  curt
938 // Converting to Gnu autoconf system.
939 // Tweaks to hud.c
940 //
941 // Revision 1.20  1998/03/09 22:48:40  curt
942 // Minor "formatting" tweaks.
943 //
944 // Revision 1.19  1998/02/23 20:18:28  curt
945 // Incorporated Michele America's hud changes.
946 //
947 // Revision 1.18  1998/02/21 14:53:10  curt
948 // Added Charlie's HUD changes.
949 //
950 // Revision 1.17  1998/02/20 00:16:21  curt
951 // Thursday's tweaks.
952 //
953 // Revision 1.16  1998/02/19 13:05:49  curt
954 // Incorporated some HUD tweaks from Michelle America.
955 // Tweaked the sky's sunset/rise colors.
956 // Other misc. tweaks.
957 //
958 // Revision 1.15  1998/02/16 13:38:39  curt
959 // Integrated changes from Charlie Hotchkiss.
960 //
961 // Revision 1.14  1998/02/12 21:59:41  curt
962 // Incorporated code changes contributed by Charlie Hotchkiss
963 // <chotchkiss@namg.us.anritsu.com>
964 //
965 // Revision 1.12  1998/02/09 15:07:48  curt
966 // Minor tweaks.
967 //
968 // Revision 1.11  1998/02/07 15:29:34  curt
969 // Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
970 // <chotchkiss@namg.us.anritsu.com>
971 //
972 // Revision 1.10  1998/02/03 23:20:14  curt
973 // Lots of little tweaks to fix various consistency problems discovered by
974 // Solaris' CC.  Fixed a bug in fg_debug.c with how the fgPrintf() wrapper
975 // passed arguments along to the real printf().  Also incorporated HUD changes
976 // by Michele America.
977 //
978 // Revision 1.9  1998/01/31 00:43:04  curt
979 // Added MetroWorks patches from Carmen Volpe.
980 //
981 // Revision 1.8  1998/01/27 00:47:51  curt
982 // Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
983 // system and commandline/config file processing code.
984 //
985 // Revision 1.7  1998/01/19 18:40:20  curt
986 // Tons of little changes to clean up the code and to remove fatal errors
987 // when building with the c++ compiler.
988 //
989 // Revision 1.6  1997/12/15 23:54:34  curt
990 // Add xgl wrappers for debugging.
991 // Generate terrain normals on the fly.
992 //
993 // Revision 1.5  1997/12/10 22:37:39  curt
994 // Prepended "fg" on the name of all global structures that didn't have it yet.
995 // i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
996 //
997 // Revision 1.4  1997/09/23 00:29:32  curt
998 // Tweaks to get things to compile with gcc-win32.
999 //
1000 // Revision 1.3  1997/09/05 14:17:26  curt
1001 // More tweaking with stars.
1002 //
1003 // Revision 1.2  1997/09/04 02:17:30  curt
1004 // Shufflin' stuff.
1005 //
1006 // Revision 1.1  1997/08/29 18:03:22  curt
1007 // Initial revision.
1008 //