]> git.mxchange.org Git - flightgear.git/blobdiff - src/Cockpit/hud.hxx
- remove unused classes lat_label and lon_label (it's the instr_label
[flightgear.git] / src / Cockpit / hud.hxx
index 73582fe2625793690ad97ca446d1a68f64bb9063..2cc0acc84947ae55f211ae59ed568e4faa04fb80 100644 (file)
@@ -21,8 +21,8 @@
 // $Id$
 
 
-#ifndef _HUD_HXX
-#define _HUD_HXX
+#ifndef _OLDHUD_HXX
+#define _OLDHUD_HXX
 
 #ifndef __cplusplus
 # error This library requires C++
@@ -50,8 +50,9 @@
 #include <deque>        // STL double ended queue
 #include STL_FSTREAM
 
+#include <simgear/math/fastmath.hxx>    // float_to_int()
 #include <simgear/constants.h>
-//#include <simgear/props/props.hxx>
+#include <simgear/props/props.hxx>
 
 #include <Include/fg_typedefs.h>
 #include <Aircraft/aircraft.hxx>
@@ -62,7 +63,6 @@
 #include <Main/viewmgr.hxx>
 #include <Airports/runways.hxx>
 
-#include "hud_opts.hxx"
 #include <plib/sg.h>
 
 SG_USING_STD(deque);
@@ -287,7 +287,7 @@ public:
         if ( HUDtext && str ) {
             float r, l ;
             HUD_Font->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
-            return FloatToInt( r - l );
+            return float_to_int( r - l );
         }
         return 0 ;
     }
@@ -297,7 +297,7 @@ public:
         if ( HUDtext && strlen( msg )) {
             float r, l ;
             HUD_Font->getBBox ( msg, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
-            return FloatToInt( r - l );
+            return float_to_int( r - l );
         }
         return 0 ;
     }
@@ -354,7 +354,7 @@ public:
 
     void Draw()
     {
-        guiFnt.drawString( msg, FloatToInt(x), FloatToInt(y) );
+        guiFnt.drawString( msg, float_to_int(x), float_to_int(y) );
     }
 };
 
@@ -490,7 +490,7 @@ public:
         if ( HUDtext && str ) {
             float r, l ;
             HUD_Font->getBBox ( str, HUD_TextSize, 0, &l, &r, NULL, NULL ) ;
-            return FloatToInt( r - l );
+            return float_to_int( r - l );
         }
         return 0 ;
     }
@@ -548,71 +548,6 @@ public:
 };
 
 
-class lat_label : public instr_item {
-private:
-    const char *pformat;
-    const char *pre_str;
-    const char *post_str;
-    fgLabelJust justify;
-    int         fontSize;
-    int         blink;
-    char format_buffer[80];
-
-public:
-    lat_label( int          x,
-               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 );
-
-    lat_label( const lat_label & image);
-    virtual void draw( void );       // Required method in base class
-};
-
-
-class lon_label : public instr_item {
-private:
-    const char *pformat;
-    const char *pre_str;
-    const char *post_str;
-    fgLabelJust justify;
-    int         fontSize;
-    int         blink;
-    char format_buffer[80];
-
-public:
-    lon_label( int          x,
-               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);
-
-
-    lon_label( const lon_label & image);
-    virtual void draw( void );       // Required method in base class
-};
-
-
 //
 // fgRunway_instr   This class is responsible for rendering the active runway
 //                  in the hud (if visible).
@@ -898,4 +833,4 @@ private:
     float _r, _g, _b, _a, _cl;
 };
 
-#endif // _HUD_H
+#endif // _OLDHUD_H