]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/hud.hxx
Tiled panel background support from Jim Wilson.
[flightgear.git] / src / Cockpit / hud.hxx
index c6d004d0218d490e12be213c25457e2c0cf18408..f9243297417809eca59154f97d204f2da8d6f1f0 100644 (file)
@@ -48,6 +48,7 @@
 
 #include <vector>       // STL vector
 #include <deque>        // STL double ended queue
+#include STL_FSTREAM
 
 #include <simgear/constants.h>
 
 #include <FDM/flight.hxx>
 #include <Controls/controls.hxx>
 #include <GUI/gui.h>
+#include <Main/globals.hxx>
+#include <Main/viewmgr.hxx>
 
 #include "hud_opts.hxx"
 
-FG_USING_STD(deque);
-FG_USING_STD(vector);
-FG_USING_NAMESPACE(std);
+SG_USING_STD(deque);
+SG_USING_STD(vector);
+SG_USING_NAMESPACE(std);
 
 
 // some of Norman's crazy optimizations. :-)
 
 #ifndef WIN32
-  typedef struct {
-      int x, y;
-  } POINT;
+typedef struct {
+    int x, y;
+} POINT;
  
-  typedef struct {
-      int top, bottom, left, right;
-  } RECT;
+typedef struct {
+    int top, bottom, left, right;
+} RECT;
 #endif
 
 // View mode definitions
@@ -169,6 +172,7 @@ extern float get_elev_trimval( void );
 extern float get_rudderval   ( void );
 extern float get_speed       ( void );
 extern float get_aoa         ( void );
+extern float get_nlf         ( void );
 extern float get_roll        ( void );
 extern float get_pitch       ( void );
 extern float get_heading     ( void );
@@ -191,20 +195,61 @@ extern char *coord_format_lat(float);
 extern char *coord_format_lon(float);
 //extern char *coord_format_latlon(float latitude, float longitude);  // cockpit.cxx
 
