]> git.mxchange.org Git - flightgear.git/blobdiff - Cockpit/hud.cxx
Tweaks for building with native SGI compilers.
[flightgear.git] / Cockpit / hud.cxx
index bb4457f0c5b30ea7739ce194686c19e854b404d1..eb59d8c24f5052294ea0c8f4eef65723e993ef5a 100644 (file)
 #  include <windows.h>
 #endif
 
+#ifdef __BORLANDC__
+#  define exception c_exception
+#endif
+#include <math.h>
+
 #include <GL/glut.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_VALUES_H
-#  include <values.h>  // for MAXINT
-#endif
-
 #include <Aircraft/aircraft.hxx>
-#include <Debug/fg_debug.h>
+#include <Debug/logstream.hxx>
 #include <Include/fg_constants.h>
 #include <Main/options.hxx>
 #include <Math/fg_random.h>
@@ -64,7 +65,7 @@ static char units[5];
 // They should eventually be member functions of the aircraft.
 //
 
-deque< instr_item * > HUD_deque;
+HudContainerType HUD_deque;
 
 class locRECT {
   public:
@@ -150,7 +151,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
   instr_item *HIptr;
   int index;
 
-  fgPrintf( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD\n" );
+  FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
 
   HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());  // empty the HUD deque
 
@@ -232,7 +233,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
                                              200,
                                              get_altitude,
                                              HUDS_RIGHT | HUDS_VERT,
-                                             15000, 0,
+                                             15000, -500,
                                              1.0,
                                              100,  25,
                                              0,
@@ -449,7 +450,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
                                                 60,
                                                 10,
                                                  get_frame_rate,
-                                                "%.1f",
+                                                "%.0f",
                                                 "Frame rate = ",
                                                 NULL,
                                                  1.0,
@@ -529,10 +530,9 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
 
 int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
 {
-    instr_item *HIptr;
     int index;
 
-    fgPrintf( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD\n" );
+    FG_LOG( FG_COCKPIT, FG_INFO, "Initializing current aircraft HUD" );
 
     HUD_deque.erase( HUD_deque.begin(), HUD_deque.end());
 
@@ -553,7 +553,7 @@ int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
 
     p = new instr_label( 10, 10, 60, 10,
                         get_frame_rate,
-                        "%.1f",
+                        "%.0f",
                         "Frame rate = ",
                         NULL,
                         1.0,
@@ -764,8 +764,8 @@ void fgUpdateHUD( void ) {
 
   glLineWidth(1);
 
-  deque < instr_item * > :: iterator current = HUD_deque.begin();
-  deque < instr_item * > :: iterator last = HUD_deque.end();
+  HudIterator current = HUD_deque.begin();
+  HudIterator last = HUD_deque.end();
 
   for ( ; current != last; ++current ) {
     pHUDInstr = *current;
@@ -835,6 +835,40 @@ void fgUpdateHUD( void ) {
 }
 
 // $Log$
+// Revision 1.32  1999/03/02 01:02:37  curt
+// Tweaks for building with native SGI compilers.
+//
+// Revision 1.31  1999/02/02 20:13:31  curt
+// MSVC++ portability changes by Bernie Bright:
+//
+// Lib/Serial/serial.[ch]xx: Initial Windows support - incomplete.
+// Simulator/Astro/stars.cxx: typo? included <stdio> instead of <cstdio>
+// Simulator/Cockpit/hud.cxx: Added Standard headers
+// Simulator/Cockpit/panel.cxx: Redefinition of default parameter
+// Simulator/Flight/flight.cxx: Replaced cout with FG_LOG.  Deleted <stdio.h>
+// Simulator/Main/fg_init.cxx:
+// Simulator/Main/GLUTmain.cxx:
+// Simulator/Main/options.hxx: Shuffled <fg_serial.hxx> dependency
+// Simulator/Objects/material.hxx:
+// Simulator/Time/timestamp.hxx: VC++ friend kludge
+// Simulator/Scenery/tile.[ch]xx: Fixed using std::X declarations
+// Simulator/Main/views.hxx: Added a constant
+//
+// Revision 1.30  1999/01/27 04:47:52  curt
+// Make lower end of altitude = -500 so the altimeter is guaged below zero (such
+// as in death valley.)
+//
+// Revision 1.29  1998/12/18 23:35:10  curt
+// Converted to a simpler frame rate counting method.
+//
+// Revision 1.28  1998/11/23 21:48:59  curt
+// Borland portability tweaks.
+//
+// Revision 1.27  1998/11/06 21:17:47  curt
+// Converted to new logstream debugging facility.  This allows release
+// builds with no messages at all (and no performance impact) by using
+// the -DFG_NDEBUG flag.
+//
 // Revision 1.26  1998/11/03 12:33:11  curt
 // Display ft or m in mini-hud next to altitude.
 //