#include <simgear/misc/sg_path.hxx>
#include <Aircraft/aircraft.hxx>
-#include <Autopilot/xmlauto.hxx>
+//#include <Autopilot/xmlauto.hxx>
#include <GUI/new_gui.hxx> // FGFontCache
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
static char units[5];
-// The following routines obtain information concerning the aircraft's
-// current state and return it to calling instrument display routines.
-// They should eventually be member functions of the aircraft.
-//
-
-deque< instr_item * > HUD_deque;
+deque<instr_item *> HUD_deque;
-fgTextList HUD_TextList;
-fgLineList HUD_LineList;
-fgLineList HUD_StippleLineList;
+fgTextList HUD_TextList;
+fgLineList HUD_LineList;
+fgLineList HUD_StippleLineList;
fntRenderer *HUDtext = 0;
fntTexFont *HUD_Font = 0;
float HUD_matrix[16];
-static string name;
-static string label_format;
-static string prelabel;
-static string postlabel;
-static string type;
-static string type_pointer;
-static string type_tick;
-static string length_tick;
-
int readHud( istream &input );
int readInstrument ( const SGPropertyNode * node);
static void drawHUD();
static void fgUpdateHUDVirtual();
+
class locRECT {
public:
RECT rect;
}
// #define DEBUG
-//========================= End of Class Implementations===================
-// fgHUDInit
-//
-// Constructs a HUD object and then adds in instruments. At the present
-// the instruments are hard coded into the routine. Ultimately these need
-// to be defined by the aircraft's instrumentation records so that the
-// display for a Piper Cub doesn't show the speed range of a North American
-// mustange and the engine readouts of a B36!
-//
int nCards = card_group->nChildren();
for (int j = 0; j < nCards; j++) {
const char *type = card_group->getChild(j)->getStringValue("type", "gauge");
+
if (!strcmp(type, "gauge"))
HIptr = static_cast<instr_item *>(new gauge_instr(card_group->getChild(j)));
else if (!strcmp(type, "dial") || !strcmp(type, "tape"))
HIptr = static_cast<instr_item *>(new hud_card(card_group->getChild(j)));
+ else {
+ SG_LOG(SG_INPUT, SG_WARN, "HUD: unknown 'card' type: " << type);
+ continue;
+ }
HUD_deque.insert(HUD_deque.begin(), HIptr);
}
}
}
+// fgHUDInit
+//
+// Constructs a HUD object and then adds in instruments. At the present
+// the instruments are hard coded into the routine. Ultimately these need
+// to be defined by the aircraft's instrumentation records so that the
+// display for a Piper Cub doesn't show the speed range of a North American
+// mustange and the engine readouts of a B36!
+//
int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
{
}
+
int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
{
glPopMatrix();
}
+
void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
GLfloat x_end, GLfloat y_end )
{
glPopMatrix();
}
+
void drawHUD()
{
if ( !HUD_deque.size() ) // Trust everyone, but ALWAYS cut the cards!
}
-
void fgTextList::draw()
{
if (!Font)
}
-
// HUD property listener class
//
HUD_Properties::HUD_Properties() :
glColor3f(_r, _g, _b);
}
+