// $Id$
-#ifndef _HUD_HXX
-#define _HUD_HXX
+#ifndef _OLDHUD_HXX
+#define _OLDHUD_HXX
#ifndef __cplusplus
# error This library requires C++
#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>
#include <Main/viewmgr.hxx>
#include <Airports/runways.hxx>
-#include "hud_opts.hxx"
#include <plib/sg.h>
SG_USING_STD(deque);
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 ;
}
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 ;
}
void Draw()
{
- guiFnt.drawString( msg, FloatToInt(x), FloatToInt(y) );
+ guiFnt.drawString( msg, float_to_int(x), float_to_int(y) );
}
};
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 ;
}
};
-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).
float _r, _g, _b, _a, _cl;
};
-#endif // _HUD_H
+#endif // _OLDHUD_H