]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/hud_lon.cxx
A couple more straggling instrumentation clean ups.
[flightgear.git] / src / Cockpit / hud_lon.cxx
index d46cf01cce8ad6bd99b83ffda5479976927f7445..0676f4e4ccc80a806097afbcdc44af3561df9f24 100644 (file)
@@ -1,31 +1,11 @@
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#  include <windows.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <simgear/constants.h>
-#include <simgear/math/fg_random.h>
-#include <simgear/math/mat3.h>
-#include <simgear/math/polar3d.hxx>
-
-#include <Aircraft/aircraft.hxx>
-#include <GUI/gui.h>
-#include <Scenery/scenery.hxx>
-#include <Time/fg_timer.hxx>
 
 #include "hud.hxx"
 
 
 #ifdef USE_HUD_TextList
-#define textString( x , y, text, font )  TextString( text, x , y )
+#define textString( x , y, text, digit )  TextString( text, x , y,digit ) //suma
 #else
-#define textString( x , y, text, font )  puDrawString ( guiFnt, text, x, y );
+#define textString( x , y, text, digit )  puDrawString ( guiFnt, text, x, y ); //suma
 #endif
 
 //======================= Top of instr_label class =========================
@@ -45,9 +25,10 @@ lon_label ::
                       fgLabelJust   justification,
                       int           font_size,
                       int           blinking,
-                      bool          working ):
+                      bool          working,
+                                         int                   digit): //suma
                            instr_item( x, y, width, height,
-                                       data_source, scale_data,options, working ),
+                                       data_source, scale_data,options, working,digit ), //suma
                            pformat  ( label_format      ),
                            pre_str  ( pre_label_string  ),
                            post_str ( post_label_string ),
@@ -141,10 +122,10 @@ draw( void )       // Required method in base class
     }
     
 #ifdef DEBUGHUD
-  fgPrintf( FG_COCKPIT, FG_DEBUG,  format_buffer );
-  fgPrintf( FG_COCKPIT, FG_DEBUG,  "\n" );
-  fgPrintf( FG_COCKPIT, FG_DEBUG, label_buffer );
-  fgPrintf( FG_COCKPIT, FG_DEBUG, "\n" );
+  fgPrintf( SG_COCKPIT, SG_DEBUG,  format_buffer );
+  fgPrintf( SG_COCKPIT, SG_DEBUG,  "\n" );
+  fgPrintf( SG_COCKPIT, SG_DEBUG, label_buffer );
+  fgPrintf( SG_COCKPIT, SG_DEBUG, "\n" );
 #endif
        
        lenstr = getStringWidth(label_buffer);
@@ -152,20 +133,20 @@ draw( void )       // Required method in base class
   if( justify == RIGHT_JUST ) {
          posincr = scrn_rect.right - lenstr;
   }else if( justify == CENTER_JUST ) {
-         posincr = get_span() - (lenstr/2); //  -lenstr*4;
+         posincr = get_span() - (lenstr/2);
   }  else {
       //  justify == LEFT_JUST
-      posincr = 0;  // 0;
+      posincr = 0;
   }
   
-  if( fontSize == SMALL ) {
+  if( fontSize == HUD_FONT_SMALL ) {
     textString( scrn_rect.left + posincr, scrn_rect.top,
-                label_buffer, GLUT_BITMAP_8_BY_13);
+                label_buffer, get_digits()); //suma
     }
   else  {
-    if( fontSize == LARGE ) {
+    if( fontSize == HUD_FONT_LARGE ) {
       textString( scrn_rect.left + posincr, scrn_rect.top,
-                  label_buffer, GLUT_BITMAP_9_BY_15);
+                  label_buffer, get_digits()); //suma
       }
     }
 }