+// $$$ begin - added, VS Renganathan, 13 Oct 2K
+// #define FIGHTER_HUD
+extern float get_anzg (void);
+extern float get_Vx (void);
+extern float get_Vy (void);
+extern float get_Vz (void);
+extern float get_Ax (void);
+extern float get_Ay (void);
+extern float get_Az (void);
+extern int get_iaux1 (void);
+extern int get_iaux2 (void);
+extern int get_iaux3 (void);
+extern int get_iaux4 (void);
+extern int get_iaux5 (void);
+extern int get_iaux6 (void);
+extern int get_iaux7 (void);
+extern int get_iaux8 (void);
+extern int get_iaux9 (void);
+extern int get_iaux10 (void);
+extern int get_iaux11 (void);
+extern int get_iaux12 (void);
+extern float get_aux1(void);
+extern float get_aux2(void);
+extern float get_aux3(void);
+extern float get_aux4(void);
+extern float get_aux5 (void);
+extern float get_aux6 (void);
+extern float get_aux7 (void);
+extern float get_aux8(void);
+extern float get_aux9(void);
+extern float get_aux10(void);
+extern float get_aux11(void);
+extern float get_aux12(void);
+extern float get_aux13(void);
+extern float get_aux14(void);
+extern float get_aux15(void);
+extern float get_aux16(void);
+extern float get_aux17(void);
+extern float get_aux18(void);
+// $$$ end - added, VS Renganathan, 13 Oct 2K
+
 extern char *get_formated_gmt_time( void );
 extern void fgHUDReshape(void);
 
 enum  hudinstype{ HUDno_instr,
-              HUDscale,
-              HUDlabel,
-              HUDladder,
-              HUDcirc_ladder,
-              HUDhorizon,
-              HUDguage,
-              HUDdual_inst,
-              HUDmoving_scale,
-              HUDtbi
-              };
+                  HUDscale,
+                  HUDlabel,
+                  HUDladder,
+                  HUDcirc_ladder,
+                  HUDhorizon,
+                  HUDgauge,
+                  HUDdual_inst,
+                  HUDmoving_scale,
+                  HUDtbi
+};
 
 typedef struct gltagRGBTRIPLE { // rgbt
     GLfloat Blue;
@@ -246,23 +291,26 @@ private:
     float x, y;
     char msg[64];
 public:
-    fgText( float x = 0, float y = 0, char *c = NULL )
-        : x(x), y(y) {strncpy(msg,c,64-1);}
-
+    int digit; //suma
+    fgText(float x = 0, float y = 0, char *c = NULL,int digits=0): x(x), y(y) //suma
+    { 
+        strcpy(msg,c);
+        digit=digits; //suma
+    }
+                  
     fgText( const fgText & image )
-        : x(image.x), y(image.y) {strcpy(msg,image.msg);}
+        : x(image.x), y(image.y),digit(image.digit) {strcpy(msg,image.msg);} //suma
 
     fgText& operator = ( const fgText & image ) {
-        strcpy(msg,image.msg); x = image.x; y = image.y;
-        return *this;
+        strcpy(msg,image.msg); x = image.x; y = image.y;digit=image.digit; //suma
+        return *this;   
     }
 
     ~fgText() {msg[0]='\0';}
 
     int getStringWidth ( char *str )
     {
-        if ( HUDtext && str )
-        {
+        if ( HUDtext && str ) {
             float r, l ;
             guiFntHandle->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
             return FloatToInt( r - l );
@@ -272,24 +320,68 @@ public:
     
     int StringWidth (void )
     {
-        if ( HUDtext && strlen( msg ))
-        {
+        if ( HUDtext && strlen( msg )) {
             float r, l ;
             guiFntHandle->getBBox ( msg, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
             return FloatToInt( r - l );
         }
         return 0 ;
     }
-    
-    void Draw(fntRenderer *fnt)
-    {
-        fnt->start2f( x, y );
-        fnt->puts   ( msg ) ;
+   
+    // this code is changed to display Numbers with big/small digits
+    // according to MIL Standards for example Altitude above 10000 ft
+    // is shown as 10ooo.  begin suma
+
+    void Draw(fntRenderer *fnt,int digits) {
+        if(digits==1) {
+            int c=0,i=0;
+            char *t=msg;
+            int p=4;
+
+            if(t[0]=='-') {
+                //if negative value then increase the c and p values
+                //for '-' sign.  c++;
+                p++;
+            }
+            char *tmp=msg;
+            while(tmp[i]!='\0') {
+                if((tmp[i]>='0') && (tmp[i]<='9'))  
+                    c++;
+                i++;
+            }
+            if(c>p) {
+                fnt->setPointSize(8);
+                int p1=c-3;
+                char *tmp1=msg+p1;
+                int p2=p1*8;
+                         
+                fnt->start2f(x+p2,y);
+                fnt->puts(tmp1);
+
+                fnt->setPointSize(12);
+                char tmp2[64];
+                strncpy(tmp2,msg,p1);
+                tmp2[p1]='\0';
+                        
+                fnt->start2f(x,y);
+                fnt->puts(tmp2);
+            } else {
+                fnt->setPointSize(12);                                 
+                fnt->start2f( x, y );
+                fnt->puts(tmp);
+            }
+        } else {
+            //if digits not equal to 1
+            fnt->setPointSize(8);         
+            fnt->start2f( x, y );
+            fnt->puts( msg ) ;
+        }
     }
+    //end suma
 
     void Draw()
     {
-        puDrawString ( guiFnt, msg, FloatToInt(x), FloatToInt(y) );
+        guiFnt.drawString( msg, FloatToInt(x), FloatToInt(y) );
     }
 };
 
@@ -300,28 +392,28 @@ public:
     ~fgLineList( void ) {}
     void add( fgLineSeg2D seg ) { List.push_back(seg); }
     void erase( void ) { List.erase( List.begin(), List.end() ); }
-       void draw( void ) {
-               vector < fgLineSeg2D > :: iterator curSeg;
-               vector < fgLineSeg2D > :: iterator lastSeg;
-               curSeg  = List.begin();
-               lastSeg = List.end();
-               glBegin(GL_LINES);
-               for ( ; curSeg != lastSeg; curSeg++ ) {
-                       curSeg->draw();
-               }
-               glEnd();
-       }
-/*    void draw( void ) {
+    void draw( void ) {
         vector < fgLineSeg2D > :: iterator curSeg;
         vector < fgLineSeg2D > :: iterator lastSeg;
-       curSeg  = List.begin();
+        curSeg  = List.begin();
         lastSeg = List.end();
         glBegin(GL_LINES);
         for ( ; curSeg != lastSeg; curSeg++ ) {
             curSeg->draw();
         }
         glEnd();
-    } */
+    }
+    /*    void draw( void ) {
+          vector < fgLineSeg2D > :: iterator curSeg;
+          vector < fgLineSeg2D > :: iterator lastSeg;
+          curSeg  = List.begin();
+          lastSeg = List.end();
+          glBegin(GL_LINES);
+          for ( ; curSeg != lastSeg; curSeg++ ) {
+          curSeg->draw();
+          }
+          glEnd();
+          } */
 };
 
 class fgTextList {
@@ -349,7 +441,7 @@ public:
 
         Font->begin();
         for( ; curString != lastString; curString++ ) {
-            curString->Draw(Font);
+            curString->Draw(Font,curString->digit); //suma
         }
         Font->end();
 
@@ -382,14 +474,14 @@ extern fgLineList         HUD_StippleLineList;
 
 
 class instr_item {  // An Abstract Base Class (ABC)
-  private:
+private:
     static UINT        instances;     // More than 64K instruments? Nah!
     static int         brightness;
     static glRGBTRIPLE color;
 
     UINT               handle;
     RECT               scrn_pos;      // Framing - affects scale dimensions
-                                    // and orientation. Vert vs Horz, etc.
+                                      // and orientation. Vert vs Horz, etc.
     FLTFNPTR           load_value_fn;
     float              disp_factor;   // Multiply by to get numbers shown on scale.
     UINT               opts;
@@ -397,16 +489,19 @@ class instr_item {  // An Abstract Base Class (ABC)
     bool               broken;
     UINT               scr_span;      // Working values for draw;
     POINT              mid_span;      //
-
-  public:
+    int                       digits;        //suma
+  
+public:
     instr_item( int            x,
                 int            y,
                 UINT           height,
                 UINT           width,
                 FLTFNPTR       data_source,
-                float         data_scaling,
+                float          data_scaling,
                 UINT           options,
-                bool           working      = true);
+                bool           working  = true,
+                int           digit = 0); //suma
+
 
     instr_item( const instr_item & image );
 
@@ -423,11 +518,14 @@ class instr_item {  // An Abstract Base Class (ABC)
     UINT    get_span        ( void ) { return scr_span;  }
     POINT   get_centroid    ( void ) { return mid_span;  }
     UINT    get_options     ( void ) { return opts;      }
+    int     get_digits     ( void ) { return digits;    } //suma
 
     UINT    huds_vert     (UINT options) { return( options  & HUDS_VERT ); }
     UINT    huds_left     (UINT options) { return( options  & HUDS_LEFT ); }
     UINT    huds_right    (UINT options) { return( options  & HUDS_RIGHT ); }
-    UINT    huds_both     (UINT options) { return( (options & HUDS_BOTH) == HUDS_BOTH ); }
+    UINT    huds_both     (UINT options) {
+        return( (options & HUDS_BOTH) == HUDS_BOTH );
+    }
     UINT    huds_noticks  (UINT options) { return( options  & HUDS_NOTICKS ); }
     UINT    huds_notext   (UINT options) { return( options  & HUDS_NOTEXT ); }
     UINT    huds_top      (UINT options) { return( options  & HUDS_TOP ); }
@@ -450,20 +548,31 @@ class instr_item {  // An Abstract Base Class (ABC)
     {
         HUD_StippleLineList.add(fgLineSeg2D(x1,y1,x2,y2));
     }
-    void TextString( char *msg, float x, float y )
+    void TextString( char *msg, float x, float y,int digit ) //suma
     {
-        HUD_TextList.add(fgText(x, y, msg));        
+        HUD_TextList.add(fgText(x, y, msg,digit)); //suma  
     }
     int getStringWidth ( char *str )
     {
-        if ( HUDtext && str )
-        {
+        if ( HUDtext && str ) {
             float r, l ;
             guiFntHandle->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
             return FloatToInt( r - l );
         }
         return 0 ;
     }
+
+    //code to draw ticks as small circles
+    void drawOneCircle(float x1, float y1, float r)
+    {
+        glBegin(GL_LINE_LOOP);  // Use polygon to approximate a circle 
+        for(int count=0; count<25; count++) {             
+            float cosine = r * cos(count * 2 * SG_PI/10.0); 
+            float sine =   r * sin(count * 2 * SG_PI/10.0); 
+            glVertex2f(cosine+x1, sine+y1);
+        }     
+        glEnd(); 
+    }
     
 };
 
@@ -482,7 +591,7 @@ extern int HUD_style;
 
 
 class instr_label : public instr_item {
-  private:
+private:
     const char *pformat;
     const char *pre_str;
     const char *post_str;
@@ -490,22 +599,29 @@ class instr_label : public instr_item {
     int         fontSize;
     int         blink;
     char format_buffer[80];
+    bool               lat;
+    bool               lon;
+    bool               lbox;
 
-  public:
+public:
     instr_label( int          x,
                  int          y,
                  UINT         width,
                  UINT         height,
                  FLTFNPTR     data_source,
                  const char  *label_format,
-                 const char  *pre_label_string  = 0,
-                 const char  *post_label_string = 0,
-                 float       scale_data        = 1.0,
-                 UINT         options           = HUDS_TOP,
-                 fgLabelJust  justification     = CENTER_JUST,
-                 int          font_size         = SMALL,
-                 int          blinking          = NOBLINK,
-                 bool         working           = true);
+                 const char  *pre_label_string,
+                 const char  *post_label_string,
+                 float        scale_data,
+                 UINT         options,
+                 fgLabelJust  justification,
+                 int          font_size,
+                 int          blinking,
+                 bool            latitude,
+                 bool            longitude,
+                 bool            label_box,
+                 bool         working,
+                 int          digit ); //suma);
 
     ~instr_label();
 
@@ -518,7 +634,7 @@ typedef instr_label * pInstlabel;
 
 
 class lat_label : public instr_item {
-  private:
+private:
     const char *pformat;
     const char *pre_str;
     const char *post_str;
@@ -527,21 +643,22 @@ class lat_label : public instr_item {
     int         blink;
     char format_buffer[80];
 
-  public:
+public:
     lat_label( int          x,
-                 int          y,
-                 UINT         width,
-                 UINT         height,
-                 FLTFNPTR     data_source,
-                 const char  *label_format,
-                 const char  *pre_label_string  = 0,
-                 const char  *post_label_string = 0,
-                 float       scale_data        = 1.0,
-                 UINT         options           = HUDS_TOP,
-                 fgLabelJust  justification     = CENTER_JUST,
-                 int          font_size         = SMALL,
-                 int          blinking          = NOBLINK,
-                 bool         working           = true);
+               int          y,
+               UINT         width,
+               UINT         height,
+               FLTFNPTR     data_source,
+               const char  *label_format,
+               const char  *pre_label_string,
+               const char  *post_label_string,
+               float       scale_data,
+               UINT         options,
+               fgLabelJust  justification,
+               int          font_size,
+               int          blinking,
+               bool         working,
+               int         digits =0 );//suma
 
     ~lat_label();
 
@@ -553,7 +670,7 @@ class lat_label : public instr_item {
 typedef lat_label * pLatlabel;
 
 class lon_label : public instr_item {
-  private:
+private:
     const char *pformat;
     const char *pre_str;
     const char *post_str;
@@ -562,21 +679,23 @@ class lon_label : public instr_item {
     int         blink;
     char format_buffer[80];
 
-  public:
+public:
     lon_label( int          x,
-                 int          y,
-                 UINT         width,
-                 UINT         height,
-                 FLTFNPTR     data_source,
-                 const char  *label_format,
-                 const char  *pre_label_string  = 0,
-                 const char  *post_label_string = 0,
-                 float       scale_data        = 1.0,
-                 UINT         options           = HUDS_TOP,
-                 fgLabelJust  justification     = CENTER_JUST,
-                 int          font_size         = SMALL,
-                 int          blinking          = NOBLINK,
-                 bool         working           = true);
+               int          y,
+               UINT         width,
+               UINT         height,
+               FLTFNPTR     data_source,
+               const char  *label_format,
+               const char  *pre_label_string,
+               const char  *post_label_string,
+               float       scale_data,
+               UINT         options,
+               fgLabelJust  justification,
+               int          font_size,
+               int          blinking,
+               bool         working,
+               int         digit=0); //suma
+
 
     ~lon_label();
 
@@ -594,7 +713,7 @@ typedef lon_label * pLonlabel;
 //
 
 class instr_scale : public instr_item {
-  private:
+private:
     float range_shown;   // Width Units.
     float Maximum_value; //                ceiling.
     float Minimum_value; // Representation floor.
@@ -604,7 +723,7 @@ class instr_scale : public instr_item {
     UINT   Modulo;        // Roll over point
     int    signif_digits; // digits to show to the right.
 
-  public:
+public:
     instr_scale( int          x,
                  int          y,
                  UINT         width,
@@ -612,14 +731,14 @@ class instr_scale : public instr_item {
                  FLTFNPTR     load_fn,
                  UINT         options,
                  float       show_range,
-                 float       max_value    = 100.0,
-                 float       min_value    =   0.0,
-                 float       disp_scaling =   1.0,
-                 UINT         major_divs   =    10,
-                 UINT         minor_divs   =     5,
-                 UINT         rollover     =     0,
-                 int          dp_showing   =     2,
-                 bool         working      =  true);
+                 float       max_value,
+                 float       min_value,
+                 float       disp_scaling,
+                 UINT         major_divs,
+                 UINT         minor_divs,
+                 UINT         rollover,
+                 int          dp_showing,
+                 bool         working = true);
 
     virtual ~instr_scale();
     instr_scale( const instr_scale & image);
@@ -641,77 +760,120 @@ class instr_scale : public instr_item {
 // line.
 
 class hud_card : public instr_scale {
-  private:
+private:
     float val_span;
+    string type;
     float half_width_units;
+    bool  draw_tick_bottom;
+    bool  draw_tick_top;
+    bool  draw_tick_right;
+    bool  draw_tick_left;
+    bool  draw_cap_bottom;
+    bool  draw_cap_top;
+    bool  draw_cap_right;
+    bool  draw_cap_left;
+    float marker_offset;
+    bool  pointer;
+    string  pointer_type;
+    string  tick_type;
+    string  tick_length;
+    float   radius; //suma
+    float   maxValue; //suma
+    float   minValue; //suma
+    int                divisions; //suma
+    int     zoom; //suma
+    UINT       Maj_div; //suma
+    UINT       Min_div; //suma
+       
     
-  public:
+public:
     hud_card( int      x,
               int      y,
               UINT     width,
               UINT     height,
               FLTFNPTR load_fn,
               UINT     options,
-              float   maxValue      = 100.0,
-              float   minValue      =   0.0,
-              float   disp_scaling  =   1.0,
-              UINT     major_divs    =  10,
-              UINT     minor_divs    =   5,
-              UINT     modulator     = 100,
-              int      dp_showing    =   2,
-              float   value_span    = 100.0,
-              bool     working       = true);
+              float    maxValue,
+              float    minValue,
+              float    disp_scaling,
+              UINT     major_divs,
+              UINT     minor_divs,
+              UINT     modulator,
+              int      dp_showing,
+              float    value_span,
+             string   type,
+             bool     draw_tick_bottom,
+             bool     draw_tick_top,
+             bool     draw_tick_right,
+             bool     draw_tick_left,
+             bool     draw_cap_bottom,
+             bool     draw_cap_top,
+             bool     draw_cap_right,
+             bool     draw_cap_left,
+             float    marker_offset,
+             bool     pointer,
+             string   pointer_type,
+              string  tick_type,
+              string  tick_length,
+              bool     working,
+              float    radius, //suma
+              int      divisions, //suma
+              int         zoom); //suma
+
 
     ~hud_card();
     hud_card( const hud_card & image);
     hud_card & operator = (const hud_card & rhs );
-//    virtual void display_enable( bool setting );
+    //    virtual void display_enable( bool setting );
     virtual void draw( void );       // Required method in base class
+    void circles(float,float,float); // suma
+    void fixed(float,float,float,float,float,float); //suma
+    void zoomed_scale(int,int); //suma
 };
 
 typedef hud_card * pCardScale;
 
-class guage_instr : public instr_scale {
-  public:
-    guage_instr( int       x,
+class gauge_instr : public instr_scale {
+public:
+    gauge_instr( int       x,
                  int       y,
                  UINT      width,
                  UINT      height,
                  FLTFNPTR  load_fn,
                  UINT      options,
-                 float    disp_scaling = 1.0,
-                 float    maxValue     = 100,
-                 float    minValue     =   0,
-                 UINT      major_divs   =  50,
-                 UINT      minor_divs   =   0,
-                 int       dp_showing   =   2,
-                 UINT      modulus      =   0,
-                 bool      working      = true);
-
-    ~guage_instr();
-    guage_instr( const guage_instr & image);
-    guage_instr & operator = (const guage_instr & rhs );
+                 float     disp_scaling,
+                 float     maxValue,
+                 float     minValue,
+                 UINT      major_divs,
+                 UINT      minor_divs,
+                 int       dp_showing,
+                 UINT      modulus,
+                 bool      working);
+
+    ~gauge_instr();
+    gauge_instr( const gauge_instr & image);
+    gauge_instr & operator = (const gauge_instr & rhs );
     virtual void draw( void );       // Required method in base class
 };
 
-typedef guage_instr * pGuageInst;
+typedef gauge_instr * pGaugeInst;
 //
 // dual_instr_item         This class was created to form the base class
 //                         for both panel and HUD Turn Bank Indicators.
 
 class dual_instr_item : public instr_item {
-  private:
+private:
     FLTFNPTR alt_data_source;
 
-  public:
+public:
     dual_instr_item ( int       x,
                       int       y,
                       UINT      width,
                       UINT      height,
                       FLTFNPTR  chn1_source,
                       FLTFNPTR  chn2_source,
-                      bool      working     = true,
-                      UINT      options  = HUDS_TOP);
+                      bool      working,
+                      UINT      options );
 
     virtual ~dual_instr_item() {};
     dual_instr_item( const dual_instr_item & image);
@@ -722,23 +884,28 @@ class dual_instr_item : public instr_item {
     virtual void draw ( void ) { }
 };
 
-class fgTBI_instr : public dual_instr_item {
-  private:
+class fgTBI_instr : public dual_instr_item 
+{
+private:
     UINT BankLimit;
     UINT SlewLimit;
     UINT scr_hole;
+    bool tsi;  //suma
+    float rad; //suma
 
-  public:
+public:
     fgTBI_instr( int       x,
                  int       y,
                  UINT      width,
                  UINT      height,
-                 FLTFNPTR  chn1_source  = get_roll,
-                 FLTFNPTR  chn2_source  = get_sideslip,
-                 float    maxBankAngle = 45.0,
-                 float    maxSlipAngle =  5.0,
-                 UINT      gap_width    =  5,
-                 bool      working      =  true);
+                 FLTFNPTR  chn1_source,
+                 FLTFNPTR  chn2_source,
+                 float    maxBankAngle,
+                 float    maxSlipAngle,
+                 UINT      gap_width,
+                 bool      working,
+                 bool     tsi, //suma
+                 float     rad); //suma
 
     fgTBI_instr( const fgTBI_instr & image);
     fgTBI_instr & operator = (const fgTBI_instr & rhs );
@@ -754,42 +921,75 @@ class fgTBI_instr : public dual_instr_item {
 typedef fgTBI_instr * pTBI;
 
 class HudLadder : public dual_instr_item {
-  private:
+private:
     UINT   width_units;
     int    div_units;
     UINT   minor_div;
     UINT   label_pos;
     UINT   scr_hole;
-    UINT   minimal;
-    float vmax;
-    float vmin;
-    float factor;
+    float  vmax;
+    float  vmin;
+    float  factor;
+    string hudladder_type;
+    bool   frl;
+    bool   target_spot;
+    bool   velocity_vector;
+    bool   drift_marker;
+    bool   alpha_bracket;
+    bool       energy_marker;
+    bool       climb_dive_marker;
+    bool       glide_slope_marker;
+    float      glide_slope;
+    bool       energy_worm;
+    bool       waypoint_marker;
+    int     zenith; //suma
+    int     nadir; //suma
+    int                hat; //suma
+    
 
     fgTextList         TextList;
     fgLineList         LineList;
     fgLineList         StippleLineList;
 
-  public:
-    HudLadder( int       x,
+public:
+    HudLadder( string    name,
+              int       x,
                int       y,
                UINT      width,
                UINT      height,
-               UINT      minimal        =    0,
-               FLTFNPTR  ptch_source    = get_roll,
-               FLTFNPTR  roll_source    = get_pitch,
-               float     span_units     = 45.0,
-               float     division_units = 10.0,
-               float     minor_division =  0.0,
-               UINT      screen_hole    =   70,
-               UINT      lbl_pos        =    0,
-               bool      working        = true );
+              float     factor,
+               FLTFNPTR  ptch_source,
+               FLTFNPTR  roll_source,
+               float     span_units,
+               float     division_units,
+               float     minor_division,
+               UINT      screen_hole,
+               UINT      lbl_pos,
+              bool      frl,
+              bool      target_spot,
+              bool     velocity_vector,
+              bool     drift_marker,
+              bool     alpha_bracket,
+              bool      energy_marker,
+              bool      climb_dive_marker,
+              bool      glide_slope_marker,
+              float     glide_slope,
+              bool      energy_worm,
+              bool      waypoint_marker,
+               bool  working,
+               int   zenith, //suma
+               int   nadir, //suma
+               int   hat); //suma
+
 
     ~HudLadder();
 
     HudLadder( const HudLadder & image );
     HudLadder & operator = ( const HudLadder & rhs );
     virtual void draw( void );
-    
+    void drawZenith(float,float,float); //suma
+    void drawNadir(float, float, float); //suma
+
     void Text( float x, float y, char *s)
     {
         TextList.add( fgText( x, y, s) );
@@ -815,18 +1015,21 @@ extern void HUD_brightkey( bool incr_bright );
 extern int  fgHUDInit( fgAIRCRAFT * /* current_aircraft */ );
 extern int  fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ );
 extern void fgUpdateHUD( void );
+extern void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
+                         GLfloat x_end, GLfloat y_end );
 
 extern void drawOneLine ( UINT x1, UINT y1, UINT x2, UINT y2);
 extern void drawOneLine ( RECT &rect);
 extern void textString  ( int x,
                           int y,
                           char *msg,
-                          void *font = GLUT_BITMAP_8_BY_13);
+                          void *font = GLUT_BITMAP_9_BY_15,int digit=0); //suma
 extern void strokeString( int x,
                           int y,
                           char *msg,
                           void *font = GLUT_STROKE_ROMAN,
                           float theta = 0);
+
 //extern void strokeString(float xx,
 //                       float yy,
 //                       char *msg